/* ========================================
   Cookie Banner - OneClickServices
   ======================================== */

/* Banner principal */
.cookie-consent-banner {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #003d82 0%, #002d5f 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999 !important;
    display: none;
    animation: slideUp 0.5s ease-out;
    width: 100%;
}

.cookie-consent-banner.show {
    display: block !important;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-text a {
    color: #32b8c6;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-text a:hover {
    color: #ffffff;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Botones del banner */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-reject {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-btn-configure {
    background: #32b8c6;
    color: #003d82;
    border: 2px solid #32b8c6;
}

.cookie-btn-configure:hover {
    background: #2aa8b8;
    border-color: #2aa8b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 184, 198, 0.3);
}

.cookie-btn-accept {
    background: #ffffff;
    color: #003d82;
    border: 2px solid #ffffff;
}

.cookie-btn-accept:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Modal de configuración */
.cookie-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex !important;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    background: linear-gradient(135deg, #003d82 0%, #002d5f 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.75rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-category {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: #32b8c6;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cookie-category-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #003d82;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #32b8c6;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0;
}

.cookie-category-always-active {
    font-size: 0.85rem;
    color: #27ae60;
    font-weight: 600;
    font-style: italic;
}

.cookie-modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-content {
        margin: 1rem;
    }

    .cookie-modal-header {
        padding: 1rem 1.5rem;
    }

    .cookie-modal-body {
        padding: 1.5rem;
    }

    .cookie-modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}
