/**
 * Banner de consentimiento — Ley 21.719.
 *
 * Regla de diseño no negociable: los tres botones (Rechazar, Configurar,
 * Aceptar) comparten EXACTAMENTE la misma clase, tamaño, color y contraste.
 * Un banner donde "Aceptar" resalta y "Rechazar" se esconde vicia el
 * consentimiento libre y es un dark pattern sancionable.
 */

#privacidad-root {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding: 12px;
    pointer-events: none;
}

#privacidad-root.pcl-oculto,
.pcl-oculto {
    display: none !important;
}

.pcl-banner {
    pointer-events: auto;
    width: 100%;
    max-width: 46rem;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    padding: 18px 20px;
    font-size: 14px;
    line-height: 1.55;
}

.pcl-titulo {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.pcl-cuerpo {
    margin: 0 0 12px;
    color: #4b5563;
}

.pcl-link {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ── Panel por categorías ─────────────────────────────────────────────────── */

.pcl-cats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
}

.pcl-cat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.pcl-cat input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #1d4ed8;
}

.pcl-cat input:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.pcl-cat-txt {
    display: flex;
    flex-direction: column;
}

.pcl-cat-desc {
    color: #6b7280;
    font-size: 13px;
}

/* ── Acciones: los tres botones son idénticos ─────────────────────────────── */

.pcl-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcl-btn {
    /* `1 1 0` y no `1 1 auto`: reparte el ancho en partes IGUALES en vez de
       dimensionar cada botón según su texto. Así "Rechazar todo" y "Aceptar
       todo" miden exactamente lo mismo y no queda margen para argumentar que
       uno es más prominente que el otro. */
    flex: 1 1 0;
    min-width: 9rem;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    color: #111827;
    background: #fff;
    border: 1.5px solid #111827;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.pcl-btn:hover {
    background: #111827;
    color: #fff;
}

.pcl-btn:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

/* ── Enlace de reapertura (footer / política) ─────────────────────────────── */

.pcl-reabrir {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 480px) {
    .pcl-btn { flex: 1 1 100%; }
}

@media (prefers-color-scheme: dark) {
    .pcl-banner { background: #111827; color: #e5e7eb; border-color: #374151; }
    .pcl-titulo { color: #f9fafb; }
    .pcl-cuerpo { color: #d1d5db; }
    .pcl-cats   { background: #1f2937; border-color: #374151; }
    .pcl-cat-desc { color: #9ca3af; }
    .pcl-link   { color: #93c5fd; }
    .pcl-btn    { color: #f9fafb; background: #111827; border-color: #f9fafb; }
    .pcl-btn:hover { background: #f9fafb; color: #111827; }
}
