/* public/helptv.css -- PerreoAI TV: mini tele flotante de videos de ayuda (ver helptv.js) */
.htv-launch { position: fixed; left: 252px; bottom: 18px; z-index: 9983; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--accent, #ff3d9a); background: linear-gradient(135deg, rgb(var(--accent-rgb, 255 61 154) / 28%), var(--panel, #14102a)); color: var(--text, #fff); font-size: 22px; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.htv-launch:hover { transform: scale(1.06); }
.htv-launch:focus-visible, .htv-b:focus-visible, .htv-tab:focus-visible, .htv-card:focus-visible { outline: 2px solid #00e5ff; outline-offset: 2px; }
@media (max-width: 899px) { .htv-launch { left: 12px; bottom: 16px; } }
html.htv-open .htv-launch, html.sc-open .htv-launch, html.pn-open .htv-launch { display: none !important; }

.htv { position: fixed; right: 18px; bottom: 18px; z-index: 9992; width: min(392px, calc(100vw - 20px)); max-height: calc(100vh - 56px); display: flex; flex-direction: column; color: #fff; font-family: inherit; }
.htv[hidden] { display: none; }
.htv-ant { position: relative; height: 30px; flex: 0 0 auto; pointer-events: none; }
.htv-ant i { position: absolute; bottom: 0; width: 3px; height: 32px; background: linear-gradient(#ff7ac8, #b04ad0); border-radius: 3px; transform-origin: 50% 100%; }
.htv-ant i::after { content: ''; position: absolute; top: -6px; left: -3px; width: 9px; height: 9px; border-radius: 50%; background: #ff3d9a; box-shadow: 0 0 10px #ff3d9a; }
.htv-ant i:nth-child(1) { left: calc(50% - 22px); transform: rotate(-24deg); }
.htv-ant i:nth-child(2) { left: calc(50% + 20px); transform: rotate(24deg); }
.htv-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; border: 2.5px solid transparent; border-radius: 24px; background: linear-gradient(#150c26, #0d0818) padding-box, linear-gradient(135deg, #ff3d9a, #7c5cff 55%, #00e0ff) border-box; box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 28px rgba(255, 61, 154, .25); overflow: hidden; }
.htv-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 8px 14px; cursor: grab; touch-action: none; user-select: none; }
.htv-head:active { cursor: grabbing; }
.htv-brand { font-size: .95rem; letter-spacing: .02em; background: linear-gradient(90deg, #ff7ac8, #7de8ff); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.htv-now { flex: 1 1 auto; min-width: 0; font-size: .78rem; color: #cfc6ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htv-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.htv-b { appearance: none; font: inherit; cursor: pointer; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); color: #fff; font-size: .95rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.htv-b:hover { background: rgba(255, 255, 255, .16); }
.htv-x { width: 38px; border-color: #ff3d9a; background: rgba(255, 61, 154, .22); font-weight: 700; }
.htv-x:hover { background: rgba(255, 61, 154, .45); }
.htv-b[hidden] { display: none; }
.htv-mp { display: none; }
.htv-main { padding: 0 12px; }
.htv-screen { position: relative; border-radius: 14px; overflow: hidden; background: #000; border: 1.5px solid rgba(255, 255, 255, .14); aspect-ratio: 16 / 9; }
.htv-screen video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; cursor: pointer; }
.htv-idle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: .9rem; color: #d9d3f0; background: radial-gradient(120% 90% at 20% 10%, #4a1a5e, #0b0820); pointer-events: none; }
.htv-idle[hidden] { display: none; }
.htv-ctl { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
.htv-ctl .htv-b { width: 32px; height: 32px; flex: 0 0 32px; }
.htv-seek { flex: 1 1 auto; min-width: 0; accent-color: #ff3d9a; }
.htv-vol { flex: 0 0 64px; width: 64px; accent-color: #00e0ff; }
.htv-time { flex: 0 0 auto; font-size: .72rem; color: #cfc6ea; font-variant-numeric: tabular-nums; }
.htv-link { display: block; margin: 2px 0 6px; font-size: .8rem; color: #7de8ff; text-decoration: underline; }
.htv-main { flex: 0 0 auto; }
.htv-tabs { flex: 0 0 auto; display: flex; gap: 6px; padding: 6px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.htv-tab { appearance: none; font: inherit; cursor: pointer; flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #e8e2fb; font-size: .8rem; white-space: nowrap; }
.htv-tab.is-on { background: linear-gradient(135deg, rgba(255, 61, 154, .5), rgba(0, 224, 255, .35)); border-color: #ff7ac8; font-weight: 700; color: #fff; }
.htv-list { display: flex; flex-direction: column; gap: 6px; padding: 6px 12px 12px; overflow-y: auto; min-height: 0; max-height: 190px; }
.htv-card { appearance: none; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 7px 9px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #fff; }
.htv-card:hover { background: rgba(255, 255, 255, .11); }
.htv-card.is-on { border-color: #ff7ac8; background: rgba(255, 61, 154, .16); }
.htv-th { position: relative; flex: 0 0 auto; width: 64px; height: 42px; border-radius: 9px; overflow: hidden; background: linear-gradient(135deg, #3a1560, #101a3a); display: flex; align-items: center; justify-content: center; font-style: normal; }
.htv-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.htv-th i { position: relative; font-style: normal; font-size: 1.1rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.htv-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.htv-tx b { font-size: .86rem; }
.htv-tx small { font-size: .74rem; color: #bdb4dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htv-du { flex: 0 0 auto; font-size: .72rem; color: #cfc6ea; font-variant-numeric: tabular-nums; }
.htv-ad { text-decoration: none; font-size: .64rem; padding: 1px 6px; border-radius: 99px; background: #ffc400; color: #1b1300; font-weight: 800; margin-left: 4px; }
.htv-empty { margin: 8px 4px; font-size: .84rem; color: #bdb4dc; }

/* achicada: solo la barra de arriba */
.htv.htv-mini { width: min(300px, calc(100vw - 20px)); }
.htv.htv-mini .htv-main, .htv.htv-mini .htv-tabs, .htv.htv-mini .htv-list { display: none; }
.htv.htv-mini .htv-mp { display: inline-flex; }
.htv.htv-mini .htv-fs, .htv.htv-mini .htv-pip { display: none; }
.htv.htv-mini .htv-head { cursor: grab; }
.htv.htv-playing .htv-brand::after { content: ' ♪'; -webkit-text-fill-color: #7de8ff; }

/* celular: hoja abajo, video vertical */
@media (max-width: 640px) {
  .htv { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 20px); }
  .htv-screen { aspect-ratio: auto; height: min(42vh, 380px); }
  .htv-list { max-height: 22vh; }
  .htv.htv-mini { width: auto; }
  .htv-vol { flex-basis: 52px; width: 52px; }
}
@media (prefers-reduced-motion: reduce) { .htv-launch:hover { transform: none; } }
