/* CONTRIX · Revisión legal: estilos aislados de los demás módulos. */
.cx-legal,
.cx-legal * { box-sizing: border-box; }
.cx-legal {
    --legal-navy: #142445;
    --legal-blue: #1e64e9;
    --legal-blue-dark: #1246a5;
    --legal-muted: #66758c;
    --legal-border: #dce5f1;
    --legal-card: #fff;
    max-width: 1440px;
    margin: 0 auto;
    padding: 22px clamp(12px, 2vw, 34px) 40px;
    color: var(--legal-navy);
    font-size: 15px;
}
.cx-legal-hero { display: flex; align-items: center; gap: 18px; padding: 8px 2px 22px; }
.cx-legal-hero-icon {
    flex: 0 0 60px; width: 60px; height: 60px; border-radius: 17px;
    display: grid; place-items: center; background: linear-gradient(145deg,#296bc7,#173b6d);
    color: #fff; box-shadow: 0 9px 20px rgba(20,67,138,.17);
}
.cx-legal-hero-icon svg { width: 33px; height: 33px; }
.cx-legal-eyebrow { margin: 0 0 5px; color: #2564ca; font-size: .73rem; font-weight: 800; letter-spacing: .075em; }
.cx-legal-hero h1 { margin: 0 0 4px; color: #162644; font-size: clamp(23px,2.2vw,34px); letter-spacing: -.035em; line-height: 1.15; font-weight: 800; }
.cx-legal-hero-copy > p:last-child { margin: 0; color: #556985; font-size: .98rem; line-height: 1.5; }
.cx-legal-draft {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    margin: 0 0 19px; padding: 14px 20px;
    border-radius: 15px; border: 1px solid #f0d389; background: #fff9e8;
    color: #8a4a12; font-size: .91rem; line-height: 1.5;
}
.cx-legal-draft strong { font-weight: 750; }
.cx-legal-draft-icon {
    display: inline-grid; flex: 0 0 24px; place-items: center;
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ed9b26;
    color: #b97116; font-weight: 900; font-size: 13px;
}
.cx-legal-draft-separator { height: 25px; width: 1px; background: #dfb862; margin: 0 6px; }
.cx-legal-error { padding: 14px 18px; margin: 0 0 17px; color: #9a2525; background: #fdf0f1; border: 1px solid #f0babe; border-radius: 13px; }
.cx-legal-card {
    background: var(--legal-card); border: 1px solid var(--legal-border);
    border-radius: 19px; padding: clamp(15px,2.2vw,27px);
    box-shadow: 0 12px 36px rgba(23,44,85,.08);
}
.cx-legal-card-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:18px; margin-bottom: 18px; }
.cx-legal-document-heading { display:flex; gap:14px; align-items:center; min-width:0; }
.cx-legal-document-icon {
    flex: 0 0 53px; width:53px; height:53px; display:grid; place-items:center;
    border-radius:14px; background:#eaf2ff; color:#2461bf; border:1px solid #d7e5fd;
}
.cx-legal-document-icon svg { width: 31px; height: 31px; }
.cx-legal-document-heading h2 { margin:0 0 3px; font-weight:800; letter-spacing:-.025em; line-height:1.2; font-size:clamp(19px,2vw,25px); color:#182743; }
.cx-legal-document-heading p { margin:0; color:var(--legal-muted); font-size:.93rem; }
.cx-legal-metadata { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.cx-legal-chip {
    display:inline-flex; align-items:center; gap:7px; min-height:36px;
    padding:7px 11px; border:1px solid #cbdcf5; border-radius:12px;
    background:#edf4ff; color:#264b85; font-size:.8rem; overflow-wrap:anywhere;
}
.cx-legal-chip strong { font-weight:700; }
.cx-legal-chip svg { flex:0 0 15px; width:15px; height:15px; }
.cx-legal-chip-muted { color:#7e6116; background:#fff8e5; border-color:#eddca9; }
.cx-legal-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; border-bottom:1px solid var(--legal-border); padding-bottom:13px; margin-bottom:15px; }
.cx-legal-languages { display:flex; width:min(100%,440px); gap:4px; padding:4px; border-radius:12px; background:#edf3fb; border:1px solid #d7e3f3; }
.cx-legal-languages a {
    display:flex; justify-content:center; align-items:center; gap:9px;
    flex:1; border-radius:9px; padding:8px 12px; color:#264066;
    font-weight:650; font-size:.92rem; text-decoration:none; transition:background .12s, color .12s;
}
.cx-legal-languages a span { font-size:.67rem; font-weight:800; background:#dce7f7; color:#23416e; padding:4px 5px; border-radius:5px; }
.cx-legal-languages a.is-selected { background:linear-gradient(155deg,#246efa,#1350b7); color:#fff; box-shadow:0 4px 10px rgba(17,74,167,.20); }
.cx-legal-languages a.is-selected span { color:#fff; background:rgba(255,255,255,.22); }
.cx-legal-scroll-hint { font-size:.79rem; color:#7b8aa2; }
.cx-legal-reader {
    max-height: min(52vh, 550px); min-height:280px; overflow-y:auto; overflow-x:hidden;
    background:#fff; border:1px solid #e0e7f1; border-radius:14px;
    padding:clamp(18px,2vw,26px); box-shadow:inset 0 0 0 4px rgba(247,249,253,.8);
    color:#293547; line-height:1.78; font-size:.94rem; overflow-wrap:anywhere;
    scrollbar-width:thin; scrollbar-color:#bdcadb #eef3f9;
}
.cx-legal-reader:focus-visible { outline:3px solid #74a5f8; outline-offset:2px; }
.cx-legal-reader p { margin:0 0 14px; }
.cx-legal-text-status { color:#8c5e1a; font-weight:700; font-size:.8rem; letter-spacing:.025em; }
.cx-legal-section-title {
    margin:22px 0 16px; background:#edf4ff; color:#183f79;
    padding:11px 13px; font-size:1.02rem; line-height:1.4;
    border-left:4px solid #2c73e4; border-radius:8px; font-weight:800;
}
.cx-legal-section-title:first-of-type { margin-top:2px; }
.cx-legal-subheading { margin:20px 0 10px; color:#194579; font-size:.98rem; font-weight:750; }
.cx-legal-paragraph { white-space:pre-line; }
.cx-legal-clause-title { color:#183e78; font-weight:800; }
.cx-legal-consent {
    margin-top:20px; border:1px solid #c9daf5; border-radius:15px;
    padding:19px 20px 15px; background:linear-gradient(115deg,#f3f8ff,#eaf3ff);
}
.cx-legal-consent-main { display:flex; gap:20px; justify-content:space-between; align-items:center; }
.cx-legal-consent-copy { flex:1; min-width:0; }
.cx-legal-checkbox-row { display:flex; align-items:flex-start; gap:12px; cursor:pointer; color:#172e52; font-size:.91rem; font-weight:650; line-height:1.55; }
.cx-legal-checkbox-row input, .cx-legal-marketing input { accent-color:#1758cf; cursor:pointer; }
.cx-legal-checkbox-row input { flex:0 0 20px; width:20px; height:20px; margin-top:2px; }
.cx-legal-consent-hint { color:#5e7393; margin:7px 0 0 32px; font-size:.78rem; line-height:1.5; }
.cx-legal-primary {
    flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:9px;
    min-height:48px; min-width:216px; padding:11px 19px; color:#fff;
    background:linear-gradient(160deg,#2a78f6,#1250bf); border:1px solid #1555bd;
    border-radius:12px; box-shadow:0 7px 15px rgba(29,97,199,.19);
    font-size:.94rem; font-weight:800; transition:transform .12s, opacity .12s;
}
.cx-legal-primary svg { width:18px; height:18px; }
.cx-legal-primary:hover:not(:disabled) { transform:translateY(-1px); }
.cx-legal-primary:disabled { opacity:.58; cursor:not-allowed; box-shadow:none; }
.cx-legal-arrow { font-size:1.35rem; line-height:1; margin-left:3px; }
.cx-legal-consent-secondary { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; border-top:1px solid #d4e1f3; margin-top:15px; padding-top:12px; }
.cx-legal-marketing { display:flex; align-items:flex-start; gap:8px; font-size:.8rem; color:#5d6f89; cursor:pointer; }
.cx-legal-marketing input { width:15px; height:15px; margin-top:2px; }
.cx-legal-signout, .cx-legal-back-login { color:#1c5bc0; font-size:.86rem; font-weight:650; text-decoration:none; }
.cx-legal-signout:hover, .cx-legal-back-login:hover { text-decoration:underline; }
.cx-legal-public-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-top:20px; padding:17px 18px; border-radius:12px; background:#f0f5fd; color:#6c7b8e; font-size:.87rem; }
@media (max-width: 900px) {
    .cx-legal { padding-inline:10px; }
    .cx-legal-card-header { align-items:flex-start; }
    .cx-legal-metadata { width:100%; }
    .cx-legal-consent-main { align-items:stretch; flex-direction:column; }
    .cx-legal-primary { align-self:stretch; }
}
@media (max-width: 620px) {
    .cx-legal-hero { align-items:flex-start; gap:11px; }
    .cx-legal-hero-icon { flex-basis:45px; width:45px; height:45px; border-radius:12px; }
    .cx-legal-hero-icon svg { width:25px; height:25px; }
    .cx-legal-draft-separator { display:none; }
    .cx-legal-card { border-radius:13px; padding:14px; }
    .cx-legal-reader { max-height:55vh; padding:16px; font-size:.9rem; }
    .cx-legal-scroll-hint { display:none; }
    .cx-legal-chip { font-size:.74rem; }
    .cx-legal-consent { padding:13px; }
}
@media (prefers-reduced-motion: reduce) {
    .cx-legal-primary, .cx-legal-languages a { transition:none; }
}

/* Activación del consentimiento para administradores actuales. */
.cx-legal-required-note{padding:12px 16px;margin:18px 0 0;border:1px solid #d3e1fa;border-radius:12px;background:#eef5ff;color:#194b91;font-weight:650;font-size:.9rem;line-height:1.45}
.cx-legal-signout-button{appearance:none;border:0;background:transparent;padding:4px 0;cursor:pointer}
.cx-legal-signout-button:focus-visible{outline:2px solid #2671ef;outline-offset:3px;border-radius:4px}

/* CONTRIX legal 1.0.0: estado publicado, distinto del anterior aviso de borrador. */
.cx-legal-current {
    display:flex;align-items:center;flex-wrap:wrap;gap:12px;
    margin:0 0 19px;padding:13px 18px;border-radius:14px;
    border:1px solid #c6dcef;background:#f1f7fd;color:#1c517d;
    font-size:.91rem;line-height:1.5;
}
.cx-legal-current strong{font-weight:750;}
.cx-legal-current-icon{
    display:inline-grid;flex:0 0 26px;place-items:center;width:26px;height:26px;
    border-radius:50%;background:#e0effb;color:#25679b;font-size:15px;font-weight:900;
}
.cx-legal-current-separator{height:23px;width:1px;background:#b8d1e4;margin:0 4px;}
.cx-legal-chip-current{color:#1b567d;background:#f0f8ff;border-color:#c8dded;}
@media(max-width:576px){.cx-legal-current-separator{display:none;}}
