/*
 * DOSYA YOLU : /module/shorts/assets/sh.css   (YENİ DOSYA)
 * AÇIKLAMA   : Shorts stilleri (önek: sh-): tam ekran dikey akış (scroll-snap), kart, eylem sütunu, ilerleme çubuğu,
 *              yorum çekmecesi (mobilde alttan sheet, masaüstünde sağ panel), ana sayfa rafı.
 *              Mobil: kart tüm alanı kaplar, eylemler kartın üstünde. Masaüstü: 9:16 kart ortada, eylemler yanında.
 *              Sadece core.css / yt.css değişkenlerine (--st-*) bağlıdır.
 */

/* ---------- Sayfa ve akış ---------- */
body.st-page-shorts { overflow: hidden; }
.sh-page {
  position: relative; width: 100%; overflow: hidden; background: #000;
  height: calc(100vh - var(--st-topbar-h) - var(--st-safe-t) - var(--st-tabbar-h) - var(--st-safe-b) - 8px);
  height: calc(100dvh - var(--st-topbar-h) - var(--st-safe-t) - var(--st-tabbar-h) - var(--st-safe-b) - 8px);
}
.sh-feed {
  position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; outline: 0;
}
.sh-feed::-webkit-scrollbar { display: none; }
.sh-empty { min-height: 60vh; display: grid; align-items: center; }

.sh-item {
  position: relative; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
}
.sh-card { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff; }
.sh-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.sh-item.is-wide .sh-video { object-fit: contain; }

.sh-hit { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.sh-pause {
  position: absolute; z-index: 2; left: 50%; top: 50%; display: none; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: rgba(0, 0, 0, .5); pointer-events: none;
}
.sh-pause svg { margin-left: 3px; }
.sh-item.is-paused .sh-pause { display: grid; }
.sh-spin {
  position: absolute; z-index: 2; left: 50%; top: 50%; display: none; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; border: 3.5px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: st-spin .8s linear infinite; pointer-events: none;
}
.sh-item.is-buffering .sh-spin { display: block; }
.sh-item.is-buffering .sh-pause { display: none; }

.sh-heart { position: absolute; z-index: 3; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .5)); }
.sh-heart.is-in { animation: sh-heart .7s var(--st-ease) both; }

.sh-snd {
  position: absolute; z-index: 4; right: 10px; top: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; background: rgba(0, 0, 0, .45); transition: background .15s;
}
.sh-snd:hover { background: rgba(0, 0, 0, .7); }
.sh-snd__off { display: none; }
.sh-page.is-muted .sh-snd__on { display: none; }
.sh-page.is-muted .sh-snd__off { display: inline-flex; }

.sh-err {
  position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center; background: #111; color: #cfcfcf;
}
.sh-item.is-error .sh-err { display: flex; }
.sh-err svg { color: #ffb547; }
.sh-err p { margin: 0; font-size: 14px; }
.sh-err__btn { height: 38px; padding: 0 20px; border-radius: 999px; font-weight: 650; background: #fff; color: #000; }

/* ---------- Alt bilgi ---------- */
.sh-meta {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  padding: 56px 76px 16px 14px; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .3) 60%, transparent);
}
.sh-meta__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sh-by { display: inline-flex; align-items: center; gap: 8px; min-width: 0; pointer-events: auto; color: #fff; }
.sh-by__nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 650; }
.sh-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.sh-meta .ch-sub { pointer-events: auto; flex: none; height: 32px; padding: 0 14px; font-size: 13px; color: #000; background: #fff; border-color: transparent; }
.sh-meta .ch-sub.is-on { color: #fff; background: rgba(255, 255, 255, .22); }
.sh-meta .ch-sub__ico { display: none; }

.sh-prog { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); }
.sh-prog i { display: block; width: 100%; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* ---------- Eylem sütunu (mobil: kartın üstünde) ---------- */
.sh-rail { position: absolute; z-index: 5; right: 8px; bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; }
.sh-rb { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); transition: transform .12s; }
.sh-rb:active { transform: scale(.92); }
.sh-rb__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .42); transition: background .15s; }
.sh-rb.is-active .sh-rb__ic { background: #fff; color: #000; }
.sh-rb.is-active .st-icon { fill: currentColor; fill-opacity: .25; }
.sh-rb__n { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sh-nav { display: none; }

/* ---------- Masaüstü ---------- */
@media (min-width: 768px) {
  .sh-page { height: calc(100vh - var(--st-topbar-h) - var(--st-safe-t) - 28px); height: calc(100dvh - var(--st-topbar-h) - var(--st-safe-t) - 28px); background: var(--st-bg); }
  .sh-item { gap: 16px; padding: 8px 0 12px; }
  .sh-card { width: auto; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100% - 100px); border-radius: 16px; }
  .sh-rail { position: static; align-self: flex-end; bottom: auto; right: auto; gap: 14px; padding-bottom: 6px; color: var(--st-text); }
  .sh-rb { text-shadow: none; }
  .sh-rb__ic { background: var(--st-surface-2); }
  .sh-rb:hover .sh-rb__ic { background: var(--st-surface-3); }
  .sh-rb.is-active .sh-rb__ic { background: var(--st-text); color: var(--st-bg); }
  .sh-meta { padding-right: 14px; }
  .sh-nav { position: absolute; z-index: 5; right: 22px; top: 50%; display: flex; flex-direction: column; gap: 12px; transform: translateY(-50%); }
  .sh-navbtn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--st-text); background: var(--st-surface-2); transition: background .15s, transform .12s; }
  .sh-navbtn:hover { background: var(--st-surface-3); }
  .sh-navbtn:active { transform: scale(.92); }
}
@media (min-width: 768px) and (max-width: 1099px) { .sh-nav { right: 10px; } }

