/* Banner de Cookies - Cat Vallès */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(41, 41, 41, 0.98);
    color: #fff;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    animation: slideUp 0.5s ease-out;
}

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

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

.cookie-content {
    flex: 1;
}

.cookie-content h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cookie-content p {
    color: #ddd;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.cookie-content a {
    color: #75919e;
    text-decoration: underline;
    transition: color 0.3s;
}

.cookie-content a:hover {
    color: #9bb4c1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background-color: #277ba4;
    color: #fff;
}

.cookie-btn-accept:hover {
    background-color: #1f6283;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 123, 164, 0.4);
}

.cookie-btn-reject {
    background-color: transparent;
    color: #fff;
    border: 2px solid #777;
}

.cookie-btn-reject:hover {
    background-color: rgba(119, 119, 119, 0.2);
    border-color: #999;
}

.cookie-btn-config {
    background-color: transparent;
    color: #75919e;
    border: 2px solid #75919e;
}

.cookie-btn-config:hover {
    background-color: rgba(117, 145, 158, 0.1);
    border-color: #9bb4c1;
    color: #9bb4c1;
}

/* Modal de configuración */
#cookieModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-modal-header {
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    color: #292929;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #777;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.cookie-modal-close:hover {
    color: #292929;
}

.cookie-modal-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 6px;
    border-left: 4px solid #277ba4;
}

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

.cookie-category h4 {
    color: #292929;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.cookie-category p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    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: #277ba4;
}

.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.required {
    border-left-color: #999;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        align-items: stretch;
    }

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

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        margin: 10px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    #cookieBanner {
        padding: 15px;
    }

    .cookie-content h3 {
        font-size: 16px;
    }

    .cookie-content p {
        font-size: 13px;
    }

    .cookie-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}
