/* ventana_cookies.css */

/* Estilos para los modales */
.cookie-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo semi-transparente */
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

/* Contenido del modal */
.cookie-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    padding: 30px; /* Aumentar padding */
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    max-height: 90vh; /* Limitar la altura máxima al 90% de la vista */
    overflow-y: auto; /* Permitir scroll vertical si el contenido excede */
    position: relative; /* Para controlar mejor el contenido interno */
}

/* Botón de cerrar "X" */
.close-button {
    position: absolute;
    top: 15px; /* Aumentar margen superior */
    right: 15px; /* Aumentar margen derecho */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.close-button:hover {
    transform: scale(1.1);
}

.close-button svg {
    width: 24px; /* Aumentar tamaño del SVG */
    height: 24px;
}

/* Logotipo en los modales */
.cookie-logo {
    text-align: center;
    margin-bottom: 20px; /* Aumentar margen inferior */
}

.cookie-logo .logo {
    max-width: 100px; /* Ajusta según tus necesidades */
    height: auto;
}

/* Títulos y descripciones */
.modal-title {
    margin-bottom: 16px; /* Aumentar margen inferior */
    color: #333;
    text-align: center;
    font-size: 1.3em;
}

.modal-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6; /* Aumentar altura de línea */
    margin-top: 16px; /* Aumentar margen superior */
    margin-bottom: 16px; /* Aumentar margen inferior */
    text-align: left; /* Mejor legibilidad */
}

/* Botones generales */
.modal-buttons {
    margin-top: 20px; /* Separación de botones */
    text-align: center; /* Centrado */
}

.modal-buttons button {
    padding: 10px 20px; /* Aumentar padding */
    margin: 10px 5px; /* Aumentar margen vertical */
    border-radius: 4px; /* Bordes redondeados */
    cursor: pointer; /* Manito */
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    min-width: 140px; /* Aumentar ancho mínimo */
}

/* Botones específicos */
.modal-button.accept-button {
    background: #007bff; /* Azul */
    color: white;
    border: none;
}

.modal-button.customize-button,
.modal-button.reject-button,
.modal-button.confirm-button {
    background: white;
    color: #007bff; /* Azul */
    border: 1px solid #007bff;
}

.modal-button.save-button {
    background: white;
    color: #007bff; /* Azul */
    border: 1px solid #007bff;
}

/* Hover Effects */
.modal-button:hover {
    opacity: 0.9;
}

/* Estilos para las secciones de cookies */
.cookie-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.cookie-section {
    border: 1px solid #ddd;
    padding: 20px; /* Aumentar padding */
    border-radius: 5px;
    background-color: #f9f9f9; /* Fondo ligeramente gris */
}

.cookie-title {
    font-size: 1.1em;
    margin-bottom: 12px; /* Aumentar margen inferior */
    color: #333;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin-right: 15px; /* Aumentar margen derecho */
    color: #555;
    font-size: 14px;
}

/* Estilos para los switches */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.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: 20px;
}

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

input:checked + .slider {
    background-color: #007bff;
}

input:focus + .slider {
    box-shadow: 0 0 1px #007bff;
}

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

/* Estilos para el switch deshabilitado */
.switch input[disabled] + .slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.switch input[disabled] + .slider:before {
    background-color: #bdbdbd;
}

/* Cambiar el color del texto cuando está deshabilitado */
.cookie-section p {
    color: #777;
}

/* Estilos para el ID de consentimiento */
/* Estilos para el ID de consentimiento */
.consent-id-footer {
    margin-top: 20px; /* Separación superior */
    text-align: center; /* Centrar el contenido */
    display: none; /* Ocultar inicialmente */
}

.consent-id-footer.show {
    display: block; /* Mostrar cuando se active */
}

.consent-id-footer small {
    color: #007bff; /* Azul */
    font-size: 12px; /* Tamaño pequeño */
    font-weight: bold; /* Texto en negrita */
    text-align: center; /* Centrado */
    display: inline-block; /* Asegurar que ocupe el espacio necesario */
}


/* Responsividad */
@media (max-width: 768px) {
    .cookie-modal-content {
        max-width: 90%;
        padding: 15px;
    }

    .modal-title {
        font-size: 1.2em;
    }

    .modal-text {
        font-size: 13px;
    }

    .modal-buttons button {
        min-width: 100px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .cookie-content p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cookie-modal-content {
        max-width: 95%;
        padding: 10px;
    }

    .modal-title {
        font-size: 1.1em;
    }

    .modal-text {
        font-size: 12px;
    }

    .modal-buttons button {
        min-width: 100px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .switch {
        width: 35px;
        height: 18px;
    }

    .slider:before {
        height: 14px;
        width: 14px;
        left: 2px;
        bottom: 2px;
    }

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

    .cookie-content p {
        font-size: 12px;
    }

    .cookie-logo .logo {
        max-width: 80px;
    }
}

/* Estilos para el ícono de cookies */
.cookie-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none; /* Oculto por defecto */
    z-index: 10001; /* Mayor que el modal */
    transition: opacity 0.3s ease;
}

.cookie-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mostrar el ícono cuando tiene la clase 'visible' */
.cookie-icon.visible {
    display: block;
}

/* Efecto hover */
.cookie-icon:hover {
    opacity: 0.8;
}
.cookie-sections {
    display: flex
;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 20px;
}
.cookie-title {
    font-size: 0.9em;
    margin-bottom: -10px;
    color: #333;
}
.consent-id-footer {
    margin-top: 3px;
    text-align: center;
    display: none;
}
.cookie-logo {
    text-align: center;
    margin-bottom: 3px;
}

/* Responsividad para el ícono de cookies */
@media (max-width: 768px) {
    .cookie-icon {
        width: 40px;
        height: 40px;
        bottom: 15px;
        left: 15px;
    }
    .cookie-modal-content {
        max-width:75%;
        max-height:85%;
     }
    .modal-buttons button {
        font-size: 14px;
    }
    .cookie-content p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cookie-icon{
        width: 35px;
        height: 35px;
        bottom: 10px;
        left: 10px;
    }
    
     .cookie-modal-content {
        max-width:98%;
        max-height:82%;
     }
    .cookie-section {
        border: 1px solid #ddd;
        padding: 5px;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
}