/* =========================================================================
   tools/overtime/style.css — Overtime calculator
   Theme: Palette C — sky mid (#78B3CE)
   Mood: clean, professional, daytime workhour vibe
   ========================================================================= */

body {
  --blue:         #78B3CE;   /* primary — sky mid */
  --blue-dark:    #5896B5;
  --primary-bg:   #EEF7FB;
  --primary-mid:  #C9E2EF;
  --primary-tint: rgba(120, 179, 206, 0.14);
  --primary-text: #1F4E68;
  --accent-light: #A6CCDF;
  --accent-warm:  #F5A573;   /* orange — for highlight */
}

body .container { max-width: 1400px; padding: 0; }
body .site-header-inner { max-width: 1400px; padding: 0.85rem 1.5rem; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  margin: 1.25rem 0 0 1.5rem; padding: 0.5rem 1rem;
  background: #fff; border-radius: 999px;
  box-shadow: var(--shadow-pill); transition: color 0.15s;
}
.back-link:hover { color: var(--blue); }

/* ============================================================
   Hero (flat)
   ============================================================ */
.hero-banner { max-width: 1400px; margin: 1.5rem auto 0; padding: 0 1.5rem; }
.hero-inner { display: flex; align-items: center; gap: 1.75rem; padding: 0; }
.hero-icon {
  width: 84px; height: 84px; border-radius: 20px;
  background: #fff; color: var(--blue);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(120, 179, 206, 0.30);
}
.hero-body { flex: 1; min-width: 0; }
.hero-title {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.15; color: var(--primary-text); margin: 0 0 0.5rem;
}
.hero-platform {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 0.15rem 0.7rem; border-radius: 999px;
  font-size: 0.65em; font-weight: 700; vertical-align: middle;
  margin-left: 0.35rem;
}
.hero-tagline { font-size: 1.02rem; line-height: 1.6; color: var(--text-soft); margin: 0 0 1.25rem; }
.hero-tagline strong { color: var(--primary-text); font-weight: 700; }
.hero-stats { display: flex; gap: 0.55rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-stats li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.95rem; background: var(--primary-bg);
  border: none; border-radius: 999px; line-height: 1.2;
  transition: transform 0.15s, background 0.15s;
}
.hero-stats li:hover { transform: translateY(-2px); background: var(--primary-mid); }
.hero-stat-num { font-size: 0.95rem; font-weight: 700; color: var(--primary-text); font-variant-numeric: tabular-nums; }
.hero-stat-lbl { font-size: 0.75rem; color: var(--text-soft); font-weight: 500; }
@media (max-width: 768px) {
  .hero-banner { padding: 0 1rem; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding: 0; gap: 1rem; }
  .hero-icon { width: 56px; height: 56px; border-radius: 14px; }
  .hero-icon svg { width: 32px; height: 32px; }
}

/* ============ Layout — 2 cols ============ */
.calc-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin-top: 1.5rem;
}
.calc-form, .calc-result { padding: 2rem 2rem 3rem; min-width: 0; }
.form-card, .result-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.75rem 1.85rem;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 6px 18px rgba(15,23,42,0.04);
}
@media (max-width: 768px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-form, .calc-result { padding: 1.25rem 1rem 1.5rem; }
  .calc-form { padding-bottom: 0.5rem; }
}
@media (max-width: 480px) {
  .form-card, .result-card { padding: 1.25rem 1.1rem; border-radius: 12px; }
}

