/*
 * DOSYA YOLU : /module/live/assets/lv.css   (YENİ DOSYA)
 * AÇIKLAMA   : Canlı yayın stilleri: liste, izleme sayfası (YouTube canlı düzeni: solda oynatıcı, sağda sohbet),
 *              stüdyo, sohbet, rozetler. Sadece core.css / yt.css değişkenlerine (--st-*) bağlıdır. Önek: lv-
 *              Mobilde oynatıcı üstte yapışık, sohbet altta.
 */

.lv-page { width: 100%; max-width: 1700px; margin: 0 auto; padding: 14px 12px 24px; }
.lv-head { margin-bottom: 14px; }
.lv-head--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lv-title { font-size: 22px; font-weight: 740; letter-spacing: -.02em; line-height: 1.25; }
.lv-sub { margin-top: 4px; font-size: 14px; color: var(--st-text-2); }
.lv-opt { font-weight: 400; color: var(--st-text-3); }
@media (min-width: 768px) { .lv-page { padding: 24px 28px 40px; } .lv-title { font-size: 26px; } }

/* ---------- Rozetler ---------- */
.lv-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .03em; color: #fff; background: var(--st-surface-3);
}
.lv-badge--live, .lv-badge--connecting, .lv-badge--reconnecting { background: var(--st-live); }
.lv-badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: lv-pulse 1.4s ease-in-out infinite; }
.lv-badge--idle, .lv-badge--ended { background: rgba(0, 0, 0, .65); }
.lv-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 650; color: #fff; background: rgba(0, 0, 0, .65); font-variant-numeric: tabular-nums;
}
.lv-pill--ghost { background: rgba(0, 0, 0, .5); }
.lv-cat { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--st-accent); background: var(--st-accent-soft); }

/* ---------- Liste ---------- */
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 16px; }
@media (min-width: 600px) { .lv-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } }
@media (min-width: 768px) { .lv-grid { gap: 28px 20px; } }
.lv-card { display: flex; flex-direction: column; gap: 11px; min-width: 0; animation: lv-in .45s var(--st-ease) both; }
.lv-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--st-surface-2); }
.lv-card__thumb .lv-badge { position: absolute; left: 8px; bottom: 8px; }
.lv-card__views {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 650; color: #fff; background: rgba(0, 0, 0, .75);
}
.lv-ph {
  display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .88);
  background: linear-gradient(135deg, hsl(var(--lv-h, 260), 62%, 40%), hsl(calc(var(--lv-h, 260) + 55), 68%, 28%));
}
.lv-card__body { display: flex; gap: 12px; padding: 0 2px; min-width: 0; }
.lv-card__avatar { flex: none; padding-top: 1px; }
.lv-card__info { min-width: 0; }
.lv-card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.lv-card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-card__by { margin-top: 3px; font-size: 13px; color: var(--st-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-card__meta { font-size: 12.5px; color: var(--st-text-3); }

/* ---------- İzleme düzeni ---------- */
.lv-watch { padding: 0 0 20px; }
.lv-watch__main { min-width: 0; }
.lv-watch__side { padding: 14px 12px 0; }
@media (min-width: 1000px) {
  .lv-watch { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; padding: 24px 28px 36px; }
  .lv-watch__side { padding: 0; position: sticky; top: calc(var(--st-topbar-h) + var(--st-safe-t) + 16px); }
}
@media (min-width: 1500px) { .lv-watch { grid-template-columns: minmax(0, 1fr) 420px; } }

/* ---------- Oynatıcı ---------- */
.lv-player, .lv-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.lv-player__video, .lv-stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lv-stage__video.is-mirror { transform: scaleX(-1); }
@media (max-width: 999px) and (orientation: portrait) {
  .lv-watch .lv-player { position: sticky; z-index: 35; top: calc(var(--st-topbar-h) + var(--st-safe-t)); }
}
@media (min-width: 1000px) {
  .lv-player, .lv-stage { border-radius: 14px; }
}
.lv-player:fullscreen, .lv-player:-webkit-full-screen { aspect-ratio: auto; border-radius: 0; }

.lv-ov {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center; color: #fff; background: rgba(0, 0, 0, .72);
}
.lv-ov[hidden] { display: none; }
.lv-ov strong { font-size: 15px; font-weight: 600; max-width: 360px; }
.lv-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: st-spin .8s linear infinite; }
.lv-spin[hidden] { display: none; }

.lv-unmute {
  position: absolute; z-index: 4; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: #000; background: #fff;
}
.lv-unmute[hidden], .lv-tap[hidden] { display: none; }
.lv-tap { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); }

