/* ============================================================
   DATE DIFFERENCE CALCULATOR — date-difference.css
   Responsive glassmorphism styles for Date Duration Calculator
   Toolspot by Tradesala
   ============================================================ */

.container {
  --tool-gold: #f59e0b;
  --tool-gold-soft: rgba(245, 158, 11, 0.12);
  --tool-gold-glow: rgba(245, 158, 11, 0.25);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 100px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ─── TWO-COLUMN LAYOUT OVERRIDE ─── */
.tool-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

/* ─── DATE DROPDOWN GRID ─── */
.date-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.date-select-grid select {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 700;
  padding: 0 10px;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.date-select-grid select:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(245, 158, 11, 0.3);
}

.date-select-grid select:focus {
  background: rgba(245, 158, 11, 0.04);
  border-color: var(--tool-gold);
  box-shadow: 0 0 12px var(--tool-gold-glow);
}

body.light .date-select-grid select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

body.light .date-select-grid select:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(217, 119, 6, 0.3);
}

body.light .date-select-grid select:focus {
  background: rgba(245, 158, 11, 0.02);
  border-color: #d97706;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.15);
}

/* ─── OPTION SWITCHES (Tacit button layout) ─── */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.opt-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
}

/* Toggle Switch slider styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.switch input:checked + .switch-slider {
  background-color: var(--tool-gold);
  border-color: var(--tool-gold);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

body.light .switch-slider {
  background-color: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ─── RESULT HERO CARD (Frosted Gold style) ─── */
.result-hero {
  background: linear-gradient(135deg, rgba(30, 25, 20, 0.45) 0%, rgba(20, 15, 10, 0.6) 100%);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-left: 4px solid var(--tool-gold);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.25), 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 25px rgba(245, 158, 11, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.result-hero:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 
    0 20px 40px rgba(245, 158, 11, 0.08), 
    inset 0 1px 1px rgba(255, 255, 255, 1);
}

body.light .result-hero {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.3) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-left: 4px solid var(--tool-gold);
  box-shadow: 
    0 16px 36px rgba(245, 158, 11, 0.05), 
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

body.light .result-hero:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 
    0 20px 40px rgba(245, 158, 11, 0.08), 
    inset 0 1px 1px rgba(255, 255, 255, 1);
}

.result-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 80% 20%, var(--tool-gold-soft) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.result-hero * {
  z-index: 1;
}

.hero-title-lbl {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}

.converted-words-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0;
}

.age-hero-text {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.25));
}

body.light .age-hero-text {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 3px rgba(217, 119, 6, 0.18));
}

.age-hero-subtext {
  font-family: 'Figtree', sans-serif;
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.45;
  font-weight: 600;
}

/* Secondary KPI grid inside main result hero */
.diff-metrics-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: 4px;
}

body.light .diff-metrics-summary {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-val {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.summary-lbl {
  font-family: 'Figtree', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

/* ─── COMPREHENSIVE BREAKDOWN ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

body.light .metric-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.04);
}

body.light .metric-card:hover {
  border-color: rgba(217, 119, 6, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03);
}

.metric-val {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.metric-lbl {
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ─── EXCLUDED HOLIDAYS LIST ─── */
.holidays-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  margin-top: 12px;
}

body.light .holidays-table-wrap {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

.holidays-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.holidays-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.light .holidays-table th {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
  background: rgba(0, 0, 0, 0.01);
}

.holidays-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  vertical-align: middle;
}

body.light .holidays-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #334155;
}

.holidays-table tbody tr:last-child td {
  border-bottom: none;
}

.holidays-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

body.light .holidays-table tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

.holiday-name-td {
  font-weight: 700;
  color: var(--text);
}

body.light .holiday-name-td {
  color: #0f172a;
}

.holiday-date-td {
  font-variant-numeric: tabular-nums;
}

.no-holidays-msg {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 600;
}

/* Responsive Breakdowns */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .diff-metrics-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Button style overrides for gold/amber theme */
.rb-btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.2);
  transition: all 0.3s ease;
}

.rb-btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

/* Gold/Amber badge buttons inside labels (.lbl-auto) */
.fg label button.lbl-auto {
  outline: none;
  font-family: 'Figtree', sans-serif;
  color: var(--tool-gold) !important;
  background: var(--tool-gold-soft) !important;
  border: 1px solid var(--tool-gold-glow) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fg label button.lbl-auto:hover {
  background: var(--tool-gold-glow) !important;
  border-color: var(--tool-gold) !important;
  transform: scale(1.02);
}

body.light .fg label button.lbl-auto {
  color: #d97706 !important;
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

body.light .fg label button.lbl-auto:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #d97706 !important;
}

/* Light Mode Overrides for Primary Button (Gold/Amber theme) */
body.light .rb-btn-primary {
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.18) !important;
  color: #d97706 !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.04) !important;
}

body.light .rb-btn-primary:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #b45309 !important;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.08) !important;
}


