/**
 * Final cascade layer — only rules that must win over settings-bridge / admin tokens.
 * Section-specific layout fixes live in their source stylesheets.
 */

:root {
  --hero-neon-glitch-cycle: 2s;
  --section-content-button-gap: 32px;
}

@media (max-width: 760px) {
  :root {
    --section-content-button-gap: 24px;
  }
}

html body:not(.dashboard-app-body) {
  --hero-neon-glitch-cycle: var(--ed-hero-brand-neon-glitch-cycle, var(--hero-brand-neon-glitch-cycle, 2s));
}

/* Booking calendar availability dots */
body:not(.dashboard-app-body) .booking-step-panel .booking-calendar-day.is-limited .booking-calendar-day-status {
  color: #ffb347;
}

body:not(.dashboard-app-body) .booking-step-panel .booking-calendar-day.is-unavailable .booking-calendar-day-status {
  color: #ff4d4d;
}

body:not(.dashboard-app-body) .booking-step-panel .booking-calendar,
body:not(.dashboard-app-body) .booking-step-panel .booking-date-time-panel .booking-calendar {
  border-radius: 20px;
}

body:not(.dashboard-app-body) .booking-step-panel .booking-calendar-day {
  border-radius: 14px;
}

/* Hero neon brand — wide geometric logo typography (Design System C style via Orbitron) */
html[lang="el"] body:not(.dashboard-app-body) .hero-neon-brand-title,
html[lang="el"] body:not(.dashboard-app-body) .hero-neon-brand-title .hero-neon-part,
html[lang="en"] body:not(.dashboard-app-body) .hero-neon-brand-title,
html[lang="en"] body:not(.dashboard-app-body) .hero-neon-brand-title .hero-neon-part,
html body:not(.dashboard-app-body) main.site-main[data-site-route="home"] .hero-neon-brand-title,
html body:not(.dashboard-app-body) .hero-neon-brand-title,
html body.preview-editor-mode .hero-neon-brand-title {
  font-family: var(--font-orbitron, var(--font-neon)), Arial Narrow, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  line-height: 0.95 !important;
}

html body:not(.dashboard-app-body) .hero-neon-brand-wrap--live .hero-neon-brand-inner::before,
html body:not(.dashboard-app-body) .hero-neon-brand-wrap--live .hero-neon-brand-inner::after,
html body.preview-editor-mode .hero-neon-brand-wrap--live .hero-neon-brand-inner::before,
html body.preview-editor-mode .hero-neon-brand-wrap--live .hero-neon-brand-inner::after {
  font-family: var(--font-orbitron, var(--font-neon)), Arial Narrow, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  line-height: 0.95 !important;
}

@media (max-width: 760px) {
  html[lang="el"] body:not(.dashboard-app-body) .hero-neon-brand-title,
  html[lang="el"] body:not(.dashboard-app-body) .hero-neon-brand-title .hero-neon-part,
  html body:not(.dashboard-app-body) .hero-neon-brand-title,
  html body.preview-editor-mode .hero-neon-brand-title {
    letter-spacing: 0.02em !important;
    line-height: 0.95 !important;
  }
}