/* ============ Form ============ */
.page-title {
  font-size: clamp(1.4rem, 3.2vw, 1.7rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.5rem;
  color: var(--text);
}
.page-subtitle { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.75rem; }

.field { margin-bottom: 1.5rem; }
.field-label {
  display: block; font-size: 1.1rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.55rem; letter-spacing: -0.01em;
}
.lbl-hint { font-size: 0.8rem; font-weight: 500; color: var(--muted); margin-left: 0.4rem; }
.field-input {
  display: flex; align-items: baseline; gap: 0.6rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0.45rem; transition: border-color 0.15s;
}
.field-input:focus-within { border-color: var(--blue); }
.field-prefix { font-size: 1.4rem; font-weight: 500; color: var(--muted); line-height: 1; }
.field-input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 1.5rem; font-weight: 500; font-family: inherit; color: var(--text);
  padding: 0; width: 100%; -moz-appearance: textfield;
}
.field-input input::-webkit-outer-spin-button,
.field-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-input input::placeholder { color: #CBD5E1; font-weight: 400; }
.hint-text { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-top: 0.55rem; }

/* Segmented */
.seg-control { display: flex; background: #F1F5F9; border-radius: 12px; padding: 4px; gap: 4px; }
.seg-control input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.seg-control label {
  flex: 1; text-align: center; padding: 0.7rem 0.5rem; border-radius: 8px;
  cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--muted);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  user-select: none; margin: 0;
}
.seg-control input:checked + label {
  background: #fff; color: var(--blue); font-weight: 600;
  box-shadow: 0 1px 3px rgba(15,23,42,0.08);
}

/* === Form section title === */
.form-section-title {
  font-size: 1rem; font-weight: 700;
  color: var(--primary-text); margin: 1.75rem 0 0.85rem;
  padding-top: 1.25rem; border-top: 1px dashed var(--border);
}

/* === OT Row — visual rate badges === */
.ot-row {
  display: flex; gap: 1rem; align-items: stretch;
  margin-bottom: 1rem;
}
.ot-rate {
  flex-shrink: 0;
  width: 90px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
}
.ot-rate-15 { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); color: #1E40AF; }
.ot-rate-2  { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; }
.ot-rate-3  { background: linear-gradient(135deg, #FEE2E2, #FECACA); color: #991B1B; }
.ot-multi {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
}
.ot-rate-label {
  font-size: 0.66rem;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0;
}
.ot-row-input { flex: 1; min-width: 0; }
.ot-row-input .field-label { font-size: 0.95rem; }
.ot-row-input .field-input input { font-size: 1.3rem; }

@media (max-width: 480px) {
  .ot-row { gap: 0.75rem; }
  .ot-rate { width: 72px; padding: 0.65rem 0.4rem; }
  .ot-multi { font-size: 1.15rem; }
  .ot-rate-label { font-size: 0.6rem; }
}

/* Primary button */
.btn {
  display: block; width: 100%; padding: 1rem;
  background: var(--blue); color: #fff; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 600; font-family: inherit; cursor: pointer;
  margin-top: 1.5rem; transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(120, 179, 206, 0.32);
}
.btn:hover {
  background: var(--blue-dark);
  box-shadow: 0 6px 22px rgba(120, 179, 206, 0.45);
  transform: translateY(-1px);
}

/* ============ Result ============ */
.result-empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--muted); }
.result-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.55; }
.result-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Big number card */
.summary-cards { display: grid; grid-template-columns: 1fr; gap: 0.85rem; margin-bottom: 1rem; }
.summary-card {
  padding: 2rem 1.5rem; border-radius: 16px; border: 1px solid;
  position: relative; overflow: hidden; text-align: center;
}
.summary-card-pay {
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.5) 0%, transparent 60%),
    linear-gradient(140deg, var(--primary-bg) 0%, var(--primary-mid) 100%);
  border-color: var(--accent-light);
}
.summary-card-pay::before {
  content: ""; position: absolute; bottom: -20px; right: -20px;
  width: 140px; height: 80px;
  background-image: radial-gradient(circle, var(--accent-light) 1px, transparent 1.5px);
  background-size: 12px 12px; opacity: 0.55; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at right bottom, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at right bottom, black 30%, transparent 75%);
}
.summary-card-label { font-size: 0.88rem; font-weight: 600; color: var(--primary-text); margin-bottom: 0.45rem; opacity: 0.85; }
.summary-card-value {
  font-size: clamp(2.5rem, 7vw, 3.75rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 0.55rem;
  font-variant-numeric: tabular-nums; color: var(--primary-text);
}
.summary-card-note { font-size: 0.85rem; color: var(--primary-text); opacity: 0.7; font-weight: 500; }

.result-detail-title {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem; font-weight: 700;
  color: var(--primary-text); letter-spacing: -0.01em;
  margin: 0 0 1rem; padding: 0.5rem 0.85rem;
  background: var(--primary-bg);
  border-radius: 999px;
  border: 1px solid var(--accent-light);
}

/* === OT breakdown — per rate === */
.ot-breakdown { display: flex; flex-direction: column; gap: 0.65rem; }
.ot-detail {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.4rem 0.85rem;
  padding: 0.85rem 1rem;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  transition: opacity 0.2s;
}
.ot-detail.is-empty { opacity: 0.4; }
.ot-detail-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.9rem;
}
.ot-detail-rate {
  flex-shrink: 0;
  width: 48px; height: 30px;
  border-radius: 6px;
  display: grid; place-items: center;
}
.ot-detail-rate .ot-multi {
  font-size: 0.95rem;
  font-weight: 800;
}
.ot-detail-label { font-weight: 600; color: var(--text); }
.ot-detail-hours {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ot-detail-calc {
  grid-column: 1 / 3;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ot-detail-value {
  grid-column: 3;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-text);
  font-variant-numeric: tabular-nums;
  align-self: end;
}

/* Final total */
.break-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 0.75rem 0.25rem;
}
.break-label { color: var(--text-soft); }
.break-value { font-weight: 600; color: var(--text); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.break-row-final {
  margin-top: 1rem; padding-top: 1.1rem !important;
  border-top: 2px solid var(--text) !important;
}
.break-row-final .break-label { font-size: 1rem; font-weight: 700; color: var(--text); }
.break-final { font-size: 1.4rem; color: var(--primary-text); font-weight: 700; }

/* Warn callout */
.warn-callout {
  display: flex; gap: 0.75rem; align-items: flex-start;
  margin-top: 1rem; padding: 0.95rem 1.1rem;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 10px;
}
.warn-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.3; }
.warn-body { font-size: 0.88rem; color: #78350F; line-height: 1.6; }
.warn-body strong { color: #4A3900; font-weight: 700; }

/* Summary callout */
.summary-callout {
  display: flex; gap: 0.85rem; align-items: flex-start;
  margin-top: 1rem; padding: 1.1rem 1.25rem;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--primary-mid) 100%);
  border: 1px solid var(--accent-light); border-radius: 14px;
}
.summary-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.summary-text { color: var(--primary-text); font-size: 0.95rem; line-height: 1.7; margin: 0; font-variant-numeric: tabular-nums; }
.summary-text strong { font-weight: 700; color: var(--primary-text); white-space: nowrap; }
.callout-warn { color: #C2410C; font-weight: 700; white-space: nowrap; }

/* ============================================================
   Q&A Deep
   ============================================================ */
.qa-deep { max-width: 1400px; margin: 4rem auto 3rem; padding: 0 2rem; }
@media (max-width: 768px) { .qa-deep { padding: 0 1rem; margin: 3rem auto 2rem; } }

.qa-deep-title {
  font-size: clamp(1.5rem, 3.2vw, 1.85rem); font-weight: 700;
  letter-spacing: -0.025em; text-align: center; color: var(--text);
  margin: 0 0 0.5rem;
}
.qa-deep-sub { text-align: center; color: var(--muted); font-size: 1rem; line-height: 1.6; margin: 0 0 2.5rem; }

.qa-deep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 880px) { .qa-deep-grid { grid-template-columns: 1fr; gap: 2rem; } }

