/* STW Shorts DETAIL — TikTok/YT-shaped player + STW editorial action stack */

:root {
  --stw-bg-black: #0a0a0a;
  --stw-bg-cream: #f3f1e7;
  --stw-text-paper: #ffffff;
  --stw-text-ink: #171c26;
  --stw-text-muted: rgba(255,255,255,.55);
  --stw-brand-red: #C0392B;
  --stw-action-bg: rgba(255,255,255,.10);
  --stw-action-bg-hover: rgba(255,255,255,.18);
  --stw-ease: cubic-bezier(.22,1,.36,1);
}

body.single-short { background: var(--stw-bg-black); margin: 0; color: var(--stw-text-paper); font-family: 'Inter', system-ui, sans-serif; }

/* Hide all the WP/site default chrome on the takeover */
body.single-short header.site-header,
body.single-short #stw-announce-bar,
body.single-short .site-header,
body.single-short [class*="announce"] { display: none !important; }

.ss-stage { min-height: 100vh; background: var(--stw-bg-black); display: flex; flex-direction: column; }

/* Top bar — minimal floating chrome */
.ss-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; position: relative; z-index: 5; }
.ss-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--stw-text-paper); }
.ss-logo__mark { width: 28px; height: 28px; border-radius: 50%; background: var(--stw-brand-red); color: #fff; font-family: 'Instrument Serif', Georgia, serif; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; letter-spacing: -.5px; }
.ss-logo__type { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .2px; opacity: .9; }
.ss-back { color: var(--stw-text-muted); font-family: 'Inter', sans-serif; font-size: 13px; text-decoration: none; transition: color .2s; }
.ss-back:hover { color: var(--stw-text-paper); }

/* Frame containing player + side nav + action stack — flex centered so empty prev/next doesn't break alignment */
.ss-frame { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 24px 24px; gap: 110px; min-height: calc(100vh - 96px); }
.ss-nav { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--stw-text-paper); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: background .2s var(--stw-ease), transform .2s; flex-shrink: 0; z-index: 4; }
.ss-nav:hover { background: rgba(255,255,255,.18); transform: scale(1.05); }
.ss-nav--prev { order: 0; } .ss-nav--next { order: 2; }

/* Player + overlays + actions sit together in a max-height rail
 * Safari fix: don't rely on `aspect-ratio` to derive width from height inside a flex item.
 * Use explicit calc width so WebKit and Blink agree on the box size. */
.ss-player-wrap { position: relative; height: min(calc(100vh - 96px), 920px); width: min(calc((100vh - 96px) * 9 / 16), calc(920px * 9 / 16), 90vw); display: flex; flex-shrink: 0; order: 1; }
.ss-player { height: 100%; width: 100%; background: #000; border-radius: 16px; object-fit: cover; box-shadow: 0 24px 60px rgba(0,0,0,.6); display: block; }

/* Mute toggle — top-right corner of player */
.ss-mute { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s; z-index: 3; }
.ss-mute:hover { background: rgba(0,0,0,.7); }
.ss-mute__on { display: none; }
.ss-mute.is-unmuted .ss-mute__off { display: none; }
.ss-mute.is-unmuted .ss-mute__on { display: inline; }

/* Bottom-left overlay on player */
.ss-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 18px 18px; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.85) 100%); border-radius: 0 0 16px 16px; pointer-events: none; }
.ss-overlay__caption { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--stw-brand-red); margin-bottom: 6px; }
.ss-overlay__title { font-family: 'Instrument Serif', Georgia, serif; font-size: 26px; font-weight: 400; line-height: 1.15; margin: 0 0 10px; color: var(--stw-text-paper); }
.ss-overlay__byline { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.ss-overlay__byline-name { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: var(--stw-text-paper); opacity: .9; }
.ss-overlay__follow { background: var(--stw-brand-red); color: #fff; padding: 6px 14px; border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; text-decoration: none; transition: filter .2s; }
.ss-overlay__follow:hover { filter: brightness(1.1); }

/* Editorial action stack — RIGHT EDGE OF VIDEO (TikTok/YT placement) */
.ss-actions { position: absolute; right: -76px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ss-action { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--stw-text-paper); cursor: pointer; background: transparent; border: 0; padding: 0; font-family: inherit; }
.ss-action__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--stw-action-bg); display: inline-flex; align-items: center; justify-content: center; transition: background .2s var(--stw-ease), transform .2s; }
.ss-action:hover .ss-action__icon { background: var(--stw-action-bg-hover); transform: scale(1.05); }
.ss-action__lbl { font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .5px; line-height: 1.15; text-align: center; color: var(--stw-text-paper); text-transform: uppercase; opacity: .85; }
.ss-action:hover .ss-action__lbl { opacity: 1; }
.ss-action--share .ss-action__icon { background: var(--stw-brand-red); }
.ss-action--share:hover .ss-action__icon { background: var(--stw-brand-red); filter: brightness(1.15); }

