/*
 * Aviso de galetes del login y el backoffice (templates/partials/_cookie_consent.html.twig + js/consent.js).
 * Mismo aspecto que el de la landing (public/css/landing.css), pero autocontenido: las variables y los botones
 * van acotados a .lp-consent para no depender de landing.css ni chocar con Bootstrap/styles.css.
 */
.lp-consent {
    --brand: #8655E8;
    --brand-hover: #7442DC;
    --brand-dark: #6334C4;
    --brand-ink: #140F2B;
    --brand-rgb: 134, 85, 232;
    --lp-ink: #1A1433;
    --lp-text: #3a3650;
    --lp-muted: #6b6785;
    --lp-line: #e9e6f2;
    --lp-tint: #f8f7fc;
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
    --ease-exit: cubic-bezier(0.3, 0, 1, 1);
    --t-quick: 160ms;
    --t-base: 320ms;

    position: fixed; left: 24px; bottom: 24px; z-index: 1070; display: grid; gap: 16px;
    box-sizing: border-box; width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: 20px;
    background: #fff; color: var(--lp-text); border: 1px solid var(--lp-line);
    box-shadow: 0 2px 6px rgba(26, 20, 51, .08), 0 24px 52px rgba(26, 20, 51, .18);
    font-size: 14px; text-align: left;
    opacity: 0; transform: translateY(16px);
    transition: opacity var(--t-quick) var(--ease-exit), transform var(--t-quick) var(--ease-exit);
}
.lp-consent *, .lp-consent *::before, .lp-consent *::after { box-sizing: border-box; }
.lp-consent[hidden], .lp-consent [hidden] { display: none !important; }
.lp-consent.is-in { opacity: 1; transform: none; transition: opacity var(--t-base) var(--ease-enter), transform var(--t-base) var(--ease-enter); }
.lp-consent h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--lp-ink); font-size: 17px; font-weight: 720; line-height: 1.3; letter-spacing: 0; }
.lp-consent h2 svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linejoin: round; }
.lp-consent h2 svg circle { fill: var(--brand); stroke: none; }
.lp-consent p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--lp-muted); }
.lp-consent p a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lp-consent-prefs { display: grid; gap: 8px; margin: 0; }
.lp-consent-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--lp-tint); cursor: pointer; }
.lp-consent-opt strong { display: block; color: var(--lp-ink); font-size: 14px; }
.lp-consent-opt small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--lp-muted); }
.lp-consent-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lp-consent .lp-switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #d3cfe0; transition: background-color var(--t-quick) var(--ease); }
.lp-consent .lp-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(26, 20, 51, .25); transition: transform var(--t-base) var(--ease); }
.lp-consent-opt input:checked + .lp-switch { background: var(--brand); }
.lp-consent-opt input:checked + .lp-switch::after { transform: translateX(16px); }
.lp-consent-opt input:disabled + .lp-switch { opacity: .55; }
.lp-consent-opt:has(input:disabled) { cursor: default; }
.lp-consent-opt input:focus-visible + .lp-switch { outline: 3px solid rgba(var(--brand-rgb), .6); outline-offset: 2px; }
.lp-consent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.lp-consent .lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 10px 16px; border: 0; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    background: #fff; color: var(--lp-ink); box-shadow: inset 0 0 0 1.5px var(--lp-line);
    transition: transform var(--t-quick) var(--ease), box-shadow var(--t-base) var(--ease);
}
.lp-consent .lp-btn:hover { box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb), .7); }
.lp-consent .lp-btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(var(--brand-rgb), .35); }
.lp-consent .lp-btn-primary:hover { background: var(--brand-hover); box-shadow: 0 12px 30px rgba(var(--brand-rgb), .45); }
.lp-consent .lp-btn:active { transform: scale(.97); }
.lp-consent .lp-btn:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .6); outline-offset: 2px; }
.lp-consent-actions [data-consent-toggle] { margin-right: auto; padding-left: 4px; padding-right: 4px; box-shadow: none; color: var(--lp-muted); text-decoration: underline; text-underline-offset: 3px; }
.lp-consent-actions [data-consent-toggle]:hover { box-shadow: none; }

@media (max-width: 760px) {
    .lp-consent { left: 16px; bottom: 16px; padding: 18px; }
    .lp-consent-actions .lp-btn:not([data-consent-toggle]) { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-consent, .lp-consent.is-in, .lp-consent .lp-btn, .lp-consent .lp-switch, .lp-consent .lp-switch::after { transition: none; }
}

/* Enlace del pie que abre el panel (partials/_legal_links.html.twig): aspecto de enlace. */
.legal-links .legal-link-btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.legal-links .legal-link-btn:hover, .legal-links .legal-link-btn:focus-visible { text-decoration: underline; }
