/* assets/cmp-consent.css - CMP Plataforma de Gestión de Consentimiento (Ley 21.719 Chile) */

#cmp-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 960px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 74, 34, 0.35);
    border-radius: 14px;
    padding: 18px 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    color: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: none;
    animation: cmpSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmpSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cmp-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 768px) {
    .cmp-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cmp-banner-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.cmp-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmp-banner-title span.badge {
    background: rgba(201, 74, 34, 0.2);
    color: #fb923c;
    border: 1px solid rgba(201, 74, 34, 0.4);
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.cmp-banner-text a {
    color: #fb923c;
    text-decoration: underline;
}

.cmp-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cmp-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.cmp-btn-primary {
    background: #c94a22;
    color: #ffffff;
    border-color: #c94a22;
}
.cmp-btn-primary:hover {
    background: #b03e1a;
    box-shadow: 0 4px 12px rgba(201, 74, 34, 0.4);
}

.cmp-btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
    border-color: #475569;
}
.cmp-btn-secondary:hover {
    background: #475569;
    color: #ffffff;
}

.cmp-btn-outline {
    background: transparent;
    color: #cbd5e1;
    border-color: #475569;
}
.cmp-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: #94a3b8;
}

/* MODAL DE PREFERENCIAS GRANULARES */
#cmp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cmp-modal-content {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: cmpModalFade 0.25s ease-out;
}

@keyframes cmpModalFade {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.cmp-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cmp-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.cmp-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.cmp-modal-close:hover {
    color: #fff;
    background: #1e293b;
}

.cmp-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cmp-category-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px 16px;
}

.cmp-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cmp-category-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
}

.cmp-category-desc {
    font-size: 0.84rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

/* SWITCH TOGGLE */
.cmp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cmp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cmp-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #475569;
    transition: .3s;
    border-radius: 24px;
}

.cmp-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .cmp-slider {
    background-color: #22c55e;
}

input:disabled + .cmp-slider {
    background-color: #3b82f6;
    cursor: not-allowed;
    opacity: 0.8;
}

input:checked + .cmp-slider:before {
    transform: translateX(20px);
}

.cmp-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #0b1120;
    border-radius: 0 0 16px 16px;
}

/* BOTÓN FLOTANTE O DE PIE DE PÁGINA PARA REVOCAR */
.cmp-trigger-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}
.cmp-trigger-link:hover {
    color: #fb923c;
    text-decoration: underline;
}
