/* Orchid v486: resumable conversations, persistent Reel navigation and billing access. */

/* Authenticated Brand workspace: the tabs are the first and only dashboard
   surface below the public header. Older generic `.section` and container
   rules added vertical padding/max-width, which produced the apparent blank
   page before the tabs. Keep the public Brand landing untouched. */
html body.page-brands #brands.brand-dashboard-open {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
html body.page-brands #brands.brand-dashboard-open > .brand-public,
html body.page-brands #brands.brand-dashboard-open > .brand-auth-card,
html body.page-brands #brands.brand-dashboard-open > .brand-dashboard > .brand-dashboard-hero {
  display:none!important;
}
html body.page-brands #brands.brand-dashboard-open > .brand-dashboard:not(.is-hidden) {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}
html body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs {
  position:sticky!important;
  top:var(--orchid-sticky-header-height,76px)!important;
  z-index:190!important;
  display:flex!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:48px!important;
  margin:0!important;
  padding:6px max(12px,4vw)!important;
  border:0!important;
  border-block:1px solid var(--platform-line,#d9ddd9)!important;
  border-radius:0!important;
  background:var(--platform-surface,#fff)!important;
  box-shadow:0 8px 18px rgba(0,0,0,.055)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:thin!important;
}
html body.page-brands #brands.brand-dashboard-open .brand-dashboard-panel {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  margin:0!important;
  padding:clamp(18px,3vw,44px) max(14px,4vw)!important;
  overflow:visible!important;
}
html[data-orchid-theme="dark"] body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs,
html body.page-brands.dark-mode #brands.brand-dashboard-open .brand-dashboard-tabs {
  background:#07150f!important;
  border-color:#183b2e!important;
}

/* The v462 controls were scoped to a retired data revision and positioned
   outside an overflow-clipped stage. Keep the controls inside every active
   immersive viewer so wheel, swipe and explicit Reel navigation agree. */
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__vertical-nav {
  position:absolute!important;
  z-index:40!important;
  left:12px!important;
  top:50%!important;
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  gap:9px!important;
  width:44px!important;
  transform:translateY(-50%)!important;
  pointer-events:auto!important;
}
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__vertical-nav button {
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:50%!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:rgba(0,0,0,.72)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.32)!important;
  font:800 19px/1 Arial,sans-serif!important;
  cursor:pointer!important;
  pointer-events:auto!important;
}
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__vertical-nav button:disabled {
  display:grid!important;
  visibility:visible!important;
  opacity:.48!important;
  cursor:not-allowed!important;
}

.site-footer__billing {display:grid;gap:8px;align-content:start;}
.site-footer__billing strong {font-size:12px;letter-spacing:.08em;text-transform:uppercase;}
.site-footer__billing a {text-decoration:underline;text-underline-offset:4px;}

