/* Solución para checkboxes invisibles en características de artículos */

/* Forzar la aparición de checkboxes en todos los navegadores */
input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0.25em 0.5em 0.25em 0 !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
    border: 1px solid #adb5bd !important;
    border-radius: 0.25em !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Estilo para checkboxes marcados */
input[type="checkbox"]:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

/* Estilo para checkboxes con foco */
input[type="checkbox"]:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Estilo para checkboxes deshabilitados */
input[type="checkbox"]:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: #e9ecef !important;
}

/* Estilos específicos para checkboxes de Bootstrap */
.form-check-input {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-top: 0.25em !important;
    margin-right: 0.5em !important;
    vertical-align: top !important;
    background-color: #ffffff !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-radius: 0.25em !important;
    transition: background-color 0.15s ease-in-out, background-position 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    position: relative !important;
    cursor: pointer !important;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.form-check-input:disabled {
    opacity: 0.6 !important;
    pointer-events: none !important;
    background-color: #e9ecef !important;
}

/* Estilos para las etiquetas de checkboxes */
.form-check-label {
    cursor: pointer !important;
    margin-left: 0.5rem !important;
    user-select: none !important;
}

/* Estilos específicos para los checkboxes de características */
.toggle-caracteristica,
.toggle-valor {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0.25em 0.5em 0.25em 0 !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
    border: 1px solid #adb5bd !important;
    border-radius: 0.25em !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
    cursor: pointer !important;
}

.toggle-caracteristica:checked,
.toggle-valor:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

.toggle-caracteristica:focus,
.toggle-valor:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.toggle-caracteristica:disabled,
.toggle-valor:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: #e9ecef !important;
}

/* Asegurar que los checkboxes sean visibles en el contenedor de valores */
.valores-container .form-check {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
}

.valores-container .form-check-input {
    flex-shrink: 0 !important;
    margin-right: 0.5rem !important;
}

.valores-container .form-check-label {
    flex-grow: 1 !important;
    cursor: pointer !important;
}

/* Estilos para el contenedor de valores */
.valores-lista {
    margin-top: 0.5rem !important;
}

.valores-lista .form-check {
    margin-bottom: 0.25rem !important;
}

/* Asegurar que los checkboxes sean visibles en todos los contextos */
.list-group-item .form-check {
    display: flex !important;
    align-items: center !important;
}

.list-group-item .form-check-input {
    margin-right: 0.5rem !important;
}

/* Estilos para navegadores específicos */
@supports (-webkit-appearance: none) {
    input[type="checkbox"] {
        -webkit-appearance: none !important;
        appearance: none !important;
        background-color: #ffffff !important;
        border: 1px solid #adb5bd !important;
        border-radius: 0.25em !important;
        width: 16px !important;
        height: 16px !important;
        position: relative !important;
        cursor: pointer !important;
    }
    
    input[type="checkbox"]:checked {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
    }
    
    input[type="checkbox"]:checked::after {
        content: '✓' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        color: white !important;
        font-size: 10px !important;
        font-weight: bold !important;
    }
} 