/* =========================================================================
   WireVet · Centro de Documentos Legales (Privacidad / Términos de Uso)
   Re-skin alineado a la tonalidad del sistema (workspace clínico):
   acento azul #1a6fc4, neutros grises, fondos #f9fafb/#fff y tipografía
   del sistema. Lector responsive (móvil, tablet, escritorio) con texto
   que se adapta a cualquier ancho. Scopeado a #wv-politicas.
   ========================================================================= */

#wv-politicas {
    --pol-paper:    #f9fafb;
    --pol-paper-2:  #ffffff;
    --pol-ink:      #1f2937;
    --pol-ink-soft: #6b7280;
    --pol-line:     #e5e7eb;
    --pol-line-2:   #eef0f3;
    --pol-primary:  #1a6fc4;
    --pol-primary-d:#145390;
    --pol-primary-l:#eaf2fb;
    --pol-font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pol-font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    font-family: var(--pol-font-body);
    color: var(--pol-ink);
    background:
        radial-gradient(1100px 460px at 88% -12%, #eef4fb 0%, transparent 60%),
        var(--pol-paper);
    margin: -1.5rem -1.5rem 0;
    padding: 0 0 3rem;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}
#wv-politicas *, #wv-politicas *::before, #wv-politicas *::after { box-sizing: border-box; }
#wv-politicas ::selection { background: var(--pol-primary); color: #fff; }

/* ---------------- Hero ---------------- */
.wv-pol-hero {
    position: relative; overflow: hidden;
    padding: 2.4rem clamp(1.2rem, 4vw, 3rem) 2rem;
    background: linear-gradient(180deg, #145390 0%, #1a6fc4 100%);
    border-bottom: 1px solid var(--pol-line);
}
.wv-pol-hero__bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 14% 18%, rgba(255,255,255,.12) 0, transparent 38%),
        radial-gradient(circle at 86% 92%, rgba(255,255,255,.08) 0, transparent 42%);
}
.wv-pol-hero__inner { position: relative; max-width: 880px; margin: 0 auto; }
.wv-pol-hero__kicker {
    display: inline-block; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    font-size: .68rem; color: #c3dcf5; margin-bottom: .4rem;
}
.wv-pol-hero__kicker i { margin-right: .3rem; }
.wv-pol-hero__title {
    font-family: var(--pol-font-display); font-weight: 700;
    font-size: clamp(1.7rem, 3.8vw, 2.6rem); line-height: 1.1; color: #fff; margin: 0 0 .5rem;
    letter-spacing: -.02em; text-wrap: balance;
}
.wv-pol-hero__title em { font-style: normal; font-weight: 700; color: #bcd9f5; }
.wv-pol-hero__sub { color: #d5e6f7; font-size: clamp(.9rem, 2.6vw, 1rem); margin: 0; max-width: 58ch; }

/* ---------------- Pestañas ---------------- */
.wv-pol-tabs {
    position: sticky; top: 0; z-index: 10;
    display: flex; gap: .25rem; align-items: stretch;
    max-width: 880px; margin: 0 auto; padding: .5rem clamp(1rem, 4vw, 3rem) 0;
    background: linear-gradient(180deg, var(--pol-paper) 70%, transparent);
}
.wv-pol-tab {
    position: relative; display: inline-flex; align-items: center; gap: .5rem;
    border: 0; background: transparent; cursor: pointer; font-family: inherit;
    font-size: .95rem; font-weight: 600; color: var(--pol-ink-soft);
    padding: .9rem 1.1rem; border-radius: 12px 12px 0 0; transition: color .16s, background .16s;
}
.wv-pol-tab i { font-size: .9rem; }
.wv-pol-tab:hover { color: var(--pol-primary-d); background: var(--pol-primary-l); }
.wv-pol-tab.is-active { color: var(--pol-primary-d); }
.wv-pol-tabs__ink {
    position: absolute; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--pol-primary); transition: left .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
    left: 0; width: 0;
}
.wv-pol-tabs::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--pol-line);
}

