/**
 * Patadigital — Cookie Consent Styles
 * 
 * Estilos para el banner de consentimiento de cookies GDPR
 */

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-consent {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent.active {
    opacity: 1;
    visibility: visible;
}

.cookie-consent__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cookie-consent__modal {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    border-radius: 16px;
    padding: 2rem;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: cookieSlideIn 0.4s ease;
}

@keyframes cookieSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-consent__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-consent__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cookie-consent__title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.cookie-consent__text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cookie-consent__text p {
    margin-bottom: 0.75rem;
}

/* Cookie Options */
.cookie-consent__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cookie-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.cookie-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cookie-option__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-option__label {
    color: #fff;
    font-weight: 500;
    flex: 1;
}

.cookie-option__info {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.cookie-option__info:hover {
    opacity: 1;
}

.cookie-option__info[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    color: #1e3a5f;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.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: rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.cookie-toggle__slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-toggle input:checked+.cookie-toggle__slider {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.cookie-toggle input:checked+.cookie-toggle__slider::before {
    transform: translateX(22px);
}

.cookie-toggle--disabled .cookie-toggle__slider {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-toggle--disabled input:checked+.cookie-toggle__slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* More Info Link */
.cookie-consent__more {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.cookie-consent__more a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-consent__more a:hover {
    color: #93c5fd;
}

/* Action Buttons */
.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-consent__actions .btn {
    flex: 1;
    min-width: 140px;
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.cookie-consent__actions .btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cookie-consent__actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent__actions .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: #fff;
}

.cookie-consent__actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cookie-consent__actions .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #fff;
}

.cookie-consent__actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Cookie Settings Button (floating) */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
    animation: cookieBtnPulse 2s ease-in-out infinite;
}

@keyframes cookieBtnPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cookie-consent__modal {
        padding: 1.5rem;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        max-height: 85vh;
    }

    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-consent__actions .btn {
        width: 100%;
    }

    /* Cookie button smaller on mobile */
    .cookie-settings-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        bottom: 80px;
        left: 10px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent__modal {
        animation: none;
    }

    .cookie-toggle__slider,
    .cookie-toggle__slider::before,
    .cookie-consent__close,
    .cookie-settings-btn {
        transition: none;
    }

    .cookie-settings-btn {
        animation: none;
    }
}