/* ---------- Yorum çekmecesi ---------- */
.sh-sheet { position: fixed; inset: 0; z-index: 90; }
.sh-sheet[hidden] { display: none; }
.sh-sheet__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.sh-sheet.is-open .sh-sheet__bg { opacity: 1; }
.sh-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; height: 72vh; height: 72dvh;
  border-radius: 18px 18px 0 0; background: var(--st-surface-2); color: var(--st-text); box-shadow: var(--st-shadow-lg);
  transform: translateY(100%); transition: transform .35s var(--st-ease); padding-bottom: var(--st-safe-b);
}
.sh-sheet.is-open .sh-sheet__panel { transform: none; }
.sh-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--st-border); }
.sh-sheet__head h2 { font-size: 16px; font-weight: 700; }
.sh-sheet__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; }
.sh-sheet__empty { padding: 30px 0; text-align: center; font-size: 14px; color: var(--st-text-3); }
.sh-sheet__more { display: flex; margin: 14px auto 0; }
.sh-sheet__more[hidden], .sh-sheet__empty[hidden] { display: none; }
.sh-sheet__form { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--st-border); }
.sh-sheet__input {
  flex: 1; min-width: 0; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--st-border-strong);
  background: var(--st-bg); color: var(--st-text); font-size: 16px; outline: 0; -webkit-appearance: none; appearance: none;
}
.sh-sheet__input:focus { border-color: var(--st-accent); box-shadow: var(--st-ring); }
.sh-sheet__send { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: var(--st-grad); }
.sh-sheet__login { display: block; padding: 16px; border-top: 1px solid var(--st-border); text-align: center; font-size: 14px; color: var(--st-text-2); }
.sh-sheet__login b { color: var(--st-accent); }
/* yanıt / sil gibi işlemler burada yok; sadece liste */
.sh-sheet .cm-actions, .sh-sheet .cm-toggle, .sh-sheet .cm-replybox, .sh-sheet .cm-replies { display: none !important; }

@media (min-width: 768px) {
  .sh-sheet { left: auto; width: clamp(360px, 30vw, 440px); top: calc(var(--st-topbar-h) + var(--st-safe-t)); z-index: 60; }
  .sh-sheet__bg { display: none; }
  .sh-sheet__panel { top: 0; height: auto; border-radius: 0; border-left: 1px solid var(--st-border); transform: translateX(100%); padding-bottom: 0; }
  .sh-sheet.is-open .sh-sheet__panel { transform: none; }
}

/* ---------- Ana sayfa rafı ---------- */
.sh-shelf { padding: 14px 12px 6px; }
.sh-shelf__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sh-shelf__title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 720; letter-spacing: -.01em; }
.sh-shelf__ic { display: grid; place-items: center; color: var(--st-accent); }
.sh-shelf__all { font-size: 13px; font-weight: 650; color: var(--st-accent); }
.sh-shelf__all:hover { text-decoration: underline; }
.sh-shelf__row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.sh-shelf__row::-webkit-scrollbar { display: none; }
.sh-sc { flex: none; display: flex; flex-direction: column; gap: 6px; width: 150px; scroll-snap-align: start; }
.sh-sc__thumb { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 12px; background: var(--st-surface-2); }
.sh-sc__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--st-ease); }
.sh-sc__t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.35; }
.sh-sc__v { font-size: 12.5px; color: var(--st-text-3); }
.sh-ph { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .88); background: linear-gradient(160deg, hsl(var(--sh-h, 260), 62%, 42%), hsl(calc(var(--sh-h, 260) + 55), 68%, 28%)); }
@media (hover: hover) { .sh-sc:hover .sh-sc__thumb img { transform: scale(1.05); } .sh-sc:hover .sh-sc__t { color: var(--st-accent); } }
@media (min-width: 768px) { .sh-shelf { padding: 22px 28px 6px; } .sh-sc { width: 180px; } }

@keyframes sh-heart { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.15); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }