/* Oculta el checkbox predeterminado del navegador */
.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Tamaño S - Contenedor de etiqueta */
.custom-checkbox-container.s {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px;
    gap: 8px;
    width: auto;
    height: 40px;
    min-width: 36px;
}

/* Contenedor visual del check-mark y pseudo-elementos */
.custom-checkbox-container.s .custom-checkbox-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    z-index: 2;
}

/* Hover y Focus: cuadrado de fondo */
.custom-checkbox-container.s .custom-checkbox-visual::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    background-color: var(--fondos-digitales-fondo-4, #DFEAFF);
    z-index: 1;
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-checkbox-container.s:hover .custom-checkbox-visual::before {
    width: 24px;
    height: 24px;
    opacity: 1;
}

/* Estilo base de la casilla de verificación */
.custom-checkbox-mark.s {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid #0033A0;
    /* Paleta Complementaria/Azul profundo */
    border-radius: 4px;
    flex: none;
    z-index: 2;
}

/* Estado marcado - cambia el fondo cuando está checked */
.custom-checkbox-container.s input:checked+label .custom-checkbox-visual .custom-checkbox-mark.s {
    background: #2D6DF6;
    /* Paleta Principal/Azul cielo latino */
    border-color: #2D6DF6;
}

/* Marca de verificación */
.custom-checkbox-container.s .custom-checkbox-mark.s:after {
    content: "";
    position: absolute;
    display: none;
    left: 25%;
    right: 25%;
    top: 28.33%;
    bottom: 39.17%;
    border-radius: 1px;
    border: solid white;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

.custom-checkbox-container.s input:checked+label .custom-checkbox-visual .custom-checkbox-mark.s:after {
    display: block;
}

/* Estilo del texto de la etiqueta */
.custom-checkbox-container label {
    color: var(--escala-grises-gris-500, #3F3F41);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: var(--desktop-body-regular-font-family);
    font-size: var(--desktop-body-regular-font-size);
    font-style: var(--desktop-body-regular-font-style);
    font-weight: var(--desktop-body-regular-font-weight);
    line-height: var(--desktop-body-regular-line-height);
    cursor: pointer;
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

.custom-checkbox-container:has(input:disabled) .custom-checkbox-visual .custom-checkbox-mark {
    border-color: var(--tonos-neutros-pantone-429-C, #B4B4B5);
    pointer-events: none;
}

.custom-checkbox-container:has(input:disabled) label {
    color: var(--tonos-neutros-pantone-429-C, #B4B4B5);
}