/**
 * QueHacerEnValpo - Estilos del Banner de Cookies
 * @package QueHacerEnValpo
 * @since 1.0.0
 */

/* Banner de cookies */
.qh-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1D3557;
    color: #fff;
    padding: 20px 30px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: qhSlideUp 0.4s ease-out;
}

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

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

.qh-cookie-banner__text {
    flex: 1;
    min-width: 250px;
}

.qh-cookie-banner__title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.qh-cookie-banner__icon {
    margin-right: 6px;
}

.qh-cookie-banner__description {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
    opacity: 0.9;
}

.qh-cookie-banner__link {
    color: #2A9D8F;
    text-decoration: underline;
    transition: color 0.2s;
}

.qh-cookie-banner__link:hover,
.qh-cookie-banner__link:focus {
    color: #48CAE4;
}

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

.qh-cookie-banner__btn {
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.qh-cookie-banner__btn:focus {
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.4);
}

.qh-cookie-banner__btn--accept {
    background: #2A9D8F;
    color: #fff;
}

.qh-cookie-banner__btn--accept:hover,
.qh-cookie-banner__btn--accept:focus {
    background: #21867a;
    transform: translateY(-1px);
}

.qh-cookie-banner__btn--config {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.qh-cookie-banner__btn--config:hover,
.qh-cookie-banner__btn--config:focus {
    background: rgba(255, 255, 255, 0.3);
}

.qh-cookie-banner__btn--reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.qh-cookie-banner__btn--reject:hover,
.qh-cookie-banner__btn--reject:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Modal de configuracion */
.qh-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qh-cookie-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: qhFadeIn 0.2s ease;
}

@keyframes qhFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qh-cookie-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: qhScaleIn 0.3s ease;
    color: #333;
}

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

.qh-cookie-modal__close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.qh-cookie-modal__close:hover,
.qh-cookie-modal__close:focus {
    background: #f0f0f0;
    color: #333;
}

.qh-cookie-modal__title {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    color: #1D3557;
}

.qh-cookie-modal__item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.qh-cookie-modal__item:last-child {
    border-bottom: none;
}

.qh-cookie-modal__label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.qh-cookie-modal__label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2A9D8F;
    cursor: pointer;
}

.qh-cookie-modal__label input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.qh-cookie-modal__name {
    flex: 1;
}

.qh-cookie-modal__badge {
    font-size: 0.75em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.qh-cookie-modal__badge--required {
    background: #E76F51;
    color: #fff;
}

.qh-cookie-modal__desc {
    margin: 8px 0 0 30px;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

.qh-cookie-modal__actions {
    margin-top: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .qh-cookie-banner {
        padding: 15px;
    }

    .qh-cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
    }

    .qh-cookie-banner__actions {
        justify-content: center;
    }

    .qh-cookie-modal__content {
        padding: 20px;
        width: 95%;
    }
}

/* Reducir motion para accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .qh-cookie-banner,
    .qh-cookie-modal__overlay,
    .qh-cookie-modal__content {
        animation: none;
    }

    .qh-cookie-banner__btn {
        transition: none;
    }
}

/* Focus visible para navegacion por teclado */
.qh-cookie-banner__btn:focus-visible,
.qh-cookie-modal__close:focus-visible,
.qh-cookie-modal__label:focus-visible {
    outline: 3px solid #2A9D8F;
    outline-offset: 2px;
}