.public-creator-social-links {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  padding:12px clamp(18px,4vw,52px)!important;
  border-bottom:1px solid var(--line,#d9ddd9)!important;
}
.public-creator-social-links a {
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:38px!important;
  padding:7px 12px!important;
  border:1px solid currentColor!important;
  border-radius:999px!important;
  color:inherit!important;
  text-decoration:none!important;
}
.public-creator-social-links a span {display:grid!important;place-items:center!important;width:20px!important;height:20px!important;font:800 13px/1 Arial,sans-serif!important;}
.public-creator-social-links a strong {font:700 12px/1.2 var(--font-ui,Arial,sans-serif)!important;}

.orchid-contact-request-card {
  overflow:hidden;margin:6px 0 14px;border:1px solid rgba(17,17,17,.09);
  border-radius:20px;background:var(--panel,#fff);box-shadow:0 12px 30px rgba(0,0,0,.08);
  color:var(--ink,#111);
}
.orchid-contact-request-card__bar {height:4px;background:#006349;}
.orchid-contact-request-card>header {display:flex;align-items:flex-start;gap:11px;padding:15px 15px 0;}
.orchid-contact-request-card>header>span:last-child {display:grid;min-width:0;gap:2px;}
.orchid-contact-request-card>header small {color:#006349;font:800 10px/1.25 var(--font-ui,Arial,sans-serif);letter-spacing:.08em;text-transform:uppercase;}
.orchid-contact-request-card>header strong {overflow:hidden;font:750 15px/1.25 var(--font-ui,Arial,sans-serif);text-overflow:ellipsis;white-space:nowrap;}
.orchid-contact-request-card>header em {color:var(--muted,#6f6f6f);font:500 10px/1.3 var(--font-ui,Arial,sans-serif);font-style:normal;}
.orchid-contact-request-card>p {margin:13px 15px;padding:12px 13px;border:1px solid var(--line,#e8e8e6);border-radius:14px;background:color-mix(in srgb,var(--panel,#fff) 86%,#777 14%);font:500 12px/1.5 var(--font-ui,Arial,sans-serif);}
.orchid-contact-request-card>footer {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 15px;padding:0 0 15px;border:0;}
.orchid-contact-request-card>footer>small {color:var(--muted,#6f6f6f);font:500 10px/1.35 var(--font-ui,Arial,sans-serif);}
.orchid-contact-request-card>footer>span {display:flex;gap:7px;}
.orchid-contact-request-card>footer .button {min-height:34px;padding-inline:12px;font-size:10px;}
.orchid-contact-request-card__state,.message-contact-gate {margin:0 15px 15px;padding:10px 12px;border-radius:12px;background:#edf8f4;color:#00533d;font:700 11px/1.4 var(--font-ui,Arial,sans-serif);}
.message-contact-gate {margin:8px 0 0;text-align:center;}
.message-contact-gate.is-declined,.orchid-contact-request-card.is-declined .orchid-contact-request-card__state {background:#fff0ee;color:#8b241b;}

.brand-owner-storefront {min-width:0;margin:18px 0 26px;}
.brand-owner-storefront .os-hero {position:relative;}
.brand-owner-storefront .os-cover {position:relative;}
.brand-owner-edit-cover {position:absolute!important;right:16px;bottom:16px;z-index:2;}
.brand-owner-storefront .os-logo {position:relative;overflow:visible;}
.brand-owner-storefront .os-logo>img,.brand-owner-storefront .os-logo>span {width:100%;height:100%;border-radius:50%;object-fit:cover;overflow:hidden;}
.brand-owner-storefront .os-logo>span {display:grid;place-items:center;background:#000;color:#fff;}
.brand-owner-storefront .os-logo>button {position:absolute;right:-4px;bottom:-4px;display:grid;place-items:center;min-width:42px;min-height:30px;padding:5px 8px;border:3px solid var(--panel,#fff);border-radius:999px;background:#006f52;color:#fff;font:800 10px/1 var(--font-ui,Arial,sans-serif);cursor:pointer;}
.brand-owner-storefront .os-meta button {padding:6px 10px;border:1px solid currentColor;border-radius:999px;background:transparent;color:inherit;font:700 11px/1 var(--font-ui,Arial,sans-serif);cursor:pointer;}
.brand-owner-storefront-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;}
.brand-owner-storefront-product,.brand-owner-storefront-campaign,.brand-owner-storefront-person {min-width:0;overflow:hidden;border:1px solid var(--line,#ddd);border-radius:16px;background:var(--panel,#fff);}
.brand-owner-storefront-product>img,.brand-owner-storefront-media {display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:linear-gradient(135deg,#08231a,#00815f);}
.brand-owner-storefront-product>div,.brand-owner-storefront-campaign {display:grid;gap:6px;padding:14px;}
.brand-owner-storefront-product :is(strong,small,span),.brand-owner-storefront-campaign :is(strong,small,p) {min-width:0;margin:0;overflow-wrap:anywhere;}
.brand-owner-storefront-product small,.brand-owner-storefront-campaign small,.brand-owner-storefront-person small {color:var(--muted,#666);text-transform:uppercase;letter-spacing:.06em;font-size:10px;}
.brand-owner-storefront-people {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;}
.brand-owner-storefront-person {display:grid;justify-items:center;gap:7px;padding:18px 10px;text-align:center;}
.brand-owner-storefront-person>span {display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#006f52;color:#fff;font-weight:800;}
.brand-profile-editor {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.brand-profile-editor .is-wide {grid-column:1/-1;}
.brand-profile-editor :is(input,textarea) {min-width:0;}

/* Collection labels use an image-sampled tone set by app.js. The shade is a
   small contrast assist, not a blanket cover; if sampling is unavailable the
   safe dark-cover/white-copy fallback remains readable. */
.orchid-collection-card[data-cover-tone="light"] .orchid-collection-card__copy,
.orchid-storefront-collection-card[data-cover-tone="light"] .orchid-collection-card__copy {color:#090909!important;-webkit-text-fill-color:#090909!important;}
.orchid-collection-card[data-cover-tone="light"] .orchid-collection-card__shade,
.orchid-storefront-collection-card[data-cover-tone="light"] .orchid-collection-card__shade {background:linear-gradient(transparent 42%,rgba(255,255,255,.82))!important;}
.orchid-collection-card[data-cover-tone="dark"] .orchid-collection-card__copy,
.orchid-storefront-collection-card[data-cover-tone="dark"] .orchid-collection-card__copy {color:#fff!important;-webkit-text-fill-color:#fff!important;}
.orchid-collection-card[data-cover-tone="dark"] .orchid-collection-card__shade,
.orchid-storefront-collection-card[data-cover-tone="dark"] .orchid-collection-card__shade {background:linear-gradient(transparent 42%,rgba(0,0,0,.76))!important;}

/* Reels stay visually legible over every video. These selectors deliberately
   match the stable immersive viewer contract instead of a release number. */
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__actions :is(button,.orchid-video-viewer__metric) {
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  background:rgba(0,0,0,.58)!important;border:1px solid rgba(255,255,255,.42)!important;
  border-radius:999px!important;text-shadow:0 2px 5px #000!important;
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.85))!important;
}
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__actions svg,
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__actions svg * {
  color:#fff!important;stroke:#fff!important;fill:none!important;opacity:1!important;
}
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__actions button.is-active,
html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__actions button.is-active svg * {
  color:#6ff2b1!important;stroke:#6ff2b1!important;
}

@media(max-width:620px){
  html body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs {padding-inline:8px!important;}
  html body.page-brands #brands.brand-dashboard-open .brand-dashboard-panel {padding:14px 10px 28px!important;}
  html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__vertical-nav {left:8px!important;width:38px!important;gap:7px!important;}
  html body .orchid-video-viewer[data-orchid-video-ui="v460"] .orchid-video-viewer__vertical-nav button {width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;font-size:17px!important;}

  /* Product detail is a compact, internally scrolling sheet on a phone. It
     leaves a safe interaction lane above the persistent Tali launcher. */
  html body .product-preview-overlay {
    display:flex!important;align-items:flex-start!important;
    padding:6px 6px max(88px,calc(76px + env(safe-area-inset-bottom)))!important;
    overflow:hidden!important;
  }
  html body .product-detail-dialog,
  html body .product-detail-dialog.is-partner-detail {
    box-sizing:border-box!important;width:100%!important;
    max-height:calc(100dvh - 100px - env(safe-area-inset-bottom))!important;
    overflow:auto!important;overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }
  html body .product-detail-dialog .product-preview-track img {
    aspect-ratio:1.45/1!important;max-height:34dvh!important;
  }

  /* Search explanations remain a card, not a second phone-sized page. */
  html body .tali-recommendation-popover {
    inset:auto 8px max(84px,calc(74px + env(safe-area-inset-bottom))) 8px!important;
    width:auto!important;max-height:min(52dvh,420px)!important;
    padding:12px!important;border-radius:16px!important;
    overscroll-behavior:contain!important;scrollbar-gutter:stable!important;
  }
  html body .tali-recommendation-facts {gap:3px!important;margin:9px 0!important;}
  html body .tali-recommendation-facts>div {grid-template-columns:82px minmax(0,1fr)!important;gap:7px!important;padding-top:5px!important;}
  html body .tali-recommendation-popover>small {display:none!important;}

  /* The phone inbox is intentionally shorter than the whole screen and owns
     its scrolling; it never collides with Tali or dismisses while typing. */
  html body.message-menu-open.message-menu-open>[data-account-menu].message-dialog-portal:not(.is-hidden):not([hidden]) {
    inset:calc(var(--orchid-sticky-header-height,76px) + 6px) 8px auto 8px!important;
    width:auto!important;height:min(68dvh,560px)!important;
    max-height:calc(100dvh - var(--orchid-sticky-header-height,76px) - 88px - env(safe-area-inset-bottom))!important;
    min-height:320px!important;border-radius:18px!important;
  }
  .brand-owner-storefront-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .brand-owner-storefront-people {grid-template-columns:repeat(2,minmax(0,1fr));}
  .brand-profile-editor {grid-template-columns:minmax(0,1fr)!important;}
  .brand-profile-editor .is-wide {grid-column:auto;}
  .brand-owner-edit-cover {right:10px;bottom:10px;}
}
