/* Shorts carousel (YouTube/Facebook/TikTok) */

.reel-carousel{
  position:relative;
  padding:0 52px;
}

.reel-carousel__viewport{
  overflow-x:auto;
  overflow-y:hidden;
  scroll-behavior:smooth;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.reel-carousel__viewport::-webkit-scrollbar{display:none;}

.reel-carousel__track{
  display:flex;
  gap:22px;
  padding:6px 4px 18px;
}

.reel-card{
  flex:0 0 23%;
  max-width:23%;
  text-decoration:none;
  color:inherit;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  text-align:left;
  font:inherit;
}

.reel-card__thumb{
  border-radius:14px;
  overflow:hidden;
  position:relative;
  width:100%;
  aspect-ratio: 9 / 16;
  background: #1a1a1a;
}

.reel-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.01);
}

.reel-card__thumb-placeholder{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:#ddd;
  letter-spacing:.04em;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}

.reel-card__play{
  position:absolute;
  inset:auto 12px 12px auto;
  width:40px;
  height:40px;
  border-radius:50%;
  background: rgba(0,0,0,.55);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  backdrop-filter: blur(3px);
}

.reel-card__title{
  margin-top:10px;
  font-size:13px;
  color: var(--stone);
  text-align:center;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.reel-carousel__arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid var(--line);
  background: rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
}

.reel-carousel__arrow:hover{
  background: rgba(255,255,255,.18);
}

.reel-carousel__arrow--prev{left:6px;}
.reel-carousel__arrow--next{right:6px;}

@media (max-width: 991px){
  .reel-carousel{padding:0 44px;}
  .reel-card{flex:0 0 44%; max-width:44%;}
}

@media (max-width: 575px){
  .reel-carousel{padding:0 38px;}
  .reel-card{flex:0 0 92%; max-width:92%;}
  .reel-carousel__arrow{width:34px; height:34px;}
}

/* TikTok-style vertical viewer */

html.shorts-viewer-open,
body.shorts-viewer-open{
  overflow:hidden;
}

.shorts-viewer{
  position:fixed;
  inset:0;
  z-index:10050;
  display:flex;
  align-items:stretch;
  justify-content:center;
}

.shorts-viewer[hidden]{
  display:none !important;
}

.shorts-viewer__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.92);
}

.shorts-viewer__close{
  position:absolute;
  top:16px;
  right:16px;
  z-index:3;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}

.shorts-viewer__hint{
  position:absolute;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:3;
  margin:0;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:rgba(255,255,255,.72);
  pointer-events:none;
}

.shorts-viewer__stack{
  position:relative;
  z-index:2;
  width:100%;
  max-width:480px;
  height:100vh;
  height:100dvh;
  overflow-y:auto;
  scroll-snap-type:y mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}

.shorts-viewer__stack::-webkit-scrollbar{display:none;}

.shorts-viewer__slide{
  min-height:100vh;
  min-height:100dvh;
  scroll-snap-align:start;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:56px 12px 24px;
  box-sizing:border-box;
}

.shorts-viewer__frame{
  width:min(100%, 420px);
  aspect-ratio:9 / 16;
  border-radius:16px;
  overflow:hidden;
  background:#111;
  box-shadow:0 18px 50px rgba(0,0,0,.45);
}

.shorts-viewer__iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:#000;
}

.shorts-viewer__nav-stack{
  position:absolute;
  right:max(14px, calc(50% - 270px));
  top:50%;
  transform:translateY(-50%);
  z-index:6;
  display:flex;
  flex-direction:column;
  gap:12px;
  pointer-events:auto;
}

.shorts-viewer__nav{
  width:48px;
  height:48px;
  padding:0;
  border:1.5px solid rgba(220,220,220,.72);
  border-radius:50%;
  background:transparent;
  color:rgba(245,245,245,.92);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.shorts-viewer__nav svg{
  display:block;
}
.shorts-viewer__nav:hover{
  border-color:#fff;
  color:#fff;
  background:rgba(255,255,255,.06);
  transform:scale(1.04);
}
.shorts-viewer__nav:disabled{
  opacity:.28;
  cursor:default;
  transform:none;
}
.shorts-viewer__nav--prev,
.shorts-viewer__nav--next{
  position:static;
  left:auto;
  right:auto;
  top:auto;
  transform:none;
}

.shorts-viewer__mute{
  position:absolute;
  left:50%;
  bottom:28px;
  transform:translateX(-50%);
  z-index:6;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(0,0,0,.75);
  color:#fff;
  font-size:13px;
  font-weight:600;
  letter-spacing:.03em;
  padding:12px 22px;
  cursor:pointer;
  pointer-events:auto;
}
.shorts-viewer__mute:hover{border-color:rgba(217,173,92,.55);}
.shorts-viewer__mute[aria-pressed="false"]{color:#111; background:var(--gold, #c9a227); border-color:transparent;}
.shorts-viewer__mute[hidden]{display:none !important;}

.shorts-viewer__video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  background:#000;
  cursor:pointer;
}

.shorts-viewer__counter{
  position:absolute;
  top:20px;
  right:64px;
  z-index:5;
  color:rgba(255,255,255,.8);
  font-size:12px;
  letter-spacing:.06em;
}

.shorts-viewer__fallback--ig{
  position:relative;
  overflow:hidden;
}
.shorts-viewer__poster{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:brightness(.35);
}
.shorts-viewer__fallback-card{
  position:relative;
  z-index:1;
  padding:20px;
  max-width:28ch;
}
.shorts-viewer__fallback-tip{
  margin-top:8px;
  font-size:12px;
  color:rgba(255,255,255,.65);
  max-width:28ch;
  text-align:center;
}

@media (max-width:720px){
  .shorts-viewer__nav-stack{
    right:10px;
    gap:10px;
  }
  .shorts-viewer__nav{width:44px;height:44px;}
  .shorts-viewer__mute{bottom:16px;}
  .shorts-viewer__counter{right:54px; top:18px;}
}

.shorts-viewer__caption{
  margin:14px 0 0;
  max-width:420px;
  text-align:center;
  color:rgba(255,255,255,.86);
  font-size:14px;
  line-height:1.45;
}

.shorts-viewer__fallback{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:20px;
  color:#fff;
  text-align:center;
}

.shorts-viewer__fallback-link{
  color:#fff;
  text-decoration:underline;
}

