/* ========================================
   SISTEMA DE CONSENTIMIENTO DE COOKIES
   ======================================== */

/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    z-index: 9999;
    background: rgba(14, 41, 68, 0.95);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cookie-banner--bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.cookie-banner--top {
    top: 0;
    left: 0;
    right: 0;
}

.cookie-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cookie-banner__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-banner__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookie-banner__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
}

.cookie-banner__close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.cookie-banner__close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cookie-banner__description {
    color: rgba(255, 255, 255, 0.8);
}

.cookie-banner__description p {
    margin: 0;
}

.cookie-banner__categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category__header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.cookie-category__toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-category__checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-category__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-category__slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-category__checkbox:checked + .cookie-category__slider {
    background-color: var(--primary-color);
}

.cookie-category__checkbox:checked + .cookie-category__slider:before {
    transform: translateX(20px);
}

.cookie-category__checkbox:disabled + .cookie-category__slider {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cookie-category__info {
    flex: 1;
}

.cookie-category__title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.cookie-category__description {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.cookie-banner__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-banner__links {
    display: flex;
    gap: 15px;
}

.cookie-banner__link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.cookie-banner__link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Modal de Configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cookie-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cookie-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.cookie-modal__close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cookie-modal__close:hover {
    background-color: #e9ecef;
    color: #333;
}

.cookie-modal__body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.cookie-modal__description {
    margin-bottom: 24px;
    color: #666;
}

.cookie-modal__description p {
    margin: 0;
}

.cookie-modal__categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-category--modal {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.cookie-category__details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category--modal .cookie-category__details {
    border-top: 1px solid #e9ecef;
}

.cookie-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category--modal .cookie-item {
    background: #fff;
    border: 1px solid #e9ecef;
}

.cookie-item__name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.cookie-category--modal .cookie-item__name {
    color: #333;
}

.cookie-item__description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: 5px;
}

.cookie-category--modal .cookie-item__description {
    color: #666;
}

.cookie-item__duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.cookie-category--modal .cookie-item__duration {
    color: #999;
}

.cookie-modal__footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cookie-modal__buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Botón de Gestión de Cookies */
.cookie-manager-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.cookie-manager-button__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.cookie-manager-button__toggle:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.cookie-manager-button__text {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner__container {
        padding: 15px;
    }
    
    .cookie-banner__header {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-banner__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-banner__buttons {
        justify-content: center;
    }
    
    .cookie-banner__links {
        justify-content: center;
    }
    
    .cookie-modal {
        padding: 10px;
    }
    
    .cookie-modal__content {
        max-height: 95vh;
    }
    
    .cookie-modal__body {
        max-height: 50vh;
    }
    
    .cookie-modal__buttons {
        justify-content: center;
    }
    
    .cookie-manager-button {
        bottom: 15px;
        right: 15px;
    }
    
    .cookie-manager-button__text {
        display: none;
    }
    
    .cookie-manager-button__toggle {
        padding: 12px;
        border-radius: 50%;
    }
}

/* Animaciones */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-banner--bottom {
    animation: slideInUp 0.3s ease-out;
}

.cookie-banner--top {
    animation: slideInDown 0.3s ease-out;
}

.cookie-modal__overlay {
    animation: fadeIn 0.3s ease-out;
}

.cookie-modal__content {
    animation: scaleIn 0.3s ease-out;
}

/* Estados de carga */
.cookie-banner__buttons button:disabled,
.cookie-modal__buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Temas oscuros */
@media (prefers-color-scheme: dark) {
    .cookie-modal__content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .cookie-modal__header {
        background: #1a202c;
        border-bottom-color: #4a5568;
    }
    
    .cookie-modal__title {
        color: #e2e8f0;
    }
    
    .cookie-modal__close {
        color: #a0aec0;
    }
    
    .cookie-modal__close:hover {
        background-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cookie-modal__description {
        color: #a0aec0;
    }
    
    .cookie-category--modal {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .cookie-category--modal .cookie-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .cookie-category--modal .cookie-item__name {
        color: #e2e8f0;
    }
    
    .cookie-category--modal .cookie-item__description {
        color: #a0aec0;
    }
    
    .cookie-category--modal .cookie-item__duration {
        color: #718096;
    }
    
    .cookie-modal__footer {
        background: #1a202c;
        border-top-color: #4a5568;
    }
} 

#cookie-details div:not(:last-child) { margin-bottom: 8px; }