/* ShowReels page additions (keeps Sosyalisler+ theme vibe) */
:root{
  --sr-safe-top: max(16px, env(safe-area-inset-top));
  --sr-safe-bottom: max(16px, env(safe-area-inset-bottom));
}
.sr-shell{
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
}
.sr-topbar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:1000;
  padding: calc(var(--sr-safe-top)) 16px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  pointer-events:none;
}
.sr-topbar a, .sr-topbar button{
  pointer-events:auto;
}
.sr-home-btn{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:.7rem .95rem;
  border:1px solid var(--border);
  background:rgba(10,10,10,.55);
  backdrop-filter: blur(10px);
  color:var(--text);
  border-radius:999px;
  text-decoration:none;
  font-family:var(--font-body);
  font-weight:500;
  font-size:.95rem;
}
.sr-home-btn:hover{transform:translateY(-1px)}
.sr-brand{
  font-family:var(--font-disp);
  letter-spacing:.06em;
  font-size:1.25rem;
  color:rgba(245,245,247,.85);
  pointer-events:none;
}

.sr-feed{
  height:100vh;
  overflow-y:auto;
  scroll-snap-type:y mandatory;
  -webkit-overflow-scrolling: touch;
}
.sr-item{
  position:relative;
  height:100vh;
  scroll-snap-align:start;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.35));
}
.sr-video{
  width:min(520px, 100vw);
  height:100vh;
  max-height:100vh;
  object-fit:cover;
  border-left:1px solid rgba(255,255,255,.06);
  border-right:1px solid rgba(255,255,255,.06);
  background:#000;
}
@media (max-width:640px){
  .sr-video{width:100vw;border-left:none;border-right:none}
}

.sr-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding: 0 18px calc(20px + var(--sr-safe-bottom));
  pointer-events:none;
}
.sr-caption{
  width:min(520px, 100vw);
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.sr-meta{
  pointer-events:none;
  max-width:70%;
}
.sr-title{
  font-family:var(--font-body);
  font-weight:600;
  font-size:1.05rem;
  line-height:1.2;
  margin-bottom:.35rem;
}
.sr-sub{
  font-family:var(--font-body);
  font-size:.95rem;
  color:rgba(245,245,247,.55);
  line-height:1.35;
}
.sr-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:auto;
}
.sr-action{
  width:44px;height:44px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(10,10,10,.55);
  backdrop-filter: blur(10px);
  color:var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.sr-action:active{transform:scale(.98)}
.sr-progress{
  position:absolute;
  left:0; right:0; top:0;
  height:3px;
  background:rgba(255,255,255,.08);
}
.sr-progress > i{
  display:block;
  height:100%;
  width:0%;
  background:var(--accent);
}

.sr-empty{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:120px 20px 40px;
  text-align:center;
}
.sr-empty h2{
  font-family:var(--font-disp);
  font-size:clamp(2rem,5vw,3rem);
  margin-bottom:.4rem;
}
.sr-empty p{
  color:rgba(245,245,247,.55);
  font-family:var(--font-body);
  line-height:1.7;
  max-width:560px;
}

/* ===== ULTIMATE MOBILE FIX (stable) ===== */

/* prevent any overflow from affecting layout */
.sr-shell, .sr-feed, .sr-item { overflow-x:hidden !important; }

/* make sure the reel is positioning context */
.sr-shell .sr-item{
  position:relative !important;
}

/* Put actions bottom-left, above mobile browser bar */
.sr-shell .sr-item .sr-actions{
  position:absolute !important;
  left:16px !important;
  right:auto !important;

  /* Above browser UI: increase if needed */
  bottom: calc(210px + env(safe-area-inset-bottom)) !important;

  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  z-index:9999 !important;
  pointer-events:auto !important;
}

/* Keep overlay from eating clicks except buttons */
.sr-shell .sr-overlay{ pointer-events:none !important; }
.sr-shell .sr-item .sr-actions *{ pointer-events:auto !important; }

/* Button sizing stable */
.sr-shell .sr-item .sr-action{
  width:48px !important;
  height:48px !important;
  padding:0 !important;
  display:grid !important;
  place-items:center !important;
}
