/* ITN Shorts Social */
:root { --itn-glass: rgba(24,24,28,.42); --itn-line: rgba(255,255,255,.12); --itn-acc: var(--main-color, #ff0167); }

/* ---------- Menu inferior (solo movil): pildora flotante de cristal estilo iOS ----------
   --short-nav-h = lo que ocupa abajo (margen + pildora + zona segura): sube titulo, botones, progreso, anuncio y hojas (ver single-short.php).
   --short-prog-gap / --short-prog-side: la barra de progreso flota sobre la pildora, con margen lateral. */
.short-nav { display: none; }
@media (max-width: 768px) {
  :root { --short-nav-h: calc(74px + env(safe-area-inset-bottom, 0px)); --short-prog-gap: 16px; --short-prog-side: 16px; --short-nav-side: clamp(16px, 5.1vw, 24px); }
  body.ui-hidden, body.ad-lock { --short-nav-h: 0px; --short-prog-gap: 0px; }
  body.itn-soc-page { padding-bottom: calc(var(--short-nav-h) + 8px); }
  .short-nav { position: fixed; left: var(--short-nav-side); right: var(--short-nav-side); bottom: calc(15px + env(safe-area-inset-bottom, 0px)); z-index: 20; height: 59px; box-sizing: border-box; padding: 0 4px; align-items: center;
    display: grid; grid-template-columns: repeat(5, 1fr);   /* 5 columnas iguales: los iconos y las capsulas quedan equidistantes */
    transform-origin: 50% 100%; transition: transform .25s ease;
    border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(60,55,55,.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.05); backdrop-filter: blur(24px) saturate(1.8) brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.1), 0 8px 30px rgba(0,0,0,.35); }
  .short-nav a { min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .short-nav-icon { position: relative; display: flex; align-items: center; justify-content: center; width: calc(100% - 4px); height: 49px; border-radius: 25px; }
  .short-nav a.is-active .short-nav-icon { background: rgba(255,255,255,.18); }   /* item activo en capsula (en el feed, Home) */
  .short-nav-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .short-nav-main .short-nav-icon { background: var(--itn-acc); }   /* + (añadir short): capsula fucsia */
  .short-nav-main .short-nav-icon svg { stroke-width: 2.8; }
  .short-nav-ava { width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.85); }
  .short-nav-badge { position: absolute; right: 8px; bottom: 6px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; background: #ff3b30; border: 1.5px solid rgba(60,55,55,.9); }
  /* Franja inferior difuminada detras de la barra y el menu: blur progresivo (mascara) para que el video se funda con el menu.
     Va dentro de cada short (debajo del titulo y los botones, que tienen z-index mayor). */
  .short-item::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--short-nav-h) + 48px); z-index: 2; pointer-events: none;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    -webkit-mask-image: linear-gradient(to top, #000 40%, transparent); mask-image: linear-gradient(to top, #000 40%, transparent); }
  .short-item.ad-item::before { content: none; }
  /* Al deslizar de short en short (clase puesta por social.js): la pildora se encoge y la cabecera se desvanece; vuelven al parar o al subir */
  body.itn-scrolling .short-nav { transform: scale(.8); }
  body#shorts header { transition: opacity .25s ease, transform .25s ease; }
  body#shorts.itn-scrolling header { opacity: 0; transform: translateY(-14px); pointer-events: none; }
  body.ui-hidden .short-item::before { display: none; }
}
/* ---------- Actor del short, encima del titulo ---------- */
.short-actor { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; position: relative; z-index: 3; }
/* Aro fino de novedades: solo con contenido nuevo del actor (clase is-new la pone social.js); sin novedades, sin aro (mismo tamaño). */
.short-actor-av { flex: 0 0 auto; width: 44px; height: 44px; box-sizing: border-box; padding: 2px; border-radius: 50%; border: 2px solid transparent; display: block; }
.short-actor-av.is-new { border-color: var(--main-color, #ff0167); }
.short-actor-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.short-actor-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.short-meta .short-actor-name span { transform: none; font-size: inherit !important; }
.short-meta .itn-adcard span { transform: none; }
.short-meta .itn-adcard-dur { font-size: 11px !important; font-weight: 600; line-height: 1.2; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.6); }
.short-meta .itn-adcard-sub span { font-size: 12px !important; }   /* el tema escala los span de .short-meta a 0.85 */
.short-actor-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
/* Los botones heredan del tema padding 5px 40px y fondo rosa con !important: aqui se reponen. */
.short-actor-follow { flex: 0 0 auto; height: 34px; min-width: 0; padding: 0 14px; border: 0; border-radius: 12px; background: #e4e6eb !important; color: #111 !important; font-size: 16px; font-weight: 600; line-height: 34px; cursor: pointer; }
.short-actor-follow.is-on { background: rgba(255,255,255,.28) !important; color: #fff !important; }

/* ---------- Barra superior de las paginas propias (perfil, mensajes, actor): atras y logo, siempre hacia el feed de shorts ---------- */
body.itn-soc-page { background: #0f0f0f; }
.itn-sh { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 12px 0;
  background: rgba(15,15,15,.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.itn-sh-back { position: absolute; left: 12px; top: calc(8px + env(safe-area-inset-top, 0px)); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; }
.itn-sh-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.itn-sh-logo img { display: block; width: 140px; height: auto; }

/* ---------- Boton de comentarios del feed (hereda el estilo de .short-controls button) ---------- */
.short-controls .btn-comment svg, .short-controls .btn-repost svg, .short-controls .btn-more svg { stroke: currentColor; }
.short-controls .btn-like.active { color: #ff3040; }    /* corazon rojo relleno al dar me gusta */
.short-controls .btn-repost.active { color: var(--itn-acc); }
.short-controls .btn-more svg { fill: none; }

/* "Ver mas" de titulos largos (el titulo se corta a 2 lineas) */
.short-meta .itn-seemore { display: block; margin: 0 0 4px; padding: 0; width: auto; min-width: 0; height: auto; border: 0; border-radius: 0; background: transparent !important; color: rgba(255,255,255,.7);
  font-size: 14px; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.55); cursor: pointer; }

/* Menu "≡" (favorito, sonido, copiar enlace, mas opciones) */
.itn-sheet .itn-more-box { height: auto; max-height: 40dvh; padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }   /* hoja compacta: solo la altura de sus filas */
.itn-more-handle { width: 36px; height: 4px; margin: 0 auto 6px; border-radius: 2px; background: rgba(255,255,255,.35); }
.itn-more-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; min-width: 0; padding: 0 18px; border: 0; border-radius: 0; background: transparent !important; color: #fff; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.itn-more-row svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


/* ---------- Hoja de comentarios ---------- */
body.itn-sheet-open { overflow: hidden; }
.itn-sheet { position: fixed; inset: 0; z-index: 90; --itn-kb: 0px; }
.itn-sheet[hidden] { display: none; }
.itn-sheet-bd { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.itn-sheet-box { position: absolute; left: 50%; bottom: var(--itn-kb); transform: translateX(-50%); width: 100%; max-width: 520px; height: 72dvh; max-height: calc(100dvh - var(--itn-kb) - 40px);
  display: flex; flex-direction: column; color: #f2f2f2; background: rgba(18,18,22,.88); border-radius: 16px 16px 0 0;
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); border: 1px solid var(--itn-line); border-bottom: 0; }
.itn-sheet-hd { display: flex; align-items: center; justify-content: center; position: relative; padding: 14px 44px; font-weight: 600; font-size: 15px; }
/* Los botones heredan del tema padding 5px 40px y fondo rosa con !important: aqui se reponen (fondo con !important). */
.itn-sheet-x { position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; min-width: 0; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14) !important; color: #fff; font-size: 18px; line-height: 32px; text-align: center; cursor: pointer; }
.itn-cm-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; -webkit-overflow-scrolling: touch; }
.itn-cm { display: flex; gap: 10px; padding: 10px 0; }
.itn-cm.is-reply { padding: 8px 0 0; }
.itn-cm-av img, .itn-av img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.itn-cm.is-reply .itn-cm-av img { width: 26px; height: 26px; }
.itn-cm-main { flex: 1; min-width: 0; }
.itn-cm-name { color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600; text-decoration: none; }
.itn-cm-text { font-size: 15px; line-height: 1.35; margin: 2px 0 4px; word-break: break-word; white-space: pre-wrap; }
.itn-cm-meta { display: flex; gap: 14px; font-size: 12px; color: rgba(255,255,255,.55); }
.itn-cm-meta button, .itn-cm-toggle { background: transparent !important; border: 0; padding: 0; width: auto; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.itn-cm-toggle { display: block; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.55); }
.itn-cm-toggle[hidden] { display: none; }
.itn-cm-like { background: transparent !important; border: 0; padding: 0; min-width: 0; height: auto; width: 40px; flex: 0 0 40px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(255,255,255,.55); font-size: 12px; cursor: pointer; }
.itn-cm-like svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.itn-cm-like.on { color: var(--itn-acc); }
.itn-cm-like.on svg { fill: currentColor; }
.itn-cm-reply { padding: 6px 16px; font-size: 12px; color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); cursor: pointer; }
.itn-cm-reply[hidden] { display: none; }
.itn-cm-form, .itn-chat-form { display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--itn-line); }
.itn-cm-form input, .itn-chat-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; border-radius: 20px; background: rgba(255,255,255,.1); color: #fff; font-size: 16px; }
.itn-cm-form input::placeholder, .itn-chat-form input::placeholder { color: rgba(255,255,255,.45); }
.itn-cm-send { height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: var(--itn-acc); color: #fff; font-weight: 600; cursor: pointer; }
.itn-cm-form .itn-btn { flex: 1; border-radius: 20px; }

/* ---------- Compartir por mensaje ---------- */
.itn-share-box { height: 60dvh; }
.itn-share-search { padding: 0 12px 8px; }
.itn-share-search input { width: 100%; height: 40px; padding: 0 14px; box-sizing: border-box; border: 0; border-radius: 20px; background: rgba(255,255,255,.1); color: #fff; font-size: 16px; }
.itn-share-search input::placeholder { color: rgba(255,255,255,.45); }
.itn-share-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.itn-share-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.itn-share-row .itn-cm-send:disabled { background: rgba(255,255,255,.14) !important; cursor: default; }
.itn-share-more { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--itn-line); display: flex; }
.itn-share-more .itn-btn { flex: 1; }
.itn-msg-short { display: block; width: 150px; text-decoration: none; color: inherit; }
.itn-msg-short img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; margin-bottom: 6px; background: #000; }
.itn-msg-short span { font-size: 13px; }

/* ---------- Comunes ---------- */
body.itn-soc-page #content { padding: 0 !important; margin: 0; }   /* el tema deja 48px arriba */
.itn-soc-main { padding-bottom: calc(var(--short-nav-h, 0px) + 24px); }
.itn-soc-wrap { max-width: 720px; margin: 16px auto; padding: 18px; color: #f2f2f2; background: #131316; border-radius: 14px; box-sizing: border-box; }
.itn-soc-wrap a { color: inherit; }
.itn-soc-center { text-align: center; padding: 40px 18px; }
.itn-soc-h1 { font-size: 22px; margin: 0 0 14px; color: #fff; }
.itn-soc-h2 { font-size: 16px; margin: 22px 0 10px; color: #fff; }
.itn-soc-muted { color: rgba(255,255,255,.5); font-size: 14px; }
.itn-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12) !important; color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.itn-btn-main { background: var(--itn-acc) !important; }
.itn-btn-main.is-on { background: rgba(255,255,255,.12) !important; }
.itn-toast { position: fixed; left: 50%; bottom: calc(var(--short-nav-h, 0px) + 24px); transform: translateX(-50%); z-index: 100; padding: 10px 16px; border-radius: 10px; background: rgba(0,0,0,.85); color: #fff; font-size: 14px; }

/* ---------- Perfil ---------- */
.itn-soc-wrap.itn-prof { background: transparent; padding: 12px 0 0; margin: 0 auto; border-radius: 0; }   /* perfil sin tarjeta */
.itn-prof-top { display: flex; flex-direction: column-reverse; align-items: center; gap: 10px; text-align: center; padding: 0 16px; }
.itn-prof-name { font-size: 20px; font-weight: 600; margin: 0; color: #fff; word-break: break-word; }
.itn-prof-handle { color: rgba(255,255,255,.5); margin-top: 4px; word-break: break-all; }
.itn-prof-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.itn-prof-stats { display: flex; justify-content: center; gap: 28px; margin: 14px 0; }
.itn-prof-stats b { display: block; font-size: 18px; color: #fff; }
.itn-prof-stats span { font-size: 13px; color: rgba(255,255,255,.5); }
.itn-prof-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 16px; }
.itn-prof-actions .itn-btn { flex: 0 1 140px; height: 36px; min-height: 36px; border-radius: 10px; font-size: 15px; }
.itn-prof-bio { margin: 14px 16px 0; text-align: center; line-height: 1.4; word-break: break-word; }
.itn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 16px; }
.itn-grid-item { position: relative; display: block; aspect-ratio: 9 / 16; background: #000; overflow: hidden; }
.itn-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.itn-grid-meta { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 4px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 0 6px rgba(0,0,0,.7); }
.itn-grid-meta svg { width: 14px; height: 14px; fill: #fff; }
.itn-actor-follow { width: min(220px, 100%); height: 36px; padding: 0; border-radius: 10px; font-size: 15px; line-height: 36px; }
.itn-actor-follow:not(.is-on) { background: var(--itn-acc) !important; color: #fff !important; }

/* ---------- Buscador de shorts y actores ---------- */
.itn-search { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: rgba(10,10,12,.86);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); color: #f2f2f2; }
.itn-search[hidden] { display: none; }
.itn-search-hd { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 10px; }
.itn-search-field { flex: 1; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; margin: 0; border-radius: 21px; background: rgba(255,255,255,.12); }
.itn-search-field svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: rgba(255,255,255,.6); stroke-width: 2; stroke-linecap: round; }
.itn-search-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 16px; -webkit-appearance: none; appearance: none; }
.itn-search-field input::placeholder { color: rgba(255,255,255,.45); }
.itn-search-x { flex: 0 0 auto; width: 32px; height: 32px; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14) !important; color: #fff; font-size: 18px; line-height: 32px; text-align: center; cursor: pointer; }
.itn-search-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px calc(24px + var(--short-nav-h, 0px)); -webkit-overflow-scrolling: touch; }
.itn-search-h { margin: 14px 0 8px; font-size: 15px; font-weight: 700; color: #fff; }
.itn-sr-actor { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; color: inherit; }
.itn-sr-actor img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 46px; }
.itn-sr-actor-main { min-width: 0; }
.itn-sr-actor-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 600; }
.itn-sr-actor-main span { font-size: 13px; color: rgba(255,255,255,.55); }
.itn-more { margin-top: 12px; width: 100%; }
.itn-prof-comments { list-style: none; margin: 0; padding: 0; }
.itn-prof-comments li { padding: 10px 0; border-bottom: 1px solid var(--itn-line); font-size: 14px; }

/* ---------- Bandeja y chat ---------- */
.itn-inbox-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--itn-line); text-decoration: none; }
.itn-inbox-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 48px; }
.itn-inbox-main { flex: 1; min-width: 0; }
.itn-inbox-main b { display: block; color: #fff; }
.itn-inbox-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.55); font-size: 14px; }
.itn-inbox-row.unread .itn-inbox-main span { color: #fff; font-weight: 600; }
.itn-inbox-row em { font-style: normal; font-size: 12px; color: rgba(255,255,255,.45); }
.itn-dot { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--itn-acc); color: #fff; font: 700 12px/20px sans-serif; font-style: normal; text-align: center; }
.itn-chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - 140px - var(--short-nav-h, 0px)); min-height: 360px; padding: 0; overflow: hidden; }
.itn-chat-hd { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--itn-line); }
.itn-chat-back { font-size: 30px; line-height: 1; text-decoration: none; padding: 0 6px; }
.itn-chat-name { flex: 1; font-weight: 600; color: #fff; text-decoration: none; }
.itn-chat-block { background: transparent !important; border: 0; padding: 0; width: auto; color: rgba(255,255,255,.5); font-size: 13px; cursor: pointer; }
.itn-chat-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.itn-chat-older { align-self: center; }
.itn-msg { max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.35; word-break: break-word; white-space: pre-wrap; }
.itn-msg em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; opacity: .6; }
.itn-msg.mine { align-self: flex-end; background: var(--itn-acc); color: #fff; border-bottom-right-radius: 4px; }
.itn-msg.theirs { align-self: flex-start; background: rgba(255,255,255,.12); border-bottom-left-radius: 4px; }
