@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

:root {
    /* Variables de identidad corporativa de HEY*/
    --Negro: #111111;
    --Blanco: #ffffff;
    --Color-1: #4F46E5;
    /* Color corporativo principal */
    --Color-1-hover: #4338CA;
    --Gris-text: #6B7280;
    --Gris-linea: #E5E7EB;
}

.cookie-banner {
    font-family: 'Manrope', sans-serif;
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: 24px;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 999999;
    padding: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    box-sizing: border-box;
}

.cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Tipografías y Textos */
.cookie-banner h2,
.cookie-banner h3 {
    margin: 0 0 8px 0;
    color: var(--Negro);
    font-weight: 700;
    font-size: 1.25rem;
}

.cookie-banner p {
    margin: 0 0 20px 0;
    color: var(--Gris-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Botones */
.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-banner-btn {
    font-family: inherit;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--Color-1);
    color: var(--Blanco);
}

.btn-primary:hover {
    background: var(--Color-1-hover);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--Negro);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-link {
    background: transparent;
    color: var(--Gris-text);
    text-decoration: underline;
    padding: 6px;
}

.btn-link:hover {
    color: var(--Negro);
}

/* Configuración de Filas y Toggles */
.cookie-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--Gris-linea);
}

.cookie-option-row:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}

.cookie-option-info strong {
    display: block;
    color: var(--Negro);
    font-size: 0.95rem;
}

.cookie-option-info p {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
}

/* Switch Toggle Custom */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 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: #D1D5DB;
    transition: .3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.cookie-slider {
    background-color: var(--Color-1);
}

input:disabled+.cookie-slider {
    background-color: #9CA3AF;
    opacity: 0.6;
}

input:checked+.cookie-slider:before {
    transform: translateX(20px);
}

.settings-footer {
    margin-top: 16px;
}

/* Botón Flotante para cambiar de opinión */
#cookie-floating-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--Blanco);
    color: var(--Negro);
    border: 1px solid var(--Gris-linea);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    transition: transform 0.2s ease;
}

#cookie-floating-trigger:hover {
    transform: scale(1.1);
}

/* Adaptación a Móvil */
@media (max-width: 600px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
        padding: 16px;
    }

    #cookie-floating-trigger {
        bottom: 12px;
        left: 12px;
    }
}