/* Shared Vizasound user-site shell. The normal application canvas stays dark;
   pages opt into a visual canvas variant instead of changing every legacy
   component's contrast treatment. */
:root {
  --site-header-height: 72px;
  --site-shell-text: #f7f7fb;
  --site-shell-muted: rgba(255, 255, 255, .68);
  --site-shell-line: rgba(255, 255, 255, .12);
  --site-shell-surface: rgba(8, 11, 18, .64);
}

body.site-shell {
  /* Keep every pre-existing user-site layout, rail, popover, and viewport
     calculation aligned with the shared header without changing admin pages. */
  --header-height-desktop: 72px;
  --header-height-mobile: 58px;
  --body-bg: #08090c;
  background: #08090c;
  background-color: #08090c;
  color: var(--site-shell-text);
}

/* Explicit visual variant for the logged-out marketing home and auth pages.
   Do not apply this to the general signed-in application without a dedicated
   component contrast pass. */
body.site-shell.page-canvas--gradient {
  background:
    radial-gradient(circle at 50% 18%, rgba(77, 130, 255, .42), transparent 420px),
    radial-gradient(circle at 25% 12%, rgba(43, 111, 255, .24), transparent 460px),
    radial-gradient(circle at 76% 24%, rgba(123, 85, 246, .24), transparent 460px),
    linear-gradient(135deg, #061835 0%, #091221 42%, #140d2c 72%, #08090c 100%);
  background-color: #08090c;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--site-shell-text);
}

body.site-shell:not(.marketing-page) {
  padding-top: var(--site-header-height);
}

.site-shell .fixed-header {
  height: var(--site-header-height);
  padding: 0 clamp(14px, 3vw, 44px);
  background: var(--site-shell-surface);
  border-bottom: 1px solid var(--site-shell-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-shell .logo-link { margin-right: 1rem; }
.site-shell .logo { height: 40px; width: auto; }
.site-shell .header-controls { gap: .65rem; }
.site-shell .desktop-nav { gap: .55rem; }

.site-shell .language-icon,
.site-shell .header-signin-link,
.site-shell .header-primary-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.site-shell .language-icon {
  width: 44px;
  padding: 0;
  color: rgba(255, 255, 255, .72);
  border: 0;
  background: transparent;
}

.site-shell .header-signin-link {
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .94);
}

.site-shell .header-primary-cta {
  padding: 0 24px;
  border: 1px solid transparent;
  background: #f7f4ef;
  color: #111216;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.site-shell .header-primary-cta:hover,
.site-shell .header-primary-cta:focus-visible {
  color: #111216 !important;
  background: #fff;
  transform: translateY(-1px);
}

.site-shell .header-signin-link:hover,
.site-shell .header-signin-link:focus-visible,
.site-shell .language-icon:hover,
.site-shell .language-icon:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .32);
}

.site-shell .header-desktop-search-form {
  height: 42px;
  background: rgba(5, 8, 15, .5);
  border-color: rgba(148, 163, 184, .52);
}

.site-shell .site-footer {
  margin-top: auto;
  padding: 2rem clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--site-shell-line);
  background: transparent;
  color: var(--site-shell-muted);
}

.site-shell .site-footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.site-shell .site-footer .footer-copy { order: 3; justify-self: auto; color: rgba(255, 255, 255, .56); }
.site-shell .site-footer .social-icons { order: 1; justify-self: auto; display: flex; gap: 12px; }
.site-shell .site-footer .footer-links { order: 2; justify-self: auto; text-align: center; display: block; }
.site-shell .site-footer .footer-links a { color: rgba(255, 255, 255, .74); }

/* Dialog backdrops cover the complete viewport. The fixed header remains above
   them, so a dialog can never leave a stale header-height strip uncovered. */
@media (min-width: 769px) {
  .site-shell .advanced-filter-overlay,
  .site-shell .media-menu-overlay {
    inset: 0;
    min-height: 100dvh;
    /* Backdrop is full-screen, but the sheet centers in the safe region below
       the fixed header so its title and close control cannot be obscured. */
    padding: calc(var(--header-height-desktop) + 1.25rem) 1.25rem 1.25rem;
    align-items: center;
  }

  .site-shell .advanced-filter-sheet,
  .site-shell .media-menu-overlay .media-menu-sheet,
  .site-shell .notifications-sheet {
    max-height: min(calc(100dvh - var(--header-height-desktop) - 2.5rem), 920px);
  }
}

/* The marketing profile intentionally omits main.css, so it needs only this
   compact responsive treatment for the shared header and its mobile menu. */
/* The landing content supplies its own tokenized header offset. Giving the
   body one as well creates a duplicate header-height band above the hero. */
body.marketing-page { padding-top: 0; min-height: 100vh; }
.marketing-page .fixed-header { position: fixed; top: 0; left: 0; right: 0; z-index: 4000; display: flex; align-items: center; }
.marketing-page .logo-link { display: inline-flex; align-items: center; }
.marketing-page .logo-mobile-icon { display: none; }
.marketing-page .header-controls { margin-left: auto; display: flex; align-items: center; }
.marketing-page .desktop-nav { display: flex; align-items: center; }
.marketing-page .hamburger-icon { display: none; }
.marketing-page .generic-popup { display: none; }

@media (max-width: 768px) {
  body.site-shell {
    --site-header-height: 58px;
    --header-height-desktop: 58px;
    --header-height-mobile: 58px;
  }
  .site-shell .fixed-header { padding: 0 14px; }
  .site-shell .logo { height: 34px; }
  /* The shared header is now 58px high on phones. Keep the search field
     visually balanced inside it while preserving the surrounding header hit area. */
  .site-shell .header-mobile-search-form { height: 32px; }
  .site-shell .desktop-nav { display: none; }
  .site-shell .hamburger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 1.2rem;
  }
  .site-shell .generic-popup.menu-popup.active {
    display: block;
    position: fixed;
    inset: var(--site-header-height) 0 0;
    z-index: 4500;
    overflow-y: auto;
    padding: 1.2rem;
    background: rgba(7, 10, 18, .98);
    color: #fff;
  }
  /* Keep the signed-in identity at the left and the close control at the
     opposite edge; the shared mobile shell must not collapse them together. */
  .site-shell .mobile-menu-header { display: flex; justify-content: space-between; }
  .site-shell .mobile-menu-profile--empty { display: none; }
  .site-shell .mobile-menu-close-icon { border: 0; background: transparent; color: #fff; font-size: 1.35rem; }
  .site-shell .mobile-menu-sections { display: grid; gap: 1.2rem; }
  .site-shell .mobile-menu-section-label { color: rgba(255,255,255,.55); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
  .site-shell .menu-list { list-style: none; margin: .45rem 0 0; padding: 0; }
  .site-shell .menu-list li { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; }
  .site-shell .menu-list a { color: #fff; text-decoration: none; }
  .site-shell .site-footer { padding: 1.75rem 16px; }
  .site-shell .site-footer .social-icons.hide-mobile { display: flex !important; }
}
