/* Site-wide member search and Discord account dropdown. */
/* Keep legacy header Admin anchors in the DOM for page-specific scripts, but
   show Admin only inside the verified account dropdown. */
.hub-header #adminButton,.hub-header #announcementsAdminButton,.hub-header [data-creator-resource-admin],.site-header #adminButton,.site-header [data-creator-resource-admin]{display:none!important}
.hub-header #logoutButton,.hub-header #announcementsLogoutButton,.hub-header [data-creator-resource-signout],.hub-header .hub-header-actions>#logoutButton,.hub-header .hub-header-actions>[id=logoutButton]{display:none!important}
.collective-account-search{position:relative;flex:0 1 244px;min-width:132px;max-width:260px;z-index:140}
.collective-account-search input{appearance:none;width:100%;height:39px;min-width:0;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.055);border-radius:11px;color:#fff;outline:none;font:inherit;font-size:12px;padding:0 13px 0 35px;transition:border-color .2s,background .2s}
.collective-account-search input::placeholder{color:#a6a6aa}.collective-account-search input:focus{border-color:rgba(240,68,90,.75);background:rgba(255,255,255,.095)}
.collective-account-search .cas-search-icon{position:absolute;left:11px;top:11px;width:16px;height:16px;color:#bdc0c5;pointer-events:none}
.cas-results{position:absolute;top:calc(100% + 9px);right:0;left:0;z-index:210;min-width:240px;max-height:min(420px,60vh);overflow-y:auto;padding:7px;border:1px solid rgba(255,255,255,.16);background:#131317;box-shadow:0 16px 50px #000a;border-radius:14px}
.cas-results[hidden]{display:none!important}.cas-result{display:flex;align-items:center;gap:11px;padding:9px 8px;border-radius:9px;color:white;text-decoration:none;min-width:0}.cas-result:hover,.cas-result:focus-visible{background:#2c2025;outline:2px solid #e44356;outline-offset:-2px}
.cas-result span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650}.cas-hint{margin:4px 7px;padding:8px 4px;color:#afb0b5;font-size:12px;line-height:1.4}
.cas-avatar-wrap{position:relative;display:inline-flex;flex-shrink:0;width:35px;height:35px;align-items:center;justify-content:center}.cas-avatar{width:100%;height:100%;border-radius:50%;object-fit:cover;background:#25252b}.cas-flare{position:absolute;inset:-18%;width:136%;height:136%;object-fit:contain;pointer-events:none}
.cas-account{position:relative;display:none;flex:0 0 auto;z-index:150}.cas-account[data-signed-in=true]{display:block}.cas-account-trigger{appearance:none;display:grid;place-items:center;width:43px;height:43px;border-radius:13px;border:1px solid rgba(255,255,255,.23);background:linear-gradient(140deg,#302027,#1a1a1f);cursor:pointer;transition:box-shadow .18s,border-color .18s,transform .18s}.cas-account-trigger:hover{border-color:#f3556b;box-shadow:0 0 0 4px rgba(225,43,71,.12);transform:translateY(-1px)}.cas-account-trigger:focus-visible{outline:2px solid #fff;outline-offset:3px}.cas-account-trigger .cas-avatar-wrap{width:31px;height:31px}
.cas-menu{position:absolute;right:0;top:calc(100% + 9px);width:216px;padding:8px;border:1px solid rgba(255,255,255,.17);border-radius:14px;background:#161619;box-shadow:0 15px 44px rgba(0,0,0,.66)}.cas-menu[hidden]{display:none!important}.cas-menu-user{padding:10px 10px 12px;border-bottom:1px solid #ffffff22;font-size:12px;font-weight:750;color:white;overflow-wrap:anywhere}.cas-menu a,.cas-menu button{display:flex;align-items:center;width:100%;padding:12px 10px;border:0;border-radius:8px;background:transparent;color:#f5f5f6;text-decoration:none;text-align:left;font:inherit;font-size:13px;cursor:pointer}.cas-menu a:hover,.cas-menu button:hover{background:#ffffff13}.cas-menu button{color:#f77b89}.cas-menu .cas-error{color:#f5b1bb;font-size:11px;padding:6px 10px}
.hub-header .hub-header-actions,.site-header .header-actions{min-width:0}.hub-header .hub-header-actions>.collective-account-search{margin-left:3px}
@media(max-width:900px){.collective-account-search{max-width:195px}.hub-header .hub-header-actions{gap:5px}}
@media(max-width:620px){.hub-header,.site-header{gap:6px}.collective-account-search{flex:0 1 140px;min-width:94px}.collective-account-search input{height:36px;font-size:11px;padding-left:29px;padding-right:5px}.collective-account-search .cas-search-icon{left:8px;top:10px;width:13px}.cas-account-trigger{width:38px;height:38px;border-radius:11px}.cas-account-trigger .cas-avatar-wrap{width:27px;height:27px}.cas-results{min-width:min(270px,calc(100vw - 25px));left:auto;right:0}.hub-header .hub-brand span{display:none}}
@media(max-width:380px){.collective-account-search{flex-basis:105px;min-width:80px}.collective-account-search input::placeholder{font-size:0}.hub-header .hub-link{font-size:10px!important}}

/* Keep the navigation readable alongside the member lookup. The hub's
   accessibility overflow-wrap:anywhere rule must not split control labels. */
.hub-header{gap:16px}
.hub-header .hub-brand{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}
.hub-header .hub-header-actions{display:flex;flex:0 1 auto;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:10px;min-width:0}
.hub-header .hub-header-actions>.hub-link{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal;word-break:normal;margin-right:0}
.hub-header .hub-header-actions>.hub-button,
.hub-header .hub-header-actions>[data-creator-resource-admin]{flex:0 0 auto;min-width:max-content;white-space:nowrap;overflow-wrap:normal;word-break:normal}
.hub-header .hub-header-actions>.hub-notifications{flex:0 0 auto}
.hub-header .hub-header-actions>.collective-account-search{flex:0 1 244px;min-width:100px;margin-left:2px}
@media(max-width:760px){
  .hub-header{gap:8px;padding-block:8px;align-items:center}
  .hub-header .hub-header-actions{flex:1 1 auto;flex-wrap:wrap;gap:7px;min-width:0}
  /* Place search on a second row rather than compressing navigation controls. */
  .hub-header .hub-header-actions>.collective-account-search{order:20;flex:1 0 100%;max-width:none;min-width:0;margin:0}
  /* Mobile search is overlaid at full HEADER width in the rules below. */
  .hub-header .hub-header-actions>.cas-account{order:10;margin-left:auto}
  .hub-header .hub-header-actions>.hub-button{padding-inline:12px;min-height:38px}
  .hub-header .hub-brand{align-self:flex-start;min-height:38px}
  .hub-header .hub-link{font-size:11px!important}
}
@media(max-width:420px){
  .hub-header .hub-header-actions{gap:5px}
  .hub-header .hub-header-actions>.hub-button{padding-inline:9px;font-size:11px}
  .hub-header .hub-header-actions>.hub-link{font-size:10px!important}
}

/* LANDING HEADER: protect the Discord CTA from the site's mobile anywhere-wrap
   rule, while allowing the other header controls to fit smaller screens. */
body[data-invite-url] .site-header .header-actions>a[data-join-link]{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  gap:8px;white-space:nowrap;overflow-wrap:normal;word-break:normal;min-width:max-content;
  padding-inline:clamp(10px,1.5vw,18px);line-height:1.1;
}
body[data-invite-url] .site-header .landing-join-label{
  display:inline-block;white-space:nowrap;overflow-wrap:normal;word-break:normal;flex:0 0 auto;
}
body[data-invite-url] .site-header .header-actions>a[data-join-link] .discord-button-icon{
  display:block;flex:0 0 14px;width:14px;height:14px;
}
body[data-invite-url] .site-header .header-actions{flex-wrap:nowrap;justify-content:flex-end;}
@media(max-width:430px){
  body[data-invite-url] .site-header .header-actions{gap:6px;}
  body[data-invite-url] .site-header .header-actions>a[data-join-link]{gap:6px;padding-inline:10px;}
}


/* Compact single-row Creator Hub navigation on phones and small tablets.
   Search expands over the page only when requested; no permanent second row. */
.cas-search-toggle{display:none}
@media(max-width:760px){
  .hub-header{height:66px;min-height:66px;gap:8px;padding:0 calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));align-items:center;overflow:visible}
  .hub-header .hub-brand{align-self:center;min-height:0;display:flex;align-items:center;flex:0 0 auto}
  .hub-header .hub-brand img{width:32px;height:32px}
  .hub-header .hub-header-actions{flex:1 1 auto;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:8px;min-width:0}
  .hub-header .hub-header-actions>.hub-link{flex:0 0 auto;display:inline-flex;align-items:center;white-space:nowrap;font-size:11px!important}
  .hub-header .hub-header-actions>.hub-notifications{flex:0 0 auto}
  .hub-header .hub-header-actions>.collective-account-search{position:static;order:5;display:block;flex:0 0 auto;min-width:0;max-width:none;width:40px;margin:0}
  .hub-header .hub-header-actions>.cas-account{order:10;margin-left:0}
  .collective-account-search .cas-search-toggle{display:grid;place-items:center;width:40px;height:40px;padding:0;appearance:none;border-radius:11px;border:1px solid #ffffff2f;background:#ffffff0a;color:#e3e4e9;cursor:pointer}
  .collective-account-search .cas-search-toggle:focus-visible{outline:2px solid #ef5368;outline-offset:2px}
  .collective-account-search .cas-search-toggle[aria-expanded=true]{border-color:#e94c64;background:#e94c6422}
  .collective-account-search .cas-search-toggle svg{display:block;width:19px;height:19px}
  .collective-account-search>.cas-search-icon{display:none}
  .collective-account-search input{display:none;position:absolute;top:calc(100% + 7px);left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));width:auto;height:44px;min-width:0;padding:0 15px;background:#1b1a1e;border:1px solid #ffffff40;box-shadow:0 12px 32px #0008;border-radius:12px;font-size:16px!important;z-index:210}
  .collective-account-search.cas-mobile-open input{display:block}
  .hub-header .hub-header-actions>.collective-account-search.cas-mobile-open input{
    display:block;left:calc(12px + env(safe-area-inset-left));
    right:calc(12px + env(safe-area-inset-right));
    width:calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-width:none;box-sizing:border-box;
  }
  .collective-account-search .cas-results{position:absolute;top:calc(100% + 57px);left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));width:auto;max-width:none;min-width:0;max-height:min(360px,calc(100dvh - 148px));z-index:211}
  .hub-header .hub-notification-icon{width:38px;height:40px;min-height:40px}
  .hub-header .cas-account-trigger{width:40px;height:40px}
}
@media(max-width:380px){
  .hub-header .hub-header-actions{gap:5px}
  .hub-header .hub-header-actions>.hub-link{font-size:10px!important}
  .hub-header .hub-brand img{width:29px;height:29px}
  .hub-header .hub-header-actions>.collective-account-search{width:36px}
  .collective-account-search .cas-search-toggle{width:36px;height:38px}
  .hub-header .hub-notification-icon{width:34px;height:38px;min-height:38px}
  .hub-header .cas-account-trigger{width:38px;height:38px}
}
