/* castinglab v126.225 — HOME navigation breakpoint ownership.
   One shared header DOM is used at every width. Only its action group changes.
   Existing IDs, routes, authentication and click handlers remain untouched. */

/* Mobile: the approved top header and five-item bottom navigation own the UI. */
@media (max-width:767px){
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    height:64px!important;
    padding:0 15px!important;
    overflow:visible!important;
  }
  html.cl-v1-home-boot .header .brand,
  body.cl-v1-home-active .header .brand{
    min-width:0!important;
    flex:0 1 auto!important;
  }
  html.cl-v1-home-boot .header .brand .brand-desktop,
  body.cl-v1-home-active .header .brand .brand-desktop,
  html.cl-v1-home-boot .header .cl-v1-brand-tag,
  body.cl-v1-home-active .header .cl-v1-brand-tag,
  html.cl-v1-home-boot .header>.header-actions,
  body.cl-v1-home-active .header>.header-actions{
    display:none!important;
  }
  html.cl-v1-home-boot .header .brand .brand-mobile,
  body.cl-v1-home-active .header .brand .brand-mobile{
    display:block!important;
  }
  html.cl-v1-home-boot .mobile-header-actions,
  body.cl-v1-home-active .mobile-header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    min-width:0!important;
    margin-left:auto!important;
  }
  html.cl-v1-home-boot .cl-language-switcher.cl-language-mobile,
  body.cl-v1-home-active .cl-language-switcher.cl-language-mobile{
    display:inline-flex!important;
    flex:0 1 auto!important;
    min-width:0!important;
  }
  html.cl-v1-home-boot #mobileSignup,
  html.cl-v1-home-boot #mobileMy,
  html.cl-v1-home-boot #mobileMenu,
  body.cl-v1-home-active #mobileSignup,
  body.cl-v1-home-active #mobileMy,
  body.cl-v1-home-active #mobileMenu{
    display:none!important;
  }
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) .mobile-header-actions #mobileMenu,
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .mobile-header-actions #mobileMenu{
    display:none!important;
  }
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) #mobileLogin{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.cl-v1-home-active.cl-v1-signed-in #mobileLogin{
    display:none!important;
  }
  html.cl-v1-home-boot .bottom,
  body.cl-v1-home-active .bottom{
    display:grid!important;
  }
}

/* Tablet / small PC: no bottom navigation and no second/mobile header group. */
@media (min-width:768px){
  html.cl-v1-home-boot .app,
  body.cl-v1-home-active .app{
    padding-bottom:0!important;
  }
  html.cl-v1-home-boot #clV1Home,
  body.cl-v1-home-active #clV1Home{
    padding-bottom:64px!important;
  }
  html.cl-v1-home-boot .bottom,
  body.cl-v1-home-active .bottom{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    height:74px!important;
    padding:0 clamp(18px,3vw,32px)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:18px!important;
    overflow:visible!important;
  }
  html.cl-v1-home-boot .header .brand,
  body.cl-v1-home-active .header .brand{
    min-width:0!important;
    flex:0 1 auto!important;
  }
  html.cl-v1-home-boot .header .brand .brand-mobile,
  body.cl-v1-home-active .header .brand .brand-mobile,
  html.cl-v1-home-boot .header .cl-v1-brand-tag,
  body.cl-v1-home-active .header .cl-v1-brand-tag,
  html.cl-v1-home-boot .mobile-header-actions,
  body.cl-v1-home-active .mobile-header-actions{
    display:none!important;
  }
  html.cl-v1-home-boot .header .brand .brand-desktop,
  body.cl-v1-home-active .header .brand .brand-desktop{
    display:block!important;
    white-space:nowrap!important;
  }
  html.cl-v1-home-boot .header>.header-actions,
  body.cl-v1-home-active .header>.header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    min-width:0!important;
    flex:0 0 auto!important;
    margin-left:auto!important;
  }
  html.cl-v1-home-boot .header>.header-actions .circle,
  body.cl-v1-home-active .header>.header-actions .circle,
  html.cl-v1-home-boot .cl-language-switcher.cl-language-mobile,
  body.cl-v1-home-active .cl-language-switcher.cl-language-mobile{
    display:none!important;
  }
  html.cl-v1-home-boot .cl-language-switcher.cl-language-desktop,
  body.cl-v1-home-active .cl-language-switcher.cl-language-desktop{
    display:inline-flex!important;
    min-width:0!important;
  }
  body.cl-v1-home-active .cl-language-switcher.cl-language-desktop .cl-lang-trigger{
    max-width:170px!important;
  }
  body.cl-v1-home-active .cl-language-switcher.cl-language-desktop .cl-lang-globe{
    display:inline-block!important;
    width:17px!important;
    height:17px!important;
    flex:0 0 17px!important;
    font-size:0!important;
    background-repeat:no-repeat!important;
    background-position:center!important;
    background-size:17px 17px!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555b64' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.3 2.5 3.5 5.5 3.5 9S14.3 18.5 12 21M12 3C9.7 5.5 8.5 8.5 8.5 12S9.7 18.5 12 21'/%3E%3C/svg%3E")!important;
  }
  html.cl-v1-home-boot #openDrawer,
  body.cl-v1-home-active:not(.cl-v1-auth-ready) .header>.header-actions #openDrawer,
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) .header>.header-actions #openDrawer,
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .header>.header-actions #openDrawer{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-direction:column!important;
    flex:0 0 38px!important;
    gap:4px!important;
  }
  html.cl-v1-home-boot .cl-v1-desktop-login,
  html.cl-v1-home-boot .cl-nav-home-my-v12692,
  body.cl-v1-home-active:not(.cl-v1-auth-ready) .cl-v1-desktop-login,
  body.cl-v1-home-active:not(.cl-v1-auth-ready) .cl-nav-home-my-v12692,
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .cl-v1-desktop-login,
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) .cl-nav-home-my-v12692{
    display:none!important;
  }
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) .cl-v1-desktop-login,
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .cl-nav-home-my-v12692{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
  }
  html.cl-v1-home-boot .cl-nav-chat-v12692,
  body.cl-v1-home-active .cl-nav-chat-v12692{
    display:none!important;
  }
}