/* ---------------- Lector ---------------- */
.wv-pol-reader { max-width: 880px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.wv-pol-panel { animation: polFade .35s ease; }
.wv-pol-panel[hidden] { display: none; }
@keyframes polFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* documento legal */
.pol-doc {
    background: var(--pol-paper-2); border: 1px solid var(--pol-line); border-radius: 16px;
    padding: clamp(1.4rem, 4vw, 2.8rem); margin-top: 1.6rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 14px 40px -22px rgba(15,23,42,.18);
    font-size: clamp(.95rem, 2.6vw, 1.01rem); line-height: 1.72; color: var(--pol-ink);
    /* El texto se adapta a cualquier ancho: palabras largas y URLs no desbordan. */
    overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
}
.pol-doc__title {
    font-family: var(--pol-font-display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.1rem);
    line-height: 1.12; color: var(--pol-ink); margin: 0 0 1rem; letter-spacing: -.01em; text-wrap: balance;
}
.pol-doc h2 {
    font-family: var(--pol-font-display); font-weight: 700; font-size: clamp(1.2rem, 3vw, 1.35rem); color: var(--pol-ink);
    margin: 2rem 0 .6rem; padding-top: 1.2rem; border-top: 1px solid var(--pol-line-2); letter-spacing: -.01em;
}
.pol-doc h3 { font-weight: 700; font-size: clamp(1rem, 2.6vw, 1.08rem); color: var(--pol-ink); margin: 1.4rem 0 .4rem; }
.pol-doc p { margin: 0 0 1rem; }
.pol-doc ul, .pol-doc ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.pol-doc li { margin-bottom: .5rem; }
.pol-doc b, .pol-doc strong { font-weight: 700; color: var(--pol-ink); }
.pol-doc a, .pol-doc a.accent { color: var(--pol-primary-d); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.pol-doc a:hover { color: var(--pol-primary); }
.pol-doc em { font-style: italic; }

/* Recuadro destacado (blockquote del editor Quill = "nota / simplificando") */
.pol-doc blockquote {
    margin: 1.1rem 0; padding: .8rem 1.1rem;
    background: var(--pol-primary-l); border-left: 4px solid var(--pol-primary);
    border-radius: 0 10px 10px 0; color: var(--pol-ink); font-size: .96em;
}
.pol-doc blockquote p:last-child { margin-bottom: 0; }

/* Contenido editado con Quill renderizado fuera del editor:
   se usa la clase .ql-editor (para que las listas de Quill se vean bien con
   quill.min.css global), pero neutralizamos su padding/tipografía para que
   herede la estética de .pol-doc. */
.pol-doc .ql-editor {
    padding: 0; min-height: 0; height: auto;
    font-family: inherit; font-size: inherit; line-height: inherit; color: inherit;
    white-space: normal;
}
.pol-doc .ql-editor.ql-blank::before { content: none; }

/* clases provenientes del sitio */
.pol-doc .legal-updated {
    display: inline-block; font-size: .82rem; font-weight: 600; color: var(--pol-primary-d);
    background: var(--pol-primary-l); border-radius: 999px; padding: .3rem .85rem; margin-bottom: 1.2rem;
}
.pol-doc .legal-intro { font-size: clamp(1rem, 2.8vw, 1.08rem); color: var(--pol-ink-soft); line-height: 1.62; }
.pol-doc .legal-block { margin: 0 0 .4rem; }
.pol-doc .legal-simple { margin: 0 0 .4rem; }

/* pie legal */
.pol-legal-foot {
    margin-top: 1.6rem; padding: 1.3rem; text-align: center; color: var(--pol-ink-soft);
    border-top: 1px dashed var(--pol-line); font-size: .88rem;
}
.pol-legal-foot__co { margin: 0 0 .35rem; }
.pol-legal-foot__co strong { color: var(--pol-ink); }
.pol-legal-foot__links { margin: 0 0 .4rem; }
.pol-legal-foot__links a { color: var(--pol-primary-d); text-decoration: none; font-weight: 600; }
.pol-legal-foot__links a:hover { text-decoration: underline; }
.pol-legal-foot__links .sep { margin: 0 .5rem; color: var(--pol-line); }
.pol-legal-foot__note { margin: 0; font-size: .8rem; opacity: .85; }

/* ---------------- Tema oscuro ---------------- */
body.dark #wv-politicas {
    --pol-paper: #181c27; --pol-paper-2: #1e2433; --pol-ink: #e7ebf3; --pol-ink-soft: #9aa3b4;
    --pol-line: #313848; --pol-line-2: #2a3140; --pol-primary-l: rgba(26,111,196,.16);
    background: radial-gradient(1100px 460px at 88% -12%, #1b2430 0%, transparent 60%), #161a24;
}
body.dark #wv-politicas .wv-pol-tabs { background: linear-gradient(180deg, #161a24 70%, transparent); }
body.dark #wv-politicas .pol-doc { box-shadow: 0 14px 40px -22px rgba(0,0,0,.6); }

/* ---------------- Responsive ---------------- */
@media (max-width: 700px) {
    .wv-pol-tab { font-size: .88rem; padding: .8rem .7rem; }
    .wv-pol-tab span { white-space: nowrap; }
}
@media (max-width: 600px) {
    #wv-politicas { margin: -1rem -1rem 0; }
}
@media (max-width: 420px) {
    /* En pantallas muy angostas, las pestañas pueden envolver sin recortarse. */
    .wv-pol-tabs { flex-wrap: wrap; }
    .wv-pol-tab { flex: 1 1 auto; justify-content: center; }
}
