/* Estilos para el personalizador de comidas */
.cpi-ingredients-wrapper {
    border: 1px solid #1a2a6c;
    padding: 20px;
    margin-bottom: 25px;
    background: #f9fbff;
    border-radius: 8px;
    font-family: Poppins, sans-serif; /* Adjusted to your example's font */
}

.cpi-ingredients-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.3em;
    color: #1a2a6c;
}

.cpi-ingredient-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px; /* Space between label and input */
}

.cpi-ingredient-item:last-child {
    margin-bottom: 0;
}

.cpi-ingredient-label {
    flex-grow: 1;
    cursor: pointer;
    font-weight: 500;
    color: #1a2a6c;
   /* To align price span */
    align-items: center;
}

.cpi-ingredient-label span {
    font-weight: 500;
    color: #3850a3; /* Adjusted color */
    font-size: 0.9em;
    margin-left: 8px;
}

/* Base styles for inputs */
.cpi-ingredient-input {
    height: 28px;
    border: 2px solid #1a2a6c;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    transition: border-color 0.3s ease;
    padding: 2px 5px; /* Added padding */
}

/* Specific styles for checkbox */
.cpi-ingredient-input[type="checkbox"] {
    width: 28px; /* Adjusted width for better tap target */
    min-width: 28px;
    appearance: none; /* Hide default checkbox */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 2px solid #1a2a6c;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cpi-ingredient-input[type="checkbox"]:checked {
    background-color: #1a2a6c; /* Checkbox fill color when checked */
    border-color: #1a2a6c;
}

.cpi-ingredient-input[type="checkbox"]:checked::before {
    content: '\2713'; /* Checkmark character */
    font-size: 18px;
    color: #fff;
    line-height: 1;
    position: absolute;
}

/* Specific styles for number input */
.cpi-ingredient-input[type="number"] {
    width: 60px; /* Consistent width */
    text-align: center;
}

.cpi-ingredient-input:focus {
    border-color: #3850a3; /* Focus color */
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 80, 163, 0.2); /* Soft shadow on focus */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cpi-ingredient-item {
        flex-wrap: wrap; /* Allow items to wrap on smaller screens */
        gap: 10px; /* Reduce gap */
    }

    .cpi-ingredient-label {
        flex-basis: 100%; /* Label takes full width */
        margin-bottom: 5px;
    }

    .cpi-ingredient-input {
        flex-grow: 1; /* Inputs can grow */
        max-width: 100px; /* Limit max width for inputs */
    }

    .cpi-ingredient-input[type="checkbox"] {
        width: auto; /* Let it scale */
        flex-grow: 0;
    }
}

/* Ensure no interference with Elementor or other global styles */
.elementor-editor-active .cpi-ingredients-wrapper {
    display: none !important; /* Hide in Elementor editor */
}