﻿/* ============================================================
   BANNER DE COOKIES - TELECABLE
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9998;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid #f0f0f0;
    animation: slideUpBanner 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

@keyframes slideUpBanner {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-banner.cookie-banner-out {
    animation: slideDownBanner 0.4s ease-in forwards;
}

@keyframes slideDownBanner {
    to {
        opacity: 0;
        transform: translateY(80px);
    }
}

/* Barra decorativa superior */
.cookie-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d9043d, #ff6b6b, #d9043d);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

.cookie-banner-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff1f4, #ffd1dc);
    color: #d9043d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% {
        transform: rotate(0) scale(1);
    }

    50% {
        transform: rotate(8deg) scale(1.05);
    }
}

.cookie-banner-content {
    flex: 1;
    min-width: 280px;
}

    .cookie-banner-content h5 {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 6px;
    }

    .cookie-banner-content p {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .cookie-banner-content a {
        color: #d9043d;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px dashed #d9043d;
    }

        .cookie-banner-content a:hover {
            border-bottom-style: solid;
        }

.cookie-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-cookie-config,
.btn-cookie-rechazar,
.btn-cookie-aceptar {
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-cookie-config {
    background: #f5f5f5;
    color: #555;
}

    .btn-cookie-config:hover {
        background: #e8e8e8;
        color: #1a1a1a;
    }

.btn-cookie-rechazar {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

    .btn-cookie-rechazar:hover {
        background: #fafafa;
        border-color: #999;
    }

.btn-cookie-aceptar {
    background: linear-gradient(135deg, #d9043d, #b80032);
    color: #fff;
    box-shadow: 0 6px 14px rgba(217, 4, 61, 0.25);
}

    .btn-cookie-aceptar:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(217, 4, 61, 0.35);
    }

/* ============================================
   MODAL DE CONFIGURACIÓN
   ============================================ */
.cookie-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
}

.cookie-modal .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 28px;
}

.cookie-modal .modal-body {
    padding: 24px 28px;
}

.cookie-option {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

    .cookie-option:hover {
        border-color: #ffd1dc;
        background: #fff;
    }

.cookie-option-required {
    background: linear-gradient(135deg, #e8f7ed, #d4f0de);
    border-color: #c4e6cf;
}

.cookie-option-info {
    flex: 1;
    min-width: 0;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

    .cookie-option-header i {
        font-size: 1.1rem;
    }

    .cookie-option-header strong {
        color: #1a1a1a;
        font-weight: 700;
    }

.cookie-option-info p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.cookie-toggle {
    flex-shrink: 0;
}

    .cookie-toggle .form-switch {
        margin: 0;
        padding-left: 2.5rem;
    }

    .cookie-toggle .form-check-input {
        width: 3rem;
        height: 1.6rem;
        cursor: pointer;
    }

        .cookie-toggle .form-check-input:checked {
            background-color: #d9043d;
            border-color: #d9043d;
        }

.cookie-info-box {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    font-size: 0.85rem;
    color: #856404;
}

    .cookie-info-box i {
        color: #ffc107;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

/* ============================================
   Z-INDEX - Banner de cookies debajo de cualquier modal
   ============================================ */
body.modal-open .cookie-banner {
    z-index: 1040;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 18px 18px 0 0;
        max-width: 100%;
    }

    .cookie-banner-container {
        padding: 20px;
        gap: 14px;
    }

    .cookie-banner-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .cookie-banner-content h5 {
        font-size: 1rem;
    }

    .cookie-banner-content p {
        font-size: 0.85rem;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

        .cookie-banner-actions .btn {
            width: 100%;
        }

    .cookie-option {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-end;
    }
}
