/* =================================== */
/* MODERN COOKIE CONSENT BANNER STYLES */
/* =================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    gap: 25px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .cookie-banner-content {
        grid-template-columns: 2fr 1fr;
        align-items: center;
        padding: 25px 20px;
    }
}

/* Sección de texto */
.cookie-text {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.cookie-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: #cccccc;
}

.cookie-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-link {
    color: #4a9eff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.cookie-link:hover {
    color: #6bb3ff;
    text-decoration: underline;
}

/* Sección de acciones */
.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .cookie-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 15px;
    }
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    font-family: inherit;
}

.cookie-btn-settings {
    background: transparent;
    color: #cccccc;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-accept-essential {
    background: #6c757d;
    color: white;
}

.cookie-btn-accept-essential:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.cookie-btn-accept-all {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.cookie-btn-accept-all:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Modal de configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

body.dark-mode .cookie-modal-content {
    background: #1a1a1a;
    color: #ffffff;
}

.cookie-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

body.dark-mode .cookie-modal-header {
    border-bottom-color: #333;
}

.cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #212529;
}

body.dark-mode .cookie-modal-title {
    color: #ffffff;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

body.dark-mode .cookie-modal-close {
    color: #cccccc;
}

body.dark-mode .cookie-modal-close:hover {
    background: #333;
    color: #ffffff;
}

.cookie-modal-body {
    padding: 20px 30px 30px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

body.dark-mode .cookie-category {
    border-bottom-color: #333;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

body.dark-mode .cookie-category-name {
    color: #ffffff;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

body.dark-mode .cookie-category-description {
    color: #aaaaaa;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.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.3s;
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #28a745;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-banner-content {
        padding: 20px 15px;
    }
    
    .cookie-modal-content {
        width: 95%;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Responsive improvements */
@media (max-width: 767px) {
    .cookie-links {
        gap: 15px;
    }
    
    .cookie-link {
        font-size: 0.85rem;
    }
}