/* NOTES FROM STEVIE — editorial body below player on cream, blog-post style */
html { scroll-behavior: smooth; }
.ss-notes { background: var(--stw-bg-cream); color: var(--stw-text-ink); padding: 80px 24px; scroll-margin-top: 24px; }
.ss-notes__inner { max-width: 720px; margin: 0 auto; }
.ss-notes__eyebrow { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--stw-brand-red); margin: 0 0 14px; }
.ss-notes__h { font-family: 'Instrument Serif', Georgia, serif; font-size: 44px; font-weight: 400; line-height: 1.1; margin: 0 0 28px; color: var(--stw-text-ink); }
.ss-notes__body { font-family: 'Inter', sans-serif; font-size: 17px; line-height: 1.7; color: rgba(23,28,38,.92); margin: 0 0 36px; }
.ss-notes__body p { margin: 0 0 18px; }
.ss-notes__body p:last-child { margin-bottom: 0; }
.ss-notes__body a { color: var(--stw-brand-red); text-decoration: underline; text-underline-offset: 3px; transition: filter .2s; }
.ss-notes__body a:hover { filter: brightness(1.1); }
.ss-notes__body strong { font-weight: 600; color: var(--stw-text-ink); }
.ss-notes__body em { font-style: italic; }
.ss-notes__body h3, .ss-notes__body h4 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; color: var(--stw-text-ink); margin: 32px 0 12px; line-height: 1.2; }
.ss-notes__body h3 { font-size: 26px; }
.ss-notes__body h4 { font-size: 21px; }
.ss-notes__body ul, .ss-notes__body ol { margin: 0 0 18px; padding-left: 22px; }
.ss-notes__body li { margin-bottom: 8px; }
.ss-notes__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.ss-cta { display: inline-block; padding: 14px 26px; border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; transition: filter .2s, background .2s, color .2s; }
.ss-cta--primary { background: var(--stw-brand-red); color: #fff; }
.ss-cta--primary:hover { filter: brightness(1.1); }

/* RESPONSIVE — collapse the right-edge action stack onto the player on tight screens */
@media (max-width: 1100px) {
  .ss-actions { right: 8px; transform: translateY(-50%); }
  .ss-action__lbl { display: none; }
  .ss-action__icon { background: rgba(0,0,0,.5); }
}
@media (max-width: 700px) {
  .ss-frame { grid-template-columns: 1fr; padding: 0 0 16px; gap: 0; }
  .ss-nav { display: none; }
  .ss-player-wrap { height: calc(100vh - 80px); width: 100%; justify-content: center; }
  .ss-player { border-radius: 0; }
  .ss-overlay { border-radius: 0; padding: 24px 16px 24px; }
  .ss-overlay__title { font-size: 22px; }
  .ss-actions { right: 8px; }
  .ss-notes { padding: 56px 20px; }
  .ss-notes__h { font-size: 30px; }
  .ss-notes__lede { font-size: 17px; }
}

/* ============================================================================
 * Share modal — TikTok/YT-derived: bottom sheet on mobile, centered on desktop
 * ============================================================================ */
.ss-share-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity .25s var(--stw-ease);
}
.ss-share-modal.is-open { pointer-events: auto; opacity: 1; }

.ss-share-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ss-share-modal__panel {
  position: relative;
  width: 100%; max-width: 480px;
  background: #1a1a1a;
  color: var(--stw-text-paper);
  border-radius: 16px 16px 0 0;
  padding: 22px 24px 28px;
  transform: translateY(100%);
  transition: transform .3s var(--stw-ease);
  box-shadow: 0 -16px 60px rgba(0,0,0,.5);
}
.ss-share-modal.is-open .ss-share-modal__panel { transform: translateY(0); }

@media (min-width: 700px) {
  .ss-share-modal { align-items: center; }
  .ss-share-modal__panel {
    border-radius: 16px;
    transform: translateY(0) scale(.92);
  }
  .ss-share-modal.is-open .ss-share-modal__panel { transform: translateY(0) scale(1); }
}

.ss-share-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.ss-share-modal__title {
  font-family: 'Inter', sans-serif;
  font-size: 18px; font-weight: 600;
  margin: 0; color: var(--stw-text-paper);
}
.ss-share-modal__close {
  background: none; border: 0;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.ss-share-modal__close:hover { background: rgba(255,255,255,.08); color: #fff; }

.ss-share-modal__platforms {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .ss-share-modal__platforms { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

.ss-share-platform {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--stw-text-paper);
  transition: background .15s var(--stw-ease);
}
.ss-share-platform:hover { background: rgba(255,255,255,.06); }

.ss-share-platform__icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.ss-share-platform__lbl {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  letter-spacing: .01em;
}

.ss-share-modal__copy {
  display: flex; align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 4px;
}
.ss-share-modal__url {
  flex: 1;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.85);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  text-overflow: ellipsis;
  min-width: 0;
}
.ss-share-modal__copy-btn {
  background: var(--stw-brand-red);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s var(--stw-ease), background .15s;
}
.ss-share-modal__copy-btn:hover { filter: brightness(1.1); }
.ss-share-modal__copy-btn.is-copied { background: #2e7d4f; }

