/* Fondo semi-opaco */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo oscuro semi-transparente */
    z-index: 1000;
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
}

/* Estilos base mejorados */
.cookie-banner {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%; /* Cambiado de ancho fijo a porcentaje */
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* Centrar el banner */
}

/* Estilo de la galleta */
.cookie-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

/* Estilo de los botones */
.cookie-banner .btn {
    margin: 0.5rem;
    padding: 0.4rem 1.2rem; /* Botones más pequeños */
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.95rem; /* Texto ligeramente más pequeño */
}

/* Estilos base mejorados */
.cookie-banner {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%; /* Cambiado de ancho fijo a porcentaje */
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* Centrar el banner */
}

.cookie-banner a:hover {
    text-decoration: underline;
}

/* Estilos para los toggle switches */
.toggle-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    gap: 20px; /* Separación entre texto y switch reducida */
    width: 100%;
}

.toggle-label {
    width: 100px; /* Ancho fijo para todos los textos */
    text-align: right; /* Alinea el texto a la derecha */
    font-size: 1.05rem; /* Texto más grande */
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0; /* Evita que el switch se encoja */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #7bb4f5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch .form-check-input[disabled] {
    position: absolute;
    opacity: 0;
    cursor: default;
    width: 0;
    height: 0;
}

/* Responsive para tabletas */
@media (max-width: 768px) {
    .cookie-banner {
        max-width: 450px;
        padding: 1.5rem;
    }

    .cookie-icon {
        width: 60px;
        height: 60px;
    }
}

/* Responsive para móviles */
@media (max-width: 576px) {
    .cookie-banner {
        max-width: 320px; /* Ligeramente más ancho para acomodar los elementos */
        padding: 1rem;
        width: 90%; /* Más pequeño en móviles pero suficiente espacio */
    }

    .cookie-icon {
        width: 50px;
        height: 50px;
    }

    /* Mantener los toggle switches horizontales */
    .toggle-switch {
        display: flex;
        justify-content: center; /* Mejor distribución en móvil */
        gap: 10px;
		width: 100%;
    }

    .toggle-label {
        width: auto; /* Ancho automático en móvil */
        min-width: 80px; /* Pero con un mínimo para mantener alineación */
        text-align: left; /* Texto alineado a la izquierda en móvil */
        font-size: 1rem; /* Texto normal en móvil */
    }

    /* Ajustar tamaño de fuente */
    h4 {
        font-size: 1.3rem !important; /* Texto más grande */
    }

    p {
        font-size: 1rem; /* Texto normal */
    }

    h5 {
        font-size: 1.15rem; /* Título más grande */
    }

    /* Ajustar los botones para móviles */
    .cookie-banner .btn {
        padding: 0.4rem 1rem;
        font-size: 12px !important;
    }

    /* En pantallas muy pequeñas, mantener los botones en línea pero ajustar tamaño */
    @media (max-width: 320px) {
        .cookie-banner .btn {
            padding: 0.3rem 0.8rem;
            font-size: 0.85rem;
            margin: 0.3rem;
        }
    }
}