.qa-section {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.75rem 1.85rem;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.03);
}
@media (max-width: 480px) { .qa-section { padding: 1.4rem 1.2rem; } }

.qa-section-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--primary-text); letter-spacing: -0.015em;
  margin: 0 0 1.25rem; padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--primary-bg);
}

/* Rates table mini */
.rates-card { background: var(--primary-bg); border-radius: 12px; padding: 1.1rem; }
.rates-mini { width: 100%; border-collapse: collapse; font-size: 0.92rem; color: var(--text); }
.rates-mini th {
  text-align: left; padding: 0.55rem 0.75rem;
  font-weight: 700; color: var(--primary-text);
  border-bottom: 1.5px solid var(--accent-light);
  background: var(--primary-mid);
}
.rates-mini td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(120, 179, 206, 0.18);
  font-variant-numeric: tabular-nums;
}
.rates-mini tr:last-child td { border-bottom: none; }
.rates-mini tr.row-15 td { background: rgba(59, 130, 246, 0.08); }
.rates-mini tr.row-2 td  { background: rgba(245, 158, 11, 0.10); }
.rates-mini tr.row-3 td  { background: rgba(239, 68, 68, 0.08); }
.rates-mini th:nth-child(2),
.rates-mini th:nth-child(3),
.rates-mini td:nth-child(2),
.rates-mini td:nth-child(3) { text-align: center; }
.rates-note { font-size: 0.8rem; color: var(--muted); margin: 0.85rem 0 0; font-style: italic; }

