/* ============================================
   COOKIE BANNER - Estilos Base
   ============================================ */

/* Banner Principal */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px 0;
    border-top: 3px solid var(--coral);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
    font-family: var(--font-base);
}

.cookie-banner-description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.5;
    font-family: var(--font-base);
}

.cookie-learn-more {
    color: var(--ink);
    text-decoration: underline;
    font-weight: 500;
    font-family: var(--font-base);
}

.cookie-learn-more:hover {
    color: var(--muted);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-banner-actions .btn {
    white-space: nowrap;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 4px;
}

.btn-primero{
    background-color: var(--coral-soft);
    transition: 0.2s ease-in-out;
    color: black;
}

.btn-primero:hover{
    background-color: var(--coral);
}

.cookie-banner-actions .btn-secundario{
    border: 1px solid var(--muted);
    transition: 0.2s ease-in-out;
    background-color: transparent;
    color: var(--ink);
}

.cookie-banner-actions .btn-secundario:hover{
    background-color: var(--muted);
    color: white;
}

.btn-terciario{
    background-color: var(--ink);
    color: white;
    transition: 0.2s ease-in-out;
}

.btn-terciario:hover{
    border: 1px solid var(--ink);
    background-color: white;
    color: var(--ink);
}

/* Link de Configuración en Footer */
.cookie-settings-link {
    color: var(--coral-700);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.cookie-settings-link:hover {
    color: var(--coral);
    text-decoration: underline;
}

/* ============================================
   MODAL DE PERSONALIZACIÓN
   ============================================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal-dialog {
    width: 100%;
    max-width: 600px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cookie-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
    font-family: var(--font-base);
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.cookie-modal-close:hover {
    background: #f8f9fa;
    color: #212529;
}

.cookie-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-modal-description {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    font-family: var(--font-base);
}

/* Categorías de Cookies */
.cookie-category {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ink);
    font-family: var(--font-base);
}

.cookie-category-desc {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
    font-family: var(--font-base);
}

.cookie-always-active {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--font-base);
}

/* Toggle Switch */
.cookie-toggle-wrapper {
    flex-shrink: 0;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ink);
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--coral);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancelar{
    background-color: var(--ink);
    border: 1px solid var(--ink);
    color: white;
    border-radius: 4px;
    padding: 10px 15px;
    transition: 0.2s ease-in-out;
}

.btn-cancelar:hover{
    border: 1px solid var(--ink);
    color: var(--ink);
    background-color: white;
}

.btn-aceptar{
    background-color: var(--coral-soft);
    border: none;
    color: black;
    border-radius: 4px;
    padding: 10px 15px;
    transition: 0.2s ease-in-out;
}

.btn-aceptar:hover{
    background-color: var(--coral);
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
    }
    
    .cookie-banner-title {
        font-size: 16px;
    }
    
    .cookie-banner-description {
        font-size: 13px;
    }
    
    .cookie-modal {
        padding: 10px;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 15px;
    }
    
    .cookie-modal-title {
        font-size: 18px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .btn {
        width: 100%;
    }
}

/* ============================================
   SCROLLBAR - Modal Body
   ============================================ */

.cookie-modal-body::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cookie-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cookie-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}