/* Free GovCon calculators — visual styles. Loaded only on /tools/.
   IMPORTANT: light-mode overrides use `body.fcp-theme-light`, the same
   class the rest of the theme uses (not [data-theme="light"]). */

.fcp-calc-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  margin-top: 32px;
}

.fcp-calc-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
body.fcp-theme-light .fcp-calc-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
}

.fcp-calc-header { display: flex; flex-direction: column; gap: 4px; }
.fcp-calc-title { margin: 0; font-size: 1.15rem; font-weight: 600; }
.fcp-calc-sub { margin: 0; opacity: 0.75; font-size: 0.92rem; line-height: 1.5; }
body.fcp-theme-light .fcp-calc-sub { opacity: 0.78; color: #4b5563; }

.fcp-calc-body { display: grid; gap: 10px; }

.fcp-calc-field {
  display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem;
}
.fcp-calc-field > span { opacity: 0.78; font-size: 0.84rem; }
body.fcp-theme-light .fcp-calc-field > span { color: #4b5563; opacity: 1; }

.fcp-calc-field input,
.fcp-calc-field select {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  padding: 9px 11px;
  border-radius: 8px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
body.fcp-theme-light .fcp-calc-field input,
body.fcp-theme-light .fcp-calc-field select {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #0f172a;
}
.fcp-calc-field input:focus,
.fcp-calc-field select:focus {
  outline: 2px solid rgba(99, 174, 255, 0.55);
  outline-offset: 1px;
}
body.fcp-theme-light .fcp-calc-field input:focus,
body.fcp-theme-light .fcp-calc-field select:focus {
  outline-color: rgba(37, 99, 235, 0.55);
  background: #ffffff;
}

.fcp-calc-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.10);
}
body.fcp-theme-light .fcp-calc-result { border-top-color: #e5e7eb; }
.fcp-calc-result--single { grid-template-columns: 1fr; }

.fcp-calc-result-label {
  font-size: 0.74rem; opacity: 0.72;
  text-transform: uppercase; letter-spacing: 0.06em;
}
body.fcp-theme-light .fcp-calc-result-label { color: #6b7280; opacity: 1; }

.fcp-calc-result-value {
  font-size: 1.55rem; font-weight: 600; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.fcp-calc-result-value[data-verdict="ok"],
.fcp-calc-result-value[data-verdict="allowable"] { color: #16a34a; }
.fcp-calc-result-value[data-verdict="short"],
.fcp-calc-result-value[data-verdict="allowable-with-conditions"] { color: #d97706; }
.fcp-calc-result-value[data-verdict="mostly-unallowable"],
.fcp-calc-result-value[data-verdict="unallowable"] { color: #dc2626; }

.fcp-calc-cite {
  display: inline-block; margin-top: 4px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem; opacity: 0.72;
}

.fcp-calc-text {
  font-size: 0.92rem; line-height: 1.55; opacity: 0.88; margin: 8px 0 0;
}

.fcp-calc-math { font-size: 0.88rem; opacity: 0.88; }
.fcp-calc-math summary {
  cursor: pointer; opacity: 0.75; font-size: 0.82rem; user-select: none;
}
.fcp-calc-math summary:hover { opacity: 1; }
.fcp-calc-math-body { padding: 10px 0 0; line-height: 1.6; }
.fcp-calc-math-body div { margin: 3px 0; }

.fcp-calc-disclaimer {
  margin-top: 32px; padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.20);
  font-size: 0.88rem; opacity: 0.85; line-height: 1.6;
}
body.fcp-theme-light .fcp-calc-disclaimer {
  background: #f9fafb;
  border-left-color: #94a3b8;
  color: #4b5563;
  opacity: 1;
}