.info-pill {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.85rem 1rem; margin-top: 1rem;
  background: var(--primary-bg);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  font-size: 0.88rem; line-height: 1.55; color: var(--text-soft);
}
.info-pill-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.4; }
.info-pill strong { color: var(--primary-text); font-weight: 700; }

/* Info accordion in section */
.info-acc {
  background: transparent; border: none;
  border-bottom: 1px solid var(--border-soft); border-radius: 0;
  margin: 0; padding: 0;
}
.info-acc:first-of-type { border-top: 1px solid var(--border-soft); }
.info-acc summary {
  padding: 1rem 0.25rem; cursor: pointer; list-style: none;
  font-size: 0.95rem; font-weight: 500; color: var(--text-soft);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; user-select: none;
}
.info-acc summary::-webkit-details-marker { display: none; }
.info-acc summary::after {
  content: ""; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); margin-bottom: 4px;
  transition: transform 0.25s, border-color 0.15s;
  flex-shrink: 0; opacity: 0.7;
}
.info-acc[open] summary::after { transform: rotate(225deg); margin-bottom: -4px; border-color: var(--blue); opacity: 1; }
.info-acc[open] summary { color: var(--text); font-weight: 600; }
.info-acc-body { padding: 0 0.25rem 1.2rem; color: var(--text-soft); font-size: 0.92rem; line-height: 1.8; }
.info-acc-body p { margin: 0 0 0.65rem; }
.info-acc-body p:last-child { margin: 0; }
.info-acc-body strong { color: var(--text); font-weight: 600; }
.info-acc-body ul, .info-acc-body ol { margin: 0.45rem 0 0.65rem; padding-left: 1.25rem; }
.info-acc-body ul li, .info-acc-body ol li { margin-bottom: 0.2rem; }
.info-warn {
  background: #FEF3C7; border-radius: 6px;
  padding: 0.5rem 0.75rem; margin-top: 0.65rem !important;
  font-size: 0.85rem; color: #78350F;
}
.info-note {
  background: var(--primary-bg); border-left: 3px solid var(--accent-light);
  padding: 0.5rem 0.75rem; border-radius: 6px;
  margin-top: 0.65rem !important; font-size: 0.85rem; color: var(--text-soft);
}

/* Formula box */
.formula {
  background: var(--primary-bg); border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.formula-row {
  padding: 0.5rem 0; font-size: 0.9rem; color: var(--text-soft); line-height: 1.7;
}
.formula-row + .formula-row { border-top: 1px dashed var(--accent-light); }
.formula-row strong { color: var(--primary-text); font-weight: 700; }

.example-block {
  margin-top: 1rem !important;
  padding: 1rem 1.15rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: #78350F;
}
.example-block strong { color: #4A3900; font-weight: 700; }

/* Contact info */
.contact-info {
  margin-top: 1.5rem; padding: 1rem 1.15rem;
  background: #F0F9FF; border: 1px solid #BAE6FD; border-radius: 10px;
}
.contact-info h4 { margin: 0 0 0.6rem; font-size: 0.95rem; font-weight: 700; color: #0C4A6E; }
.contact-info ul { margin: 0; padding-left: 1.25rem; font-size: 0.88rem; color: #075985; line-height: 1.85; }
.contact-info a { color: #0369A1; text-decoration: underline; }
.contact-info strong { color: #0C4A6E; }

/* ============================================================
   FAQ + Related
   ============================================================ */
.faq-wrap {
  max-width: 1400px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 880px) {
  .faq-wrap { grid-template-columns: 1fr; gap: 2.5rem; padding: 0 1rem; margin-bottom: 3rem; }
}
.info-accordion-title {
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
  margin: 0 0 0.75rem;
}
.faq-grid { display: block; }

.related-tools-wrap {
  background: var(--primary-bg);
  border: 1px solid var(--accent-light);
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
}
.related-title { font-size: 1rem; font-weight: 700; color: var(--primary-text); margin: 0 0 1rem; }
.related-tools { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.related-tools li a {
  display: block; padding: 0.75rem 0.95rem;
  background: #fff; border: 1px solid var(--accent-light);
  border-radius: 10px; text-decoration: none;
  color: var(--primary-text);
  font-size: 0.9rem; font-weight: 500; line-height: 1.4;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.related-tools li a:hover {
  transform: translateX(2px);
  border-color: var(--blue);
  background: var(--primary-mid);
}
