/* =============================================================
   Colibri Jet Calculator — jet-calculator.css  v3.3.0
   Responsive. Theme-neutral (inherits font/color from WP theme).
   ============================================================= */

/* ── Reset / base ─────────────────────────────────────────── */
#jet-calculator *, #jet-calculator *::before, #jet-calculator *::after { box-sizing: border-box; }
#jet-calculator { font-family: inherit; color: inherit; line-height: 1.6; }

/* ── Hero ──────────────────────────────────────────────────── */
.jc-hero { background: #0f2942; padding: 40px 20px 36px; }
.jc-hero-inner { max-width: 780px; margin: 0 auto; }
.jc-title { font-size: clamp(20px, 4vw, 32px); font-weight: 700; color: #fff; margin: 0 0 10px; letter-spacing: -0.02em; }
.jc-intro { font-size: 15px; color: rgba(255,255,255,0.72); margin: 0; max-width: 540px; }

/* ── Wrapper ────────────────────────────────────────────────── */
.jc-wrap { max-width: 780px; margin: 0 auto; padding: 0 16px 60px; }

/* ── Tabs ───────────────────────────────────────────────────── */
.jc-tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 28px; padding-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.jc-tabs::-webkit-scrollbar { display: none; }
.jc-tab { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; color: #64748b; transition: color 0.15s, border-color 0.15s; white-space: nowrap; flex-shrink: 0; }
.jc-tab:hover { color: #0f2942; }
.jc-tab.active { color: #0f2942; border-bottom-color: #e05a1e; }
.jc-tab-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: background 0.15s, color 0.15s; }
.jc-tab.active .jc-tab-num { background: #e05a1e; color: #fff; }
.jc-tab.completed .jc-tab-num { background: #16a34a; color: #fff; content: '✓'; }

/* ── Panels ─────────────────────────────────────────────────── */
.jc-panel { display: none; }
.jc-panel.active { display: block; animation: jcFadeIn 0.18s ease; }
@keyframes jcFadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

/* ── Cards ──────────────────────────────────────────────────── */
.jc-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.jc-card--narrow { max-width: 360px; }

/* ── Form fields ─────────────────────────────────────────────── */
.jc-field-group { margin-bottom: 20px; }
.jc-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.jc-field:last-child { margin-bottom: 0; }

/* Responsive two-column row */
.jc-fields-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 18px; }
.jc-fields-row:last-child { margin-bottom: 0; }
.jc-fields-row--three { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

.jc-label { display: block; font-size: 13px; font-weight: 600; color: #374151; }

/* Plain text inputs — no spinners (fix #6) */
.jc-input {
  display: block; width: 100%;
  padding: 9px 12px;
  font-family: inherit; font-size: 15px; color: #111827;
  background: #fff; border: 1px solid #d1d5db; border-radius: 7px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
/* Hide number spinners everywhere */
.jc-input::-webkit-outer-spin-button,
.jc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jc-input[type=number] { -moz-appearance: textfield; }
.jc-input:focus { border-color: #0f2942; box-shadow: 0 0 0 3px rgba(15,41,66,0.1); }
.jc-input--narrow { max-width: 160px; }

.jc-select {
  display: block; width: 100%;
  padding: 9px 32px 9px 12px;
  font-family: inherit; font-size: 15px; color: #111827;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid #d1d5db; border-radius: 7px;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.jc-select:focus { border-color: #0f2942; box-shadow: 0 0 0 3px rgba(15,41,66,0.1); }
.jc-select--unit { width: auto; min-width: 80px; flex-shrink: 0; }

.jc-pressure-row { display: flex; gap: 8px; align-items: stretch; }
.jc-pressure-row .jc-input { flex: 1; }

.jc-hint { font-size: 12px; color: #6b7280; }

/* ── Radio group ─────────────────────────────────────────────── */
.jc-radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.jc-radio-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.jc-radio-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid #d1d5db; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: #374151; background: #fff; transition: border-color 0.15s, background 0.15s, color 0.15s; user-select: none; }
.jc-radio-btn:hover { border-color: #0f2942; color: #0f2942; }
.jc-radio-label input[type="radio"]:checked + .jc-radio-btn { border-color: #0f2942; background: #0f2942; color: #fff; }

/* ── Tab nav buttons ─────────────────────────────────────────── */
.jc-tab-nav { display: flex; justify-content: flex-end; margin-top: 8px; gap: 10px; }
.jc-tab-nav--split { justify-content: space-between; }
.jc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; font-family: inherit; font-size: 14px; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; transition: background 0.15s, opacity 0.15s; }
.jc-btn:active { opacity: 0.85; }
.jc-btn--next, .jc-btn--recalc { background: #e05a1e; color: #fff; }
.jc-btn--next:hover, .jc-btn--recalc:hover { background: #c4481a; }
.jc-btn--next:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }
.jc-btn--back { background: #f1f5f9; color: #374151; }
.jc-btn--back:hover { background: #e2e8f0; }

/* ── Result areas ─────────────────────────────────────────────── */
.jc-result-area { margin-bottom: 16px; }
.jc-result-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 20px; background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 10px; text-align: center; color: #94a3b8; font-size: 14px; }

/* ── Spindle recommendation cards ─────────────────────────────── */
.jc-rec-list { display: flex; flex-direction: column; gap: 12px; }
.jc-rec-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; position: relative; transition: border-color 0.15s; }
.jc-rec-card--top { border-left: 4px solid #e05a1e; }
.jc-rec-card--selected { border-color: #0f2942; box-shadow: 0 0 0 2px rgba(15,41,66,0.12); }
.jc-top-label { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #e05a1e; margin-bottom: 6px; }
.jc-rec-card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.jc-rec-card-header h3 { margin: 0; font-size: 17px; font-weight: 700; color: #0f2942; }
.jc-pressure-range { font-size: 12px; color: #6b7280; background: #f1f5f9; padding: 2px 8px; border-radius: 20px; }
.jc-rec-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.jc-select-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; font-family: inherit; font-size: 13px; font-weight: 600; border: 1.5px solid #0f2942; border-radius: 7px; background: none; color: #0f2942; cursor: pointer; transition: background 0.15s, color 0.15s; }
.jc-select-btn:hover, .jc-rec-card--selected .jc-select-btn { background: #0f2942; color: #fff; }

/* ── Badges ───────────────────────────────────────────────────── */
.jc-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.jc-badge--green  { background: #dcfce7; color: #166534; }
.jc-badge--amber  { background: #fef9c3; color: #854d0e; }
.jc-badge--red    { background: #fee2e2; color: #991b1b; }
.jc-badge--info   { background: #eff6ff; color: #1d4ed8; }
.jc-badge--neutral { background: #f1f5f9; color: #475569; }
.jc-badge--neutral-warn { background: #fef9c3; color: #713f12; }
.jc-badge--primary { background: #fff3ed; color: #c4481a; }

/* ── Notes (pressure warnings) ───────────────────────────────── */
.jc-pressure-note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
}
.jc-pressure-note--amber { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.jc-pressure-note--red   { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.jc-note-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; flex-shrink: 0; background: rgba(0,0,0,0.12); margin-top: 1px; }

/* ── Tab 3: two-section layout ────────────────────────────────── */

/* Section headings — scoped to #jet-calculator to beat theme h4 styles */
#jet-calculator .jc-section-heading {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f2942 !important;
  margin: 0 0 14px !important;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: 0;
  text-transform: none !important;
  line-height: 1.3;
}

/* Section A — Your setup */
#jet-calculator .jc-setup-summary {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}
#jet-calculator .jc-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 24px;
}
#jet-calculator .jc-setup-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#jet-calculator .jc-setup-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af !important;
  margin: 0;
}
#jet-calculator .jc-setup-value {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #111827 !important;
  margin: 0;
}
#jet-calculator .jc-setup-value--bold {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f2942 !important;
}

/* Section B — Cutting recommendations */
.jc-cutting-recs { }

.jc-conditions {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

/* Lightweight header row */
.jc-conditions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 13px 20px 11px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.jc-conditions-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f2942;
}
.jc-conditions-sub {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}

/* Metrics grid — milling (6 cells, 3-col) */
.jc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
/* Drilling metrics — 4 cells, 4-col on desktop */
.jc-metrics--drill {
  grid-template-columns: repeat(4, 1fr);
}
.jc-metric {
  padding: 16px 20px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
/* Remove right border on last in each row */
.jc-metrics .jc-metric:nth-child(3n)      { border-right: none; }
.jc-metrics--drill .jc-metric:nth-child(4n) { border-right: none; }
/* Remove bottom border on last row */
.jc-metrics .jc-metric:nth-last-child(-n+3)       { border-bottom: none; }
.jc-metrics--drill .jc-metric:nth-last-child(-n+4) { border-bottom: none; }

#jet-calculator .jc-metric-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af !important;
  margin-bottom: 6px;
  margin-top: 0;
}
#jet-calculator .jc-metric-value {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #0f2942 !important;
  line-height: 1.15;
  margin: 0;
}
#jet-calculator .jc-metric-unit {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
  margin-top: 2px;
  margin-bottom: 0;
}

/* Footnotes — small grey text below the table */
.jc-footnotes {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.jc-footnote {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* ── States ───────────────────────────────────────────────────── */
.jc-no-result { background: #fefce8; border: 1px solid #fde047; border-radius: 10px; padding: 14px 18px; font-size: 14px; color: #713f12; }
.jc-error { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 10px; padding: 14px 18px; color: #991b1b; font-size: 14px; }

/* ── Mobile overrides ─────────────────────────────────────────── */
@media (max-width: 560px) {
  .jc-hero { padding: 28px 16px 24px; }
  .jc-wrap { padding: 0 12px 48px; }
  .jc-card { padding: 16px; }
  .jc-tab { padding: 10px 10px 8px; gap: 6px; }
  .jc-tab-label { font-size: 12px; }
  .jc-fields-row { grid-template-columns: 1fr; gap: 0; }
  .jc-fields-row .jc-field { margin-bottom: 14px; }
  .jc-fields-row--three { grid-template-columns: 1fr 1fr; }
  .jc-metrics { grid-template-columns: 1fr 1fr; }
  .jc-metrics--drill { grid-template-columns: 1fr 1fr; }
  .jc-metrics .jc-metric:nth-child(3n)        { border-right: 1px solid #e2e8f0; }
  .jc-metrics .jc-metric:nth-child(2n)        { border-right: none; }
  .jc-metrics--drill .jc-metric:nth-child(4n) { border-right: 1px solid #e2e8f0; }
  .jc-metrics--drill .jc-metric:nth-child(2n) { border-right: none; }
  .jc-metrics .jc-metric:nth-last-child(-n+3)       { border-bottom: 1px solid #e2e8f0; }
  .jc-metrics--drill .jc-metric:nth-last-child(-n+4) { border-bottom: 1px solid #e2e8f0; }
  .jc-metrics .jc-metric:nth-last-child(-n+2)        { border-bottom: none; }
  .jc-setup-grid { grid-template-columns: 1fr 1fr; }
  .jc-rec-card-header { flex-direction: column; align-items: flex-start; }
  .jc-btn { padding: 9px 14px; font-size: 13px; }
  .jc-card--narrow { max-width: 100%; }
}

@media (max-width: 380px) {
  .jc-fields-row--three { grid-template-columns: 1fr; }
  .jc-setup-grid { grid-template-columns: 1fr; }
}

/* ── Resource bar ─────────────────────────────────────────────── */
.jc-resource-bar {
  background: #0f2942;
  padding: 16px 20px;
  margin-top: 0;
}
.jc-resource-bar-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.jc-resource-bar-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}
.jc-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.jc-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.jc-resource-link:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.jc-resource-link--cta {
  background: #e05a1e;
  border-color: #e05a1e;
  color: #fff;
}
.jc-resource-link--cta:hover {
  background: #c4481a;
  border-color: #c4481a;
}
.jc-resource-link--soon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  font-family: inherit;
  cursor: default;
}
.jc-soon-pill {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 560px) {
  .jc-resource-bar-inner { flex-direction: column; align-items: flex-start; }
  .jc-resource-links { gap: 5px; }
  .jc-resource-link, .jc-resource-link--soon { font-size: 11px; padding: 4px 10px; }
}
