/* ==========================================================================
   Banner de consentimiento de cookies (RGPD / LOPDGDD)
   ========================================================================== */

#cp-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background-color: #2b2b2b;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    display: none;
}

#cp-cookie-banner.cp-visible {
    display: block;
}

.cp-cookie-banner-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cp-cookie-text {
    flex: 1 1 500px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cp-cookie-text a {
    color: #fff;
    text-decoration: underline;
}

.cp-cookie-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cp-cookie-actions button {
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    padding: 10px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.cp-cookie-actions button:hover {
    background: #fff;
    color: #2b2b2b;
}

#cp-cookie-accept-all {
    background: #fff;
    color: #2b2b2b;
}

#cp-cookie-accept-all:hover {
    background: transparent;
    color: #fff;
}

/* Panel de configuración (segunda capa) */
#cp-cookie-settings {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

#cp-cookie-settings.cp-visible {
    display: flex;
}

.cp-cookie-settings-panel {
    background: #fff;
    color: #333;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 4px;
}

.cp-cookie-settings-panel h3 {
    margin-top: 0;
}

.cp-cookie-category {
    border-top: 1px solid #e5e5e5;
    padding: 15px 0;
}

.cp-cookie-category:first-of-type {
    border-top: none;
}

.cp-cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cp-cookie-category-header strong {
    font-size: 15px;
}

.cp-cookie-category p {
    font-size: 13px;
    color: #666;
    margin: 8px 0 0 0;
}

.cp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cp-switch .cp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.2s;
    border-radius: 24px;
}

.cp-switch .cp-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.2s;
    border-radius: 50%;
}

.cp-switch input:checked + .cp-slider {
    background-color: #353535;
}

.cp-switch input:checked + .cp-slider:before {
    transform: translateX(20px);
}

.cp-switch input:disabled + .cp-slider {
    background-color: #353535;
    opacity: 0.5;
    cursor: not-allowed;
}

.cp-cookie-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cp-cookie-settings-actions button {
    padding: 10px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: 1px solid #353535;
    background: transparent;
    color: #353535;
}

#cp-cookie-save-settings {
    background: #353535;
    color: #fff;
}

@media (max-width: 767px) {
    .cp-cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-cookie-actions {
        justify-content: stretch;
    }

    .cp-cookie-actions button {
        flex: 1 1 auto;
    }
}