/* 24-sorotan.css — tampilan penampil Sorotan ala TikTok / Instagram + gaya elemen kanvas editor admin.
   Menggantikan 20-sorotan.css (sudah dihapus). Dimuat setelah 17-storefront.css (toko) dan sebelum 19-toko-admin.css (admin). */
html.tk-noscroll, html.tk-noscroll body { overflow: hidden !important; }

.srv { position: fixed; inset: 0; z-index: 80; background: #2a1850; display: flex; align-items: center; justify-content: center; color: #fff; -webkit-tap-highlight-color: transparent; }
.srv[hidden] { display: none !important; }
.srv-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(34px) brightness(.9) saturate(1.35); pointer-events: none; }
.srv-card { --u: 4px; position: relative; width: 100%; height: 100%; max-width: 480px; background: transparent; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
@media (min-width: 560px) { .srv-card { height: 100%; aspect-ratio: 9 / 16; width: auto; max-width: 100%; } }

.srv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.srv-img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }          /* 9:16 = penuh */
.srv-img.srv-contain { object-fit: contain; }                                                               /* 1:1, 4:5, dll = tampil utuh, tidak di-zoom */
.srv-img.srv-in { animation: srvfade .18s ease-out; }
@keyframes srvfade { from { opacity: .35; } to { opacity: 1; } }
.srv-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.5) 0, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 60%, rgba(0,0,0,.6) 100%); }

/* progress */
.srv-bars { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 4; pointer-events: none; }
.srv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.srv-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.srv-bars i.done b { width: 100%; }
.srv-bars i.on b { animation: srvbar 5s linear forwards; }
.srv-paused .srv-bars i.on b, .srv-hold .srv-bars i.on b { animation-play-state: paused; }
@keyframes srvbar { from { width: 0; } to { width: 100%; } }

/* kepala: logo, judul sorotan, ikon lagu (kalau ada), tutup */
.srv-head { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; z-index: 5; pointer-events: none; }
.srv-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #1b1233; display: flex; align-items: center; justify-content: center; flex: none; border: 1.5px solid rgba(255,255,255,.35); }
.srv-av img { width: 100%; height: 100%; object-fit: cover; }
.srv-av svg { width: 18px; height: 18px; }
.srv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.srv-t b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-note { flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; animation: srvnote 1.6s ease-in-out infinite; }
.srv-note[hidden] { display: none; }
.srv-note svg { width: 17px; height: 17px; }
@keyframes srvnote { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.srv-x { pointer-events: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 16px; cursor: pointer; flex: none; }

/* zona ketuk (di bawah kepala & bar bawah) */
.srv-zone { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; z-index: 2; touch-action: pan-y; }

/* elemen buatan admin: teks / emoji / tombol link (posisi dalam %, ukuran memakai --u = 1% lebar kartu, --r = putaran) */
.srv-items { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.srv-it { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); pointer-events: none; text-align: center; white-space: pre-line; max-width: 92%; }
.srv-text { font-weight: 800; font-size: calc(var(--u) * 5.4 * var(--s, 1)); line-height: 1.2; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.75); }
.srv-emoji { font-size: calc(var(--u) * 12 * var(--s, 1)); line-height: 1; }
.srv-link { display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.25em; border-radius: 999px; background: #fff; color: #111; font-size: calc(var(--u) * 4.2 * var(--s, 1)); line-height: 1.15; font-weight: 800; text-decoration: none; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 22px rgba(0,0,0,.4); }
.srv-link svg { width: 1.25em; height: 1.25em; flex: none; color: #2563eb; }
.srv-link b { font-weight: 800; }
a.srv-link { pointer-events: auto; }
a.srv-link:active { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.97); }

/* pembuka: foto diredupkan + judul di tengah, lalu redupnya hilang pelan-pelan (diatur 24-sorotan-viewer.js) */
.srv-intro { position: absolute; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); background: rgba(8,4,16,.55); }
.srv-intro span { font-weight: 800; font-size: clamp(22px, calc(var(--u, 4px) * 7), 36px); color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6); padding: 0 16px; text-align: center; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* bagian bawah: kotak gelap berisi 3 emoji + hati + share */
.srv-low { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 12px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; pointer-events: none; }
.srv-low > * { pointer-events: auto; }
.srv-bar { width: 100%; max-width: 340px; display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 5px 8px; border-radius: 999px; background: rgba(14,12,18,.82); border: 1px solid rgba(255,255,255,.08); }
.srv-e { flex: 1; min-width: 0; height: 42px; border: 0; border-radius: 999px; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font: inherit; -webkit-tap-highlight-color: transparent; }
.srv-e span { font-size: 24px; line-height: 1; transition: transform .12s; }
.srv-e:active span { transform: scale(1.3); }
.srv-e.on { background: rgba(255,255,255,.16); }
.srv-act { flex: 1; min-width: 0; height: 42px; border: 0; border-radius: 999px; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font: inherit; -webkit-tap-highlight-color: transparent; }
.srv-act svg { width: 24px; height: 24px; fill: none; stroke: currentColor; transition: transform .12s; }
.srv-like.on svg { fill: #ff2d55; stroke: #ff2d55; }
.srv-act:active svg { transform: scale(1.2); }

/* emoji melayang (animasinya dijalankan lewat JS: naik, membesar, lalu blur & hilang) */
.srv-fl { position: absolute; z-index: 7; line-height: 1; pointer-events: none; will-change: transform, opacity, filter; }

@media (prefers-reduced-motion: reduce) { .srv-img.srv-in, .srv-note { animation: none; } }


/* ---------- bulatan sorotan di halaman toko: tanpa kotak gelap di belakangnya (langsung bulatannya saja, gaya Instagram) ---------- */
#story-highlights { background: none !important; border: 0 !important; border-radius: 0 !important; padding: 6px 2px 4px !important; }
html.light-theme #story-highlights { background: none !important; border: 0 !important; }