html body:not(.dashboard-app-body) .legal-page-flow .legal-content-card.premium-glass--panel {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body:not(.dashboard-app-body) .legal-page-flow .legal-content-card.premium-glass--panel::before,
html body:not(.dashboard-app-body) .legal-page-flow .legal-content-card.premium-glass--panel::after {
  display: none !important;
  content: none !important;
}

@media (min-width: 768px) {
  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row {
    align-items: stretch !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-left,
  html body:not(.dashboard-app-body) .bmi-section .bmi-right {
    align-self: stretch !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-form,
  html body:not(.dashboard-app-body) .bmi-section .bmi-table-wrap {
    height: 100% !important;
    min-height: 100% !important;
    margin-top: 0 !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row .bmi-left,
  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row .bmi-right {
    align-items: stretch !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row .bmi-form,
  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row .bmi-table-wrap {
    flex: 1 1 auto !important;
    align-self: stretch !important;
  }
}

@media (max-width: 767px) {
  html body:not(.dashboard-app-body) .bmi-section .bmi-workspace-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: clamp(14px, 3vw, 18px) !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-left,
  html body:not(.dashboard-app-body) .bmi-section .bmi-right {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  html body:not(.dashboard-app-body) .bmi-section .bmi-form,
  html body:not(.dashboard-app-body) .bmi-section .bmi-table-wrap,
  html body:not(.dashboard-app-body) .bmi-section .bmi-left .bmi-form {
    width: 100% !important;
    max-width: 100% !important;
    min-height: clamp(250px, 58vw, 300px) !important;
    height: clamp(250px, 58vw, 300px) !important;
    max-height: clamp(250px, 58vw, 300px) !important;
    flex: 0 0 auto !important;
  }
}

html body:not(.dashboard-app-body) .legal-page-heading-row .legal-page-heading-title {
  text-align: left !important;
}

html body:not(.dashboard-app-body) .bmi-section .bmi-form {
  justify-items: stretch !important;
  text-align: left !important;
}

html body:not(.dashboard-app-body) .bmi-section .bmi-input-group {
  align-items: flex-start !important;
  text-align: left !important;
}

html body:not(.dashboard-app-body) .bmi-section .bmi-input-group label {
  text-align: left !important;
  width: auto !important;
}

html body:not(.dashboard-app-body) .programs-section .programs-grid + .programs-intro-actions,
html body:not(.dashboard-app-body) .gym-gallery-section .gym-gallery-showcase-layout + .gym-gallery-actions,
html body:not(.dashboard-app-body) .about-home-spotlight__visual .about-actions {
  display: flex !important;
  justify-content: center !important;
  margin-top: var(--section-content-button-gap) !important;
}

html body:not(.dashboard-app-body) .programs-section .programs-intro-actions {
  justify-content: center !important;
}

html body:not(.dashboard-app-body) .partnerships-section .partner-logo-scroll + .partnerships-container,
html body:not(.dashboard-app-body) .partnerships-section > .partnerships-container + .partnerships-container {
  margin-top: var(--section-content-button-gap) !important;
}

html body:not(.dashboard-app-body) .partnerships-section .partnerships-cta-wrap {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html body:not(.dashboard-app-body) :is(
  .programs-grid + .programs-intro-actions .programs-button,
  .partnerships-cta-wrap .partnerships-cta,
  .about-home-spotlight__visual .about-actions .about-cta,
  .about-home-spotlight__visual .about-actions .btn,
  .gym-gallery-actions .gym-gallery-button,
  .gym-gallery-actions .btn
) {
  margin-top: 0 !important;
}

html body:not(.dashboard-app-body) .about-home-spotlight__visual {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

@media (max-width: 760px) {
  html body:not(.dashboard-app-body) .programs-section .programs-grid + .programs-intro-actions,
  html body:not(.dashboard-app-body) .gym-gallery-section .gym-gallery-showcase-layout + .gym-gallery-actions,
  html body:not(.dashboard-app-body) .about-home-spotlight__visual .about-actions,
  html body:not(.dashboard-app-body) .partnerships-section .partner-logo-scroll + .partnerships-container,
  html body:not(.dashboard-app-body) .partnerships-section > .partnerships-container + .partnerships-container {
    margin-top: var(--section-content-button-gap) !important;
  }
}

/* iOS Safari: inputs below 16px trigger focus zoom — keep position stable */
@media (max-width: 767px) {
  html body:not(.dashboard-app-body) :is(
    .bmi-section .calc-number-input,
    .bmi-section .bmi-input-group input,
    .strength-section .strength-input,
    .strength-section .strength-exercise-trigger,
    .strength-exercise-picker-search,
    .booking-step-panel input.booking-field-input,
    .booking-step-panel textarea.booking-field-input,
    .booking-step-panel .booking-phone-code-toggle,
    .get-in-touch-form input,
    .get-in-touch-form textarea,
    .get-in-touch-form select,
    .get-in-touch-section input,
    .get-in-touch-section textarea,
    .get-in-touch-section select
  ) {
    font-size: 16px !important;
  }
}

/* Center scroll targets under fixed header */
html body:not(.dashboard-app-body) :is(
  [data-calc-scroll-target],
  [data-strength-result-panel],
  [data-booking-app]
) {
  scroll-margin-top: clamp(80px, 12vh, 120px);
  scroll-margin-bottom: clamp(24px, 6vh, 48px);
}