.lv-ctrl {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 28px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); opacity: 1; transition: opacity .2s;
}
.lv-ctrl__sp { flex: 1; }
@media (hover: hover) { .lv-player .lv-ctrl { opacity: 0; } .lv-player:hover .lv-ctrl, .lv-player:focus-within .lv-ctrl { opacity: 1; } }
.lv-rbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600; transition: background .15s;
}
.lv-rbtn:hover { background: rgba(255, 255, 255, .18); }
.lv-ico-on { display: none; }
.lv-rbtn.is-off .lv-ico-on { display: inline-flex; }
.lv-rbtn.is-off .lv-ico-off { display: none; }
.lv-rbtn.is-off { color: #ff6b81; }

/* ---------- Bilgi ---------- */
.lv-info { padding: 14px 12px 4px; animation: lv-in .45s var(--st-ease) both; }
.lv-info__title { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.lv-info__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--st-text-2); }
.lv-info__bar { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.lv-info__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-owner { display: flex; align-items: center; gap: 12px; }
.lv-act {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; background: var(--st-surface-2); transition: background .15s;
}
.lv-act:hover { background: var(--st-surface-3); }
.lv-act--danger { color: var(--st-danger); }
.lv-desc { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--st-surface-2); font-size: 14px; line-height: 1.55; color: var(--st-text-2); overflow-wrap: anywhere; }
@media (min-width: 768px) {
  .lv-info { padding: 16px 2px 4px; }
  .lv-info__title { font-size: 22px; }
  .lv-info__bar { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Sohbet ---------- */
.lv-chat { display: flex; flex-direction: column; height: 420px; border-radius: 14px; background: var(--st-surface); border: 1px solid var(--st-border); overflow: hidden; }
@media (min-width: 1000px) { .lv-watch .lv-chat { height: calc(100dvh - var(--st-topbar-h) - var(--st-safe-t) - 40px); max-height: 760px; } }
.lv-chat__head { padding: 12px 16px; border-bottom: 1px solid var(--st-border); font-size: 14px; }
.lv-chat__list { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; overflow-y: auto; overscroll-behavior: contain; }
.lv-msg { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; animation: lv-in .25s var(--st-ease) both; }
.lv-msg strong { margin-right: 8px; font-weight: 650; color: var(--st-text-2); }
.lv-msg.is-host strong { padding: 1px 8px; border-radius: 999px; color: #fff; background: var(--st-accent); }
.lv-chat__form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--st-border); }
.lv-chat__input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--st-border-strong);
  background: var(--st-surface-2); color: var(--st-text); font-size: 16px; outline: 0; -webkit-appearance: none; appearance: none;
}
.lv-chat__input:focus { border-color: var(--st-accent); box-shadow: var(--st-ring); }
.lv-chat__send { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; background: var(--st-grad); }
.lv-chat__login, .lv-chat__off { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-top: 1px solid var(--st-border); font-size: 13.5px; color: var(--st-text-2); }
.lv-chat__login b { color: var(--st-accent); }

/* ---------- Stüdyo ---------- */
.lv-studio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) { .lv-studio { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; } }
.lv-studio[hidden], .lv-done[hidden] { display: none; }
.lv-studio__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lv-stage { border-radius: 14px; }
.lv-stage__empty {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; font-size: 13.5px; color: var(--st-text-2); background: var(--st-surface-2);
}
.lv-stage__empty[hidden] { display: none; }
.lv-stage__empty strong { font-size: 16px; color: var(--st-text); }
.lv-stage__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--st-surface-3); color: var(--st-text-2); }
.lv-stage__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.lv-stage__top { position: absolute; z-index: 3; left: 10px; top: 10px; display: flex; align-items: center; gap: 6px; }
.lv-stage__top [hidden] { display: none; }
.lv-stage__bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 24px 8px 8px; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); }
.lv-stage__bar[hidden] { display: none; }

.lv-panel { padding: 16px; border-radius: 16px; background: var(--st-surface); border: 1px solid var(--st-border); }
.lv-form { display: flex; flex-direction: column; gap: 16px; }
.lv-form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 560px) { .lv-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lv-form__actions { display: flex; gap: 10px; }
.lv-form__actions .st-btn { flex: 1; }
@media (min-width: 560px) { .lv-form__actions .st-btn { flex: none; min-width: 220px; } }
.lv-form__actions [hidden] { display: none; }
.lv-form.is-busy .st-field, .lv-form.is-busy .st-switch { opacity: .55; pointer-events: none; }
.lv-page--studio.is-live .lv-form .st-field, .lv-page--studio.is-live .lv-form .st-switch { opacity: .55; pointer-events: none; }
.lv-studio__side .lv-chat { height: 480px; }
.lv-done { padding-top: 40px; }

@keyframes lv-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }