.cookie-consent {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px; /* Aumentamos el ancho máximo para 4 columnas */
    background-color: #ffffff;
    padding: 30px;
    margin: 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: justify;
    font-family: Arial, sans-serif;
    color: #333;
    z-index:9999;
    visibility:hidden;
	transition: opacity 0.4s ease;
    box-sizing: border-box;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
}

.cookie-consent h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    text-align: left;
}

.cookie-consent h2 {
    margin: 0 0 10px;
    color: #2c3e50;
    font-size: 1.5rem;
    line-height: 1.2;
    text-align: left;
}

.cookie-consent p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #555;
    text-align: justify;
}

#cookie-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.5); /* negro semi-transparente */
      display: none; /* Oculta por defecto */
      z-index: 9998; /* Por encima de otros elementos */
    }

/* Contenedor de los selectores */
.cc_selectors {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
    gap: 15px; /* Espacio entre columnas */
    margin-bottom: 30px;
}

/* Estilos para cada selector */
.cc_selectors label {
    display: flex;
    align-items: center; /* Centrado vertical */
    gap: 10px; /* Espacio entre el checkbox y el texto */
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

.cc_selectors input[type="checkbox"] {
    accent-color: #3498db; /* Color del checkbox */
    margin: 0; /* Eliminar márgenes por defecto */
}

/* Botones */
.buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 3px;
    background-color: #3498db;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buttons button:hover {
    background-color: #2980b9;
}

.buttons button:focus-visible,
.floating-icon:focus-visible,
.cc_selectors input:focus-visible {
    outline: 3px solid #111111;
    outline-offset: 3px;
}

.buttons button#cc_aceptar-todas {
    background-color: #075183;
}
.buttons button#cc_aceptar-todas:hover {
    background-color: #03a054;
}

/*
.buttons button#cc_ninguna {
    background-color: #565453;
}
.buttons button#cc_ninguna:hover {
    background-color: #2a2827;
}
*/ 

/* Estilos para los tooltips */
.cc_selectors label {
    position: relative; /* Necesario para posicionar el tooltip */
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer; 
}

.cc_selectors label .tooltip-text {
    display: none; /* Ocultar el texto del tooltip por defecto */
    position: absolute;
    top: 130%;
    left: 50%; 
    width:400px;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    font-size: 0.80rem;
    padding: 8px 10px;
    border-radius: 3px;
    white-space: normal;
    z-index: 10;
    pointer-events: none;
}

.cc_selectors label:hover .tooltip-text {
    display: block; /* Mostrar el tooltip al hacer hover */
}

/* Flecha del tooltip */
.cc_selectors label .tooltip-text::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Icono flotante */
.floating-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #f1f4f45c;
    color:#747474;
    padding:11px 10px 5px 10px;
    border:0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* display: none;Oculto por defecto */
    transition: transform 0.3s ease;
}

.floating-icon:hover {
    transform: scale(1.1);
}

.floating-icon {
    border: 0;
}

.floating-icon img {
    display: block;
}

.cookie-consent p.cookie-consent__legal {
    margin: 18px 0 0;
    text-align: center;
}

.cookie-consent__legal a {
    color: #075183;
    font-weight: 700;
}

/* Reorganiza categorías y acciones para mantener el panel utilizable en móviles. */
@media (max-width: 640px) {
    .cookie-consent {
        width: calc(100% - 24px);
        padding: 22px 18px;
        text-align: left;
    }

    .cookie-consent p {
        margin-bottom: 20px;
        text-align: left;
    }

    .cc_selectors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
        margin-bottom: 22px;
    }

    .buttons {
        flex-direction: column;
    }

    .buttons button {
        width: 100%;
        min-height: 44px;
    }

    .cookie-consent p.cookie-consent__legal {
        margin-top: 16px;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .cc_selectors {
        grid-template-columns: 1fr;
    }
}
