/**
 * Estilos para el Sistema de Cookies - Bogotá Mía
 * Diseño moderno y accesible
 */

/* Banner principal de cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #980605, #7a0504);
    color: white;
    padding: 1rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #eae766;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner.hide {
    transform: translateY(100%);
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.cookie-icon {
    font-size: 2rem;
    color: #eae766;
    flex-shrink: 0;
}

.cookie-text h5 {
    margin: 0 0 0.5rem 0;
    color: #eae766;
    font-weight: 600;
}

.cookie-text p {
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    opacity: 0.9;
}

.cookie-links {
    font-size: 0.875rem;
}

.cookie-links a {
    color: #eae766;
    text-decoration: none;
}

.cookie-links a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-actions .btn {
    white-space: nowrap;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

.cookie-actions .btn-warning {
    background-color: #eae766;
    border-color: #eae766;
    color: #980605;
    font-weight: 600;
}

.cookie-actions .btn-warning:hover {
    background-color: #d4d459;
    border-color: #d4d459;
    color: #7a0504;
}

.cookie-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.cookie-actions .btn-outline-light:hover {
    background-color: white;
    color: #980605;
}

.cookie-actions .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    color: #980605;
}

.cookie-actions .btn-light:hover {
    background-color: white;
    color: #7a0504;
}

/* Modal de configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1) translateY(0);
}

.cookie-modal-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: flex;
    justify-content: between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.cookie-modal-header h4 {
    margin: 0;
    color: #980605;
    font-weight: 600;
    flex: 1;
}

.btn-close {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.btn-close:hover {
    opacity: 1;
}

.btn-close::before {
    content: '×';
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.cookie-category:hover {
    border-color: #980605;
}

.cookie-category-header {
    margin-bottom: 0.75rem;
}

.form-check-label {
    font-size: 1rem;
    cursor: pointer;
}

.cookie-description {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    padding-left: 2rem;
}

.form-check-input:checked {
    background-color: #980605;
    border-color: #980605;
}

.form-check-input:focus {
    border-color: #980605;
    box-shadow: 0 0 0 0.25rem rgba(152, 6, 5, 0.25);
}

.form-check-input:disabled {
    opacity: 0.6;
}

.cookie-modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.cookie-modal-footer .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.cookie-modal-footer .btn-primary {
    background-color: #980605;
    border-color: #980605;
}

.cookie-modal-footer .btn-primary:hover {
    background-color: #7a0504;
    border-color: #7a0504;
}

/* Notificación de confirmación */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.cookie-notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        min-width: auto;
    }

    .cookie-actions {
        justify-content: center;
        width: 100%;
    }

    .cookie-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .cookie-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .btn {
        width: 100%;
    }

    .cookie-description {
        padding-left: 0;
        margin-top: 0.5rem;
    }

    .cookie-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .cookie-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 0.75rem;
    }

    .cookie-text h5 {
        font-size: 1rem;
    }

    .cookie-text p {
        font-size: 0.875rem;
    }

    .cookie-actions .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    .cookie-modal-content {
        border-radius: 8px;
    }
}

/* Animaciones adicionales */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Estados de hover mejorados */
.cookie-actions .btn {
    transition: all 0.3s ease;
}

.cookie-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-category {
    transition: all 0.3s ease;
}

.cookie-category:hover {
    box-shadow: 0 2px 8px rgba(152, 6, 5, 0.1);
    transform: translateY(-1px);
}

/* Accesibilidad */
.cookie-banner:focus-within,
.cookie-modal:focus-within {
    outline: 2px solid #eae766;
    outline-offset: 2px;
}

.form-check-input:focus {
    outline: 2px solid #980605;
    outline-offset: 2px;
}

/* Modo alto contraste */
@media (prefers-contrast: high) {
    .cookie-banner {
        border: 2px solid white;
    }
    
    .cookie-modal-content {
        border: 2px solid #000;
    }
}

/* Modo reducido de movimiento */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-notification,
    .cookie-category,
    .cookie-actions .btn {
        transition: none;
    }
    
    .cookie-banner.show {
        animation: none;
    }
}