/* ============================================================
   GE CSALÁDI NAP – Material Design 3 Override Layer
   MD3 komponensek: Nav Bar, FAB, Chips, TextField, Cards
   ============================================================ */

/* ── MD3 Extra Tokens ────────────────────────────────────── */
:root {
  /* MD3 Elevation (tonal surface colors) */
  --md-elev-1: rgba(0, 61, 166, 0.05);
  --md-elev-2: rgba(0, 61, 166, 0.08);
  --md-elev-3: rgba(0, 61, 166, 0.11);

  /* MD3 State layers */
  --md-state-hover:   rgba(0, 61, 166, 0.08);
  --md-state-pressed: rgba(0, 61, 166, 0.12);
  --md-state-focus:   rgba(0, 61, 166, 0.12);

  /* MD3 Shape */
  --md-shape-xs:   4px;
  --md-shape-sm:   8px;
  --md-shape-md:   12px;
  --md-shape-lg:   16px;
  --md-shape-xl:   28px;
  --md-shape-full: 9999px;

  /* MD3 Typography scale */
  --md-display-sm:   36px;
  --md-headline-lg:  32px;
  --md-headline-md:  28px;
  --md-headline-sm:  24px;
  --md-title-lg:     18px;
  --md-title-md:     16px;
  --md-title-sm:     14px;
  --md-body-lg:      16px;
  --md-body-md:      14px;
  --md-body-sm:      12px;
  --md-label-lg:     14px;
  --md-label-md:     12px;
  --md-label-sm:     11px;

  /* Header height for MD3 Top App Bar */
  --header-height: 64px;

  /* Nav height for MD3 Navigation Bar */
  --nav-height: 80px;
}

/* ── Material Symbols icon class ─────────────────────────── */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
  /* MD3 variable font settings */
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  vertical-align: middle;
}

/* Filled variant */
.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── MD3 Top App Bar – GE Vernova Evergreen ─────────────── */
.app-header {
  height: var(--header-height);
  /* Solid Evergreen – GE Vernova official brand color */
  background: #005E60;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0, 94, 96, 0.3);
  padding: 0 var(--space-3);
}

