/* ═══════════════════════════════════════════════════════════════════════
   CUENTA OFICIAL DE WILEP (js/oficial.js; mockup mockups/perfil-oficial-wilep.html, 2026-11-16)
   El aro de luz que gira alrededor del logo, la palomita, la franja "Estás como Wilep" y la fila para cambiar de cuenta.
   Solo los dibuja la web cuando el servidor dice `oficial: true`; nadie más los tiene. Un solo acento, sin emoji, nada por
   debajo de 12 px. El aro se detiene con prefers-reduced-motion. Prefijo of-.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* El aro elegido por Ariel el 16-nov (mockup: B · Colores del logo): el rojo del pin, el amarillo del sol, el verde y el celeste, girando.
     Es la única pieza de la app con más de un color además del mapa: son los colores del propio logo. */
  --of-luz: conic-gradient(from 0deg, #E8392E, #F8C62F, #3FAE4D, #2F9DDC, #E8392E);
  --of-seg: 5s;
  --of-alto: 46px;
  --of-sa: env(safe-area-inset-top, 0px);
}
html.en-app { --of-sa: 0px; }

/* ── El aro: ::before es el anillo de luz y ::after la misma luz difuminada que asoma por fuera. --t = tamaño, --g = grosor. ── */
.of-aro { --t: 46px; --g: 3px; --hueco: 2px; --of-fondo: var(--bg, #F1EEE8); position: relative; display: inline-grid; place-items: center; width: var(--t); height: var(--t);
  border-radius: 50%; flex: none; isolation: isolate; vertical-align: middle; line-height: 0; }
.of-aro img { display: block; width: calc(var(--t) - 2 * (var(--g) + var(--hueco))); height: calc(var(--t) - 2 * (var(--g) + var(--hueco))); border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 var(--hueco) var(--of-fondo); border: 0; margin: 0; max-width: none; }
.of-aro::before, .of-aro::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--of-luz); animation: of-giro var(--of-seg) linear infinite; pointer-events: none; }
.of-aro::before { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--g) - .5px), #000 calc(100% - var(--g))); mask: radial-gradient(farthest-side, transparent calc(100% - var(--g) - .5px), #000 calc(100% - var(--g))); }
.of-aro::after { z-index: -1; inset: -2px; filter: blur(calc(var(--g) * 2.2)); opacity: .6; }
.of-aro.oscuro { --of-fondo: #141311; }
.of-aro.claro { --of-fondo: var(--surf, #fff); }
@keyframes of-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .of-aro::before, .of-aro::after { animation: none; } }

/* ── La palomita: sello relleno del acento con la palomita blanca (el Verificado de siempre es un escudo de trazo) ── */
.of-marca { display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: -3px; margin-left: 5px; color: var(--acc, #F0733A); }
.of-marca.ch { width: 15px; height: 15px; vertical-align: -2px; margin-left: 4px; }
.of-marca.gr { width: 22px; height: 22px; vertical-align: -3px; margin-left: 7px; }
.of-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; line-height: 1.2; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--acc, #F0733A) 14%, transparent); color: var(--acc, #F0733A); white-space: nowrap; }

/* ── La franja "Estás como Wilep": fija arriba en todas las páginas mientras dura el cambio. Empuja lo que cuelga de --sa-arriba. ── */
html.of-activa { --sa-arriba: calc(var(--of-sa) + var(--of-alto)); }
html.of-activa.en-app { --sa-arriba: var(--of-alto); }
#of-franja { position: fixed; left: 0; right: 0; top: 0; z-index: 1450; height: calc(var(--of-alto) + var(--of-sa)); padding: var(--of-sa) 10px 0 12px; background: #1F1D1A; color: #fff;
  display: flex; align-items: center; gap: 9px; font-family: Outfit, system-ui, sans-serif; font-size: 13px; line-height: 1.2; }
#of-franja .of-aro { --t: 30px; --g: 2px; --hueco: 1px; --of-fondo: #1F1D1A; }
#of-franja .of-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#of-franja .of-txt b { font-weight: 500; }
#of-franja .of-volver { margin-left: auto; flex: none; min-height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
#of-franja .of-volver:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Las páginas que no cuelgan de --sa-arriba (el perfil, Ajustes): se corren con un margen. */
html.of-activa body.of-corrida { padding-top: var(--of-alto); }

/* ── La fila de la hoja Tu cuenta: "Cambiar a Wilep" / "Volver a Ariel" ── */
.w-drawer.tc-hoja .of-fila, .of-fila { display: flex; align-items: center; gap: 12px; width: auto; min-height: 64px; margin: 2px 12px 8px; padding: 10px 12px; border: 0; border-radius: 18px;
  background: var(--surf, #fff); color: var(--ink, #1F1D1A); box-shadow: var(--csh, 0 10px 30px rgba(31,29,26,.10)); font: inherit; text-align: left; cursor: pointer; }
.of-fila[hidden] { display: none; }
.of-fila .of-aro { --t: 42px; --g: 2.5px; --of-fondo: var(--surf, #fff); }
.of-fila .of-mono { width: 42px; height: 42px; border-radius: 50%; background: var(--ink, #1F1D1A); color: var(--surf, #fff); display: grid; place-items: center; font-size: 15px; font-weight: 500; flex: none; overflow: hidden; }
.of-fila .of-mono img { width: 100%; height: 100%; object-fit: cover; }
.of-fila .of-dos { min-width: 0; flex: 1; }
.of-fila .of-dos b { display: block; font-size: 16px; font-weight: 500; }
.of-fila .of-dos small { display: block; font-size: 13px; color: var(--muted, #6B675F); }
.of-fila > .trazo { margin: 0 0 0 auto; color: var(--muted, #6B675F); flex: none; }
.of-fila:disabled { opacity: .6; }

/* La cabecera de Tu cuenta y el botón redondo, estando como Wilep */
.of-cab-aro { --t: 56px; --g: 3px; }
#btn-cuenta .of-aro, [data-cuenta] .of-aro { --t: 40px; --g: 2.5px; position: absolute; inset: 0; margin: auto; }

/* ── "Publicas como Wilep" en la hoja del botón central ── */
.of-como { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--acc, #F0733A) 10%, var(--surf, #fff)); font-size: 14px; color: var(--ink, #1F1D1A); }
.of-como .of-aro { --t: 34px; --g: 2px; --hueco: 1.5px; --of-fondo: var(--surf, #fff); }
.of-como b { font-weight: 500; }

/* ── El perfil oficial (persona.html) ── */
.pr-ava.of-ava { background: none; overflow: visible; border: 0; box-shadow: none; width: 88px; height: 88px; }
.pr-ava.of-ava .of-aro { --t: 88px; --g: 4px; --hueco: 3px; }
.pr-ava.of-ava .pr-ava-mas { z-index: 2; }
.of-bio { margin: 12px 16px 0; padding: 12px 14px; border-radius: 18px; background: var(--surf, #fff); font-size: 14px; line-height: 1.45; color: var(--ink, #1F1D1A); }
.of-bio b { font-weight: 500; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.of-bio b .of-marca { margin: 0; }
.of-bio small { display: block; color: var(--muted, #6B675F); font-size: 12px; margin-top: 4px; }

/* ── En el feed de Videos (oscuro) ── */
.vd-ava.of-ava { border: 0; background: none; width: 52px; height: 52px; }
.vd-ava.of-ava .of-aro { --t: 52px; --g: 3px; --of-fondo: #141311; }
.vd-item .vd-mono.of-ava { background: none; width: 96px; height: 96px; overflow: visible; }
.vd-mono.of-ava .of-aro { --t: 96px; --g: 4px; --hueco: 3px; --of-fondo: #141311; }
.vd-tipo.of-tipo { padding-left: 6px; }
.vd-tipo.of-tipo .of-marca { margin: 0; width: 16px; height: 16px; vertical-align: 0; }

/* ── En los comentarios y en la campana ── */
.of-ava-com { background: none !important; overflow: visible !important; }
.of-ava-com .of-aro { --t: 38px; --g: 2px; --hueco: 1.5px; --of-fondo: var(--surf, #fff); }
.notif-ico.of-ico { background: none; padding: 0; }
.notif-ico.of-ico .of-aro { --t: 40px; --g: 2.5px; --of-fondo: var(--surf, #fff); }

/* ── Admin → Sistema → Reglas: la tarjeta "Cuenta oficial" ── */
.of-admin-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.of-admin-cab .of-aro { --t: 48px; --g: 3px; --of-fondo: var(--surf, #fff); }
.of-admin-num { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted, #6B675F); margin-bottom: 10px; }
.of-admin-num b { color: var(--ink, #1F1D1A); font-weight: 500; font-size: 16px; margin-right: 4px; }
.of-admin-lista { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.of-admin-lista li { display: flex; gap: 10px; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line, rgba(31,29,26,.08)); }
.of-admin-lista time { color: var(--muted, #6B675F); white-space: nowrap; }

/* ── Estando como Wilep, la hoja Tu cuenta no muestra lo que esa cuenta no usa (vales, boletos, tokens, membresía, tienda, modos, salir) ── */
html.of-activa #tc-mosaico, html.of-activa #tc-membresia, html.of-activa #btn-tienda, html.of-activa #tc-modo, html.of-activa #drawer-modos,
html.of-activa #btn-logout, html.of-activa #modo-rotulo, html.of-activa #btn-dashboard, html.of-activa #btn-mostrador, html.of-activa #btn-promoter { display: none !important; }
