/* PersonalAquarium - Banner de consentimiento de cookies (RGPD).
   Estilos autocontenidos (no dependen del bundle principal) para que el banner
   se pinte correctamente incluso antes de que cargue el resto de la aplicacion. */

.pa-cc-root {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
}

.pa-cc-dialog {
    pointer-events: auto;
    width: 100%;
    max-width: 30rem;
    background: #ffffff;
    color: #1f2d3d;
    border: 1px solid #d4dbe2;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.25);
    padding: 1.25rem 1.25rem 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
}

.pa-cc-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #122c4b;
}

.pa-cc-message {
    margin: 0 0 1rem;
    color: #2b3a4a;
}

.pa-cc-policy {
    color: #0a5ca8;
    text-decoration: underline;
}

.pa-cc-policy:hover,
.pa-cc-policy:focus {
    color: #084a86;
}

.pa-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pa-cc-actions-prefs {
    margin-top: 1rem;
    justify-content: flex-end;
}

.pa-cc-btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1 1 auto;
}

.pa-cc-btn:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.pa-cc-btn-primary {
    background: #0a5ca8;
    color: #ffffff;
}

.pa-cc-btn-primary:hover {
    background: #084a86;
}

.pa-cc-btn-secondary {
    background: #eef2f6;
    color: #1f2d3d;
    border-color: #c3ccd5;
}

.pa-cc-btn-secondary:hover {
    background: #e1e7ed;
}

.pa-cc-btn-link {
    background: transparent;
    color: #0a5ca8;
    border-color: transparent;
    text-decoration: underline;
    flex: 0 1 auto;
}

.pa-cc-btn-link:hover {
    color: #084a86;
}

/* Panel de preferencias por categorias */
.pa-cc-prefs {
    margin-top: 1rem;
    border-top: 1px solid #e1e7ed;
    padding-top: 0.75rem;
}

.pa-cc-category {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eef2f6;
}

.pa-cc-category:last-of-type {
    border-bottom: none;
}

.pa-cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pa-cc-category-title {
    font-weight: 700;
    color: #122c4b;
}

.pa-cc-category-desc {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #475563;
}

.pa-cc-always {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2e7d32;
}

/* Interruptor accesible */
.pa-cc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
    cursor: pointer;
}

.pa-cc-switch-input {
    position: absolute;
    opacity: 0;
    width: 46px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.pa-cc-switch-slider {
    position: absolute;
    inset: 0;
    background: #b0bac4;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.pa-cc-switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.pa-cc-switch-input:checked + .pa-cc-switch-slider {
    background: #0a5ca8;
}

.pa-cc-switch-input:checked + .pa-cc-switch-slider::before {
    transform: translateX(20px);
}

.pa-cc-switch-input:focus-visible + .pa-cc-switch-slider {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

/* Tema oscuro: alinear con el resto de la web cuando esta activo */
[data-bs-theme="dark"] .pa-cc-dialog,
[data-theme="dark"] .pa-cc-dialog {
    background: #1b2733;
    color: #e7edf3;
    border-color: #33414f;
}

[data-bs-theme="dark"] .pa-cc-title,
[data-theme="dark"] .pa-cc-title,
[data-bs-theme="dark"] .pa-cc-category-title,
[data-theme="dark"] .pa-cc-category-title {
    color: #ffffff;
}

[data-bs-theme="dark"] .pa-cc-message,
[data-theme="dark"] .pa-cc-message {
    color: #cdd7e1;
}

[data-bs-theme="dark"] .pa-cc-category-desc,
[data-theme="dark"] .pa-cc-category-desc {
    color: #aab6c2;
}

[data-bs-theme="dark"] .pa-cc-btn-secondary,
[data-theme="dark"] .pa-cc-btn-secondary {
    background: #2a3744;
    color: #e7edf3;
    border-color: #3c4a58;
}

[data-bs-theme="dark"] .pa-cc-policy,
[data-theme="dark"] .pa-cc-policy {
    color: #6db3f2;
}

/* Enlace para reabrir la configuracion de cookies (footer / politica) */
.pa-cc-settings-link {
    background: none;
    border: none;
    padding: 0.25rem 0.35rem;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.85;
}

.pa-cc-settings-link:hover,
.pa-cc-settings-link:focus {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .pa-cc-root {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
    }

    .pa-cc-dialog {
        max-width: none;
    }

    .pa-cc-actions {
        flex-direction: column;
    }

    .pa-cc-btn {
        width: 100%;
    }
}
