/**
 * Kazakan Tools 2.0 — Hijri & Gregorian Dual Converter & World Calendars
 */
/* World Calendars Section & Cards */
.age-section-panel {
  margin-block-end: 20px;
  padding: clamp(18px, 3vw, 26px);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .age-section-panel {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.035), inset 0 1px 0 #fff;
}

.age-section-title {
  margin-block-end: 16px;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.age-calendars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.age-calendar-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.age-calendar-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .age-calendar-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.035);
}

[data-theme="light"] .age-calendar-card:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.age-cal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.age-cal-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1 1 auto;
  min-width: 0;
}

.age-cal-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-lunar {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.28);
}

[data-theme="dark"] .badge-lunar {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.badge-solar {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .badge-solar {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.badge-cycle {
  background: rgba(168, 85, 247, 0.12);
  color: #7e22ce;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

[data-theme="dark"] .badge-cycle {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
}

.age-cal-value {
  color: var(--brand-primary);
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  font-family: var(--font-system);
}

.age-cal-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}


/* ==========================================================================
   Hijri & Gregorian Dual Converter — Modern 2-Way Layout
   ========================================================================== */

#hijri-converter-app {
  width: 100%;
}

#hijri-converter-app .kz-calc-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  grid-template-columns: none;
}

#hijri-converter-app .kz-converter-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  box-sizing: border-box;
}

.kz-calendar-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-card, 18px);
  padding: var(--space-4, 16px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

[data-theme="light"] .kz-calendar-section {
  background: #ffffff;
  border-color: #e2e8f0;
}

.kz-section-gregorian {
  border-inline-start: 4px solid var(--brand-primary, #3b82f6);
  position: relative;
  z-index: 10;
}

.kz-section-hijri {
  border-inline-start: 4px solid #10b981;
}

.kz-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-block-end: var(--space-3, 12px);
}

.kz-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kz-section-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.kz-calendar-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  line-height: 1;
}

.badge-gregorian {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.24);
}

[data-theme="light"] .badge-gregorian {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge-hijri {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.24);
}

[data-theme="light"] .badge-hijri {
  background: #f0fdf4;
  color: #047857;
  border-color: #bbf7d0;
}

.kz-date-inputs-grid {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-block-end: var(--space-3, 12px);
  flex-wrap: wrap;
}

.kz-field-col {
  flex: 1 1 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kz-col-grow {
  flex: 2 1 180px;
}

.kz-field-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .kz-field-lbl {
  color: #64748b;
}

.kz-input-num {
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  min-height: 48px;
}

.kz-select {
  font-weight: 600;
  min-height: 48px;
  cursor: pointer;
}

.kz-date-display-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 10px);
  padding: 10px 14px;
  flex-wrap: wrap;
}

[data-theme="light"] .kz-date-display-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.kz-display-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kz-display-prefix {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kz-display-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

[data-theme="light"] .kz-display-value {
  color: #0f172a;
}

.kz-btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 6px 12px;
  min-height: 38px;
}

/* Center Bridge Divider */
.kz-converter-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-block: 16px;
  position: relative;
}

.kz-bridge-line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.1));
}

[data-theme="light"] .kz-bridge-line {
  background: #e2e8f0;
}

.kz-bridge-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.kz-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-full, 9999px);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-primary, #3b82f6);
}

[data-theme="light"] .kz-sync-badge {
  background: #ffffff;
  border-color: #cbd5e1;
}

.kz-bridge-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kz-bridge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 6px 12px;
  min-height: 38px;
}

/* Hijri Meta Pill */
.kz-hijri-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 10px;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-sm, 10px);
  padding: 6px 12px;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="light"] .kz-hijri-meta-pill {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #166534;
}

.kz-meta-icon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Shared Weekday Banner */
.kz-shared-weekday-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-sm, 12px);
  padding: 12px 16px;
  margin-block-start: var(--space-4, 16px);
  text-align: center;
}

[data-theme="light"] .kz-shared-weekday-card {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border-color: #cbd5e1;
}

.kz-weekday-lbl {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .kz-weekday-lbl {
  color: #475569;
}

.kz-weekday-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-primary, #3b82f6);
}

@media (max-width: 640px) {
  #hijri-converter-app .kz-converter-container {
    padding: var(--space-3, 12px);
  }
  .kz-date-inputs-grid {
    gap: 6px;
  }
  .kz-field-col {
    flex: 1 1 70px;
  }
  .kz-col-grow {
    flex: 1 1 100%;
  }
  .kz-converter-bridge {
    flex-direction: column;
    gap: 8px;
  }
  .kz-bridge-line {
    display: none;
  }
}

@media (max-width: 680px) {
  .age-calendars-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .age-calendar-card {
    padding: 14px;
  }
  .age-cal-value {
    font-size: 1.2rem;
  }
}

/* Modern Numeric Inputs — Suppress dated native spin arrows across all store tools */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

@media (max-width: 420px) {
  #hijri-converter-app .kz-converter-container {
    padding: 10px 8px;
  }
}

/* Low-Spec & No-GPU Solid Fallback */
html.no-glass #hijri-converter-app .kz-converter-container {
  background: #0d1527 !important;
  border-color: #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

html.no-glass[data-theme="light"] #hijri-converter-app .kz-converter-container {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

@supports not (backdrop-filter: blur(10px)) {
  #hijri-converter-app .kz-converter-container {
    background: #0d1527 !important;
    border-color: #1e293b !important;
  }
  [data-theme="light"] #hijri-converter-app .kz-converter-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
  }
}