/* MD3 Logo container – SVG on Evergreen background – white filter */
.header-logo {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.header-logo img,
.header-logo svg {
  width: 40px;
  height: 40px;
  object-fit: contain;
  /* White logo on Evergreen background */
  filter: brightness(0) invert(1);
}

.header-title h1 {
  color: #ffffff;
  font-size: var(--md-title-lg);
  font-weight: 500;
  letter-spacing: 0;
}

.header-title .header-date {
  color: rgba(255,255,255,0.75);
  font-size: var(--md-label-md);
  font-weight: 400;
}

.header-time {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
  font-size: var(--md-label-lg);
  font-weight: 500;
  border-radius: var(--md-shape-sm);
}

/* ── MD3 Navigation Bar ──────────────────────────────────── */
.bottom-nav {
  height: calc(var(--nav-height) + var(--safe-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  /* MD3 surface tint level 2 */
  background-color: color-mix(in srgb, var(--color-surface) 92%, var(--color-primary) 8%);
  box-shadow: 0 -1px 0 var(--color-border);
}

.nav-item {
  gap: 4px;
  padding: 12px var(--space-2) 16px;
}

/* MD3 Active Indicator – pill behind icon, light tonal surface */
.nav-item .nav-indicator {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 64px;
  height: 32px;
  /* Light tonal container colour – NOT solid primary */
  background: color-mix(in srgb, var(--color-surface) 80%, var(--color-primary) 20%);
  border-radius: var(--md-shape-full);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1),
              opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

.nav-item.active .nav-indicator {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* Remove old ::before indicator */
.nav-item::before {
  display: none;
}

.nav-item .nav-icon {
  font-size: 24px;
  position: relative;
  z-index: 2;                       /* always above the indicator pill */
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color 0.2s ease, font-variation-settings 0.2s ease;
}

/* MD3 Nav icon: filled when active */
.nav-item.active .nav-icon {
  color: var(--color-primary);
}

.nav-item .nav-label {
  font-size: var(--md-label-sm);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
  color: var(--color-text-muted);
  position: relative;
  z-index: 2;
}

.nav-item.active .nav-label {
  color: var(--color-primary);
  font-weight: 700;
}

.nav-item:active {
  transform: none;
}

/* ── MD3 Search / TextField ──────────────────────────────── */
.search-bar input {
  height: 52px;
  border-radius: var(--md-shape-xl);
  border: none;
  background: color-mix(in srgb, var(--color-surface) 85%, var(--color-primary) 15%);
  font-size: var(--md-body-lg);
  padding: 0 var(--space-5) 0 52px;
  box-shadow: none;
}

.search-bar input:focus {
  border: 2px solid var(--color-primary);
  box-shadow: none;
  background: var(--color-surface);
}

.search-bar .search-icon {
  left: 16px;
  color: var(--color-text-muted);
}

/* Search icon as Material Symbol */
.search-bar .search-icon.material-symbols-rounded {
  font-size: 22px;
}

.search-clear {
  right: 14px;
  width: 24px;
  height: 24px;
  background: var(--color-text-muted);
  border-radius: 50%;
}

/* ── MD3 Filter Chips ────────────────────────────────────── */
.filter-pill {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--md-shape-sm);
  border: 1px solid var(--color-border-2);
  background: var(--color-surface);
  font-size: var(--md-label-lg);
  font-weight: 500;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.filter-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.filter-pill:active::after {
  opacity: 0.12;
}

.filter-pill.active {
  /* Evergreen solid – brand primary */
  background: #005E60;
  border-color: #005E60;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,94,96,0.3);
}

.filter-pill .chip-icon {
  font-size: 16px;
  line-height: 1;
}

/* ── MD3 Cards ───────────────────────────────────────────── */
.program-card {
  border-radius: var(--md-shape-lg);
  border: none;
  /* MD3 Filled card */
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  /* State layer */
  position: relative;
  overflow: hidden;
}

.program-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: inherit;
}

.program-card:active::after {
  opacity: 0.06;
}

/* Left accent stripe – MD3 style */
.program-card::before {
  width: 4px;
  border-radius: 0;
  left: 0;
  border-radius: var(--md-shape-lg) 0 0 var(--md-shape-lg);
}

.program-card.live-now {
  background: color-mix(in srgb, var(--color-surface) 90%, #16a34a 10%);
  border: none;
  box-shadow: 0 2px 8px rgba(22,163,74,0.12);
}

/* Card time – MD3 Label Small */
.card-time {
  font-size: var(--md-label-md);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Card title – MD3 Title Medium */
.card-title {
  font-size: var(--md-title-md);
  font-weight: 600;
  letter-spacing: 0.15px;
  line-height: 1.4;
}

/* Card description – MD3 Body Small */
.card-description {
  font-size: var(--md-body-sm);
  line-height: 1.5;
  letter-spacing: 0.4px;
}

/* Location button – Electric Lime CTA (GE Vernova accent) */
.card-location-btn {
  height: 32px;
  border-radius: var(--md-shape-sm);
  padding: 0 12px;
  font-size: var(--md-label-md);
  font-weight: 700;
  letter-spacing: 0.1px;
  gap: 4px;
  display: inline-flex;
  align-items: center;
  background: #C7FF05;   /* Electric Lime */
  color: #000000;        /* Black text – required on Lime */
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px rgba(199,255,5,0.3);
}

.card-location-btn:active {
  background: #b0e500;
  transform: none;
  box-shadow: none;
}

/* Location icon */
.card-location-btn .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* Live badge – Electric Lime (GE Vernova accent) */
.live-badge {
  height: 24px;
  border-radius: var(--md-shape-sm);
  padding: 0 8px;
  font-size: var(--md-label-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #C7FF05;   /* Electric Lime */
  color: #000000;        /* Black text on lime */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
}

/* ── MD3 Timeline Group Header ───────────────────────────── */
.timeline-group-header {
  font-size: var(--md-label-sm);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

/* ── MD3 Section Title ───────────────────────────────────── */
.section-title {
  font-size: var(--md-headline-sm);
  font-weight: 400;
  letter-spacing: 0;
}

.section-count {
  font-size: var(--md-label-md);
  background: color-mix(in srgb, var(--color-surface) 78%, var(--color-primary) 22%);
  border: none;
  color: var(--color-primary);
  font-weight: 600;
}

/* ── MD3 Accordion / List items ──────────────────────────── */
.accordion-item {
  border-radius: var(--md-shape-lg);
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
}

.accordion-header {
  padding: 16px var(--space-4);
  /* MD3 state layer */
  position: relative;
  overflow: hidden;
}

.accordion-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.accordion-header:active::after {
  opacity: 0.08;
}

.accordion-label {
  font-size: var(--md-title-md);
  font-weight: 500;
  letter-spacing: 0.15px;
}

.accordion-icon {
  font-size: 22px;
}

.accordion-chevron {
  font-size: 20px;
  color: var(--color-text-muted);
}

/* FAQ items */
.faq-question {
  font-size: var(--md-body-md);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.faq-answer {
  font-size: var(--md-body-sm);
  letter-spacing: 0.4px;
}

/* ── MD3 Contact List Item ───────────────────────────────── */
.contact-item {
  border-radius: var(--md-shape-md);
  border: none;
  background: color-mix(in srgb, var(--color-surface) 85%, var(--color-primary) 15%);
}

/* MD3 Extended FAB style for call button */
.contact-call-btn {
  height: 40px;
  border-radius: var(--md-shape-sm);
  padding: 0 16px;
  font-size: var(--md-label-lg);
  font-weight: 600;
  letter-spacing: 0.1px;
  gap: 6px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(22,163,74,0.3);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.contact-call-btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* ── MD3 Map Controls ────────────────────────────────────── */
.map-zoom-controls {
  gap: var(--space-2);
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.zoom-btn:active {
  transform: scale(0.92);
  background: var(--md-state-pressed);
  box-shadow: none;
}

.map-reset-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-md);
  background: color-mix(in srgb, var(--color-surface) 78%, var(--color-primary) 22%);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  border: none;
  font-size: 18px;
}

/* MD3 Tooltip card */
.map-tooltip {
  border-radius: var(--md-shape-lg);
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
}

.map-tooltip-title {
  font-size: var(--md-title-md);
  font-weight: 600;
  letter-spacing: 0.15px;
}

.map-tooltip-desc {
  font-size: var(--md-body-sm);
  letter-spacing: 0.4px;
}

.map-tooltip-goto {
  height: 36px;
  border-radius: var(--md-shape-sm);
  padding: 0 16px;
  font-size: var(--md-label-lg);
  font-weight: 600;
  letter-spacing: 0.1px;
  background: color-mix(in srgb, var(--color-surface) 78%, var(--color-primary) 22%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Location list items */
.location-item-name {
  font-size: var(--md-body-md);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.location-item-desc {
  font-size: var(--md-body-sm);
  letter-spacing: 0.4px;
}

/* ── MD3 Splash ──────────────────────────────────────────── */
.splash-logo {
  width: 64px;
  height: 64px;
  filter: brightness(0) invert(1);
  overflow: hidden;
  padding: 1px;
}

.splash-title {
  font-size: var(--md-headline-md);
  font-weight: 400;
  letter-spacing: 0;
}

.splash-sub {
  font-size: var(--md-body-lg);
  letter-spacing: 0.5px;
}

/* ── MD3 Empty State ─────────────────────────────────────── */
.empty-state .empty-icon {
  font-size: 56px;
}

.empty-state p {
  font-size: var(--md-body-lg);
  font-weight: 500;
}

/* ── MD3 Location Badge ──────────────────────────────────── */
.location-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-md);
}

/* ── MD3 Ripple for nav items ────────────────────────────── */
.nav-item {
  position: relative;
  overflow: hidden;
}

/* nav-item tap ripple – only on :active, very subtle */
.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 0;
}

.nav-item:active::after {
  opacity: 0.06;
}

/* ── Theme Switcher MD3 overrides ────────────────────────── */
.theme-switcher-toggle {
  /* MD3 FAB Small */
  border-radius: var(--md-shape-lg);
  background: color-mix(in srgb, var(--color-surface) 78%, var(--color-primary) 22%);
  border: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1);
  color: var(--color-primary);
}

.theme-switcher-toggle:active {
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.theme-panel {
  border-radius: var(--md-shape-xl);
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
}

.theme-option {
  border-radius: var(--md-shape-md);
}

/* ── MD3 Offline Banner ──────────────────────────────────── */
.offline-banner {
  font-size: var(--md-label-lg);
  font-weight: 600;
  letter-spacing: 0.1px;
  background: #C7FF05 !important;  /* Electric Lime – GE Vernova brand */
  color: #000000 !important;        /* Fekete szöveg (WCAG kontraszt) */
  padding: 10px var(--space-4);
}

/* ────────────────────────────────────────────────────────────
   MD3 PER-THEME variable adjustments
   ──────────────────────────────────────────────────────────── */

/* Default theme – GE Vernova Evergreen MD3 */
:root {
  --color-primary:        #005E60;   /* Evergreen */
  --color-primary-light:  #007b7e;
  --color-primary-dark:   #004345;
  --color-accent:         #C7FF05;   /* Electric Lime */
  --md-elev-1: rgba(0, 94, 96, 0.05);
  --md-elev-2: rgba(0, 94, 96, 0.08);
  --md-elev-3: rgba(0, 94, 96, 0.11);
  --md-state-hover:   rgba(0, 94, 96, 0.08);
  --md-state-pressed: rgba(0, 94, 96, 0.12);
  --shadow-colored:   0 4px 16px rgba(0, 94, 96, 0.25);
}

/* Nav – white surface with Aqua Haze tint */
.bottom-nav {
  background-color: color-mix(in srgb, #ffffff 92%, #005E60 8%);
}

/* Éjszaka theme MD3 tokens */
[data-theme="ejszaka"] {
  --md-elev-1: rgba(0, 212, 255, 0.05);
  --md-elev-2: rgba(0, 212, 255, 0.08);
  --md-elev-3: rgba(0, 212, 255, 0.11);
  --md-state-hover:   rgba(0, 212, 255, 0.08);
  --md-state-pressed: rgba(0, 212, 255, 0.12);
}

/* Napfény theme MD3 tokens */
[data-theme="napfeny"] {
  --md-elev-1: rgba(124, 58, 237, 0.05);
  --md-elev-2: rgba(124, 58, 237, 0.08);
  --md-elev-3: rgba(124, 58, 237, 0.11);
  --md-state-hover:   rgba(124, 58, 237, 0.08);
  --md-state-pressed: rgba(124, 58, 237, 0.12);
}

/* Minimal theme MD3 tokens */
[data-theme="minimal"] {
  --md-elev-1: rgba(249, 115, 22, 0.04);
  --md-elev-2: rgba(249, 115, 22, 0.07);
  --md-elev-3: rgba(249, 115, 22, 0.10);
  --md-state-hover:   rgba(0, 0, 0, 0.06);
  --md-state-pressed: rgba(0, 0, 0, 0.10);
}

[data-theme="minimal"] .app-header {
  background-color: #111111;
  border-bottom: none;
  border-bottom: 3px solid #005E60; /* GE sötétzöld */
}

[data-theme="minimal"] .header-logo {
  filter: brightness(0) invert(1); /* White logo on black header */
}

[data-theme="minimal"] .header-title h1 {
  color: #ffffff;
}

[data-theme="minimal"] .header-title .header-date {
  color: rgba(255,255,255,0.6);
}

[data-theme="minimal"] .header-time {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}

/* Éjszaka: logo white */
[data-theme="ejszaka"] .header-logo {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