/* Wider tablets may retain Chat after the required brand/language/MY/menu items. */
@media (min-width:960px) and (max-width:1199px){
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .cl-nav-chat-v12692{
    display:inline-flex!important;
    width:auto!important;
    min-width:0!important;
    height:38px!important;
    align-items:center!important;
    gap:6px!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .cl-nav-chat-v12692::after{
    content:attr(aria-label);
    white-space:nowrap;
  }
}

/* Desktop: restore the slogan and Chat while retaining one login/MY control. */
@media (min-width:1200px){
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    height:82px!important;
    padding:0 clamp(28px,4vw,52px)!important;
  }
  html.cl-v1-home-boot .header .cl-v1-brand-tag,
  body.cl-v1-home-active .header .cl-v1-brand-tag{
    display:block!important;
  }
  html.cl-v1-home-boot .cl-nav-chat-v12692,
  body.cl-v1-home-active .cl-nav-chat-v12692{
    display:inline-flex!important;
    width:auto!important;
    min-width:0!important;
    height:38px!important;
    align-items:center!important;
    gap:6px!important;
    padding:0 5px!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  html.cl-v1-home-boot .cl-nav-chat-v12692::after,
  body.cl-v1-home-active .cl-nav-chat-v12692::after{
    content:attr(aria-label);
    white-space:nowrap;
  }
}

/* castinglab v126.226 — HOME header detail alignment/auth polish.
   Scope: visual/header-state only. No routes, auth handlers, DB, or feature logic changed. */

/* Tablet / small PC: align the header's outer edges with the LIVE bar.
   Base main padding (16px) + HOME shell padding (28px) = 44px. */
@media (min-width:768px) and (max-width:1023px){
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    padding-left:44px!important;
    padding-right:44px!important;
  }
}

/* Compact PC: desktop-layout.css uses 30px main padding through 1180px.
   30px main + 28px HOME shell = 58px. */
@media (min-width:1024px) and (max-width:1180px){
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    padding-left:58px!important;
    padding-right:58px!important;
  }
}

/* Wide PC: 52px main + 28px HOME shell = 80px until the 1180px HOME shell centers.
   #clV1Home uses border-box sizing, so the centered max-width geometry is based on 1124px
   after accounting for main/HOME padding. */
@media (min-width:1181px){
  html.cl-v1-home-boot .header,
  body.cl-v1-home-active .header{
    padding-left:max(80px,calc((100% - 1124px)/2))!important;
    padding-right:max(80px,calc((100% - 1124px)/2))!important;
  }
}

/* Desktop wordmark + slogan: bottom-align the slogan and give it breathing room. */
@media (min-width:1200px){
  html.cl-v1-home-boot .header .brand,
  body.cl-v1-home-active .header .brand{
    align-items:flex-end!important;
  }
  html.cl-v1-home-boot .header .cl-v1-brand-tag,
  body.cl-v1-home-active .header .cl-v1-brand-tag{
    margin-top:0!important;
    margin-left:28px!important;
    margin-bottom:1px!important;
    align-self:flex-end!important;
  }

  /* Chat is a signed-in utility. Never show it before auth resolves or while logged out. */
  html.cl-v1-home-boot .cl-nav-chat-v12692,
  body.cl-v1-home-active:not(.cl-v1-auth-ready) .cl-nav-chat-v12692,
  body.cl-v1-home-active.cl-v1-auth-ready:not(.cl-v1-signed-in) .cl-nav-chat-v12692{
    display:none!important;
  }
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .cl-nav-chat-v12692{
    display:inline-flex!important;
  }
}

/* castinglab v126.230 — mobile signed-in menu restore + bottom bar transparency.
   Scope is intentionally limited to HOME mobile navigation visuals only. */
@media (max-width:767px){
  /* Keep the hamburger hidden while signed out; restore it once auth confirms a session. */
  body.cl-v1-home-active.cl-v1-auth-ready.cl-v1-signed-in .mobile-header-actions #mobileMenu{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
  }

  /* 15% white background opacity only; icons/text retain their existing opacity. */
  html.cl-v1-home-boot .bottom,
  body.cl-v1-home-active .bottom{
    background:rgba(255,255,255,.15)!important;
  }
}
