/* Mobile - default single column (no media query needed) */
.inline-variable-form .attribute-select {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

/* Tablet - 2 column layout *
@media (min-width: 768px) and (max-width: 1023px) {
    .inline-variable-form .attribute-select {
        width: 48%;
        margin-right: 2%;
        display: inline-block;
        vertical-align: top;
    }
    .inline-variable-form .attribute-select:nth-child(2n) {
        margin-right: 0;
    }
}*/

/* Desktop - 3 column layout */
@media (min-width: 1024px) {
    .inline-variable-form .attribute-select {
        width: 30%;
        margin-right: 2%;
        display: inline-block;
        vertical-align: top;
    }
    .inline-variable-form .attribute-select:nth-child(2n) {
        margin-right: 2%; /* Reset the tablet nth-child rule */
    }
    .inline-variable-form .attribute-select:nth-child(3n) {
        margin-right: 0; /* Remove margin on every 3rd item */
    }
}

/* Quantity styling - always single row, narrow width */
.quantity-input {
    clear: both;
    margin-top: 15px;
    color: #613C21;
}

.quantity-field {
    width: 80px !important; /* Wide enough for 3 digits */
    font-size: 14px;
    color: #613C21;
    text-align: center;
}

/* Form inputs styling */
.inline-variable-form select,
.inline-variable-form input[type="number"] {
    border: 1px solid #613C21 !important;
    border-radius: 0px !important;
    font-size: 14px;
    color: #613C21;
}

.inline-variable-form select:focus,
.inline-variable-form input[type="number"]:focus {
    border-color: #613C21 !important;
    outline: none;
}

/* Labels and text styling */
.attribute-select label,
.quantity-input,
.current-price {
    color: #613C21;
}

.attribute-select label,
.current-price {
    font-size: 16px;
}

/* Add to cart button styling */
.inline-add-to-cart {
    margin-right: 2rem !important;
    display: inline-block;
    background-color: #BC326B !important;
    border-radius: 0px !important;
    color: white !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    padding: 12px 24px !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.inline-add-to-cart:hover {
    background-color: #a52958 !important;
}

.inline-add-to-cart:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
}

/* Price display area */
.price-display-area {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #613C21;
}

/* Form container */
.inline-variable-form {
    margin-bottom: 20px;
}

.inline-variable-form .cart {
    display: block;
}

/* Labels */
.attribute-select label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.quantity-input label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 500;
}

/* Select dropdowns */
.inline-variable-form select {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23613C21' d='m0 0 2 2 2-2z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Number input */
.inline-variable-form input[type="number"] {
    padding: 8px 12px;
    box-sizing: border-box;
}

/* Hidden elements */
.variations-data {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .inline-variable-form .attribute-select {
        margin-bottom: 15px;
    }
    
    .quantity-input {
        margin-top: 20px;
    }
    
    .price-display-area {
        text-align: center;
        margin: 15px 0;
    }
    
    .inline-add-to-cart {
        width: 100%;
        margin-right: 0 !important;
        margin-top: 15px;
    }
}

/* Loading states */
.inline-add-to-cart:disabled {
    opacity: 0.6;
}

/* Accessibility improvements */
.inline-variable-form select:focus,
.inline-variable-form input:focus {
    box-shadow: 0 0 0 2px rgba(188, 50, 107, 0.3);
}

/* Clear floats */
.inline-variable-form::after {
    content: "";
    display: table;
    clear: both;
}

/* Styling for disabled single-option select fields */
.inline-variable-form select:disabled {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    border-color: #ddd !important;
}

/* Remove the dropdown arrow for disabled selects since they can't be opened */
.inline-variable-form select:disabled {
    background-image: none !important;
    padding-right: 12px !important;
}

/* Pick x of y style */

/* Food Item Selection Styles */
.food-item-selection {
    margin: 15px 0;
    border: 1px solid #613C21;
    border-radius: 0px;
    background-color: white;
    display: inline-block;
    vertical-align: baseline;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    position: relative;
    top: 4px;
}

/* Top Box - Always Visible */
.food-item-top-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 12px 8px 12px;
    background-color: white;
    cursor: pointer;
    border-bottom: none;
    min-height: 32px;
    box-sizing: border-box;
    line-height: 1.2;
}

.food-item-top-box:hover {
    background-color: #f9f9f9;
}

.food-item-display {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-height: 20px;
    flex-direction: column;
    gap: 4px;
}

.food-item-label {
    color: #613C21;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    flex-shrink: 0;
    line-height: 1.2;
}

.food-item-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
    width: 100%;
}

.food-item-chip {
    background-color: #f0f0f0;
    color: #613C21;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    white-space: nowrap;
    line-height: 1.2;
}

.food-item-toggle {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 12px;
    height: 12px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
    pointer-events: none;
}

.food-item-arrow {
    transition: transform 0.2s ease;
    width: 12px;
    height: 8px;
}

.food-item-selection.expanded .food-item-arrow {
    transform: rotate(180deg);
}

/* Bottom Box - Toggleable */
.food-item-bottom-box {
    border-top: 1px solid #613C21;
    background-color: white;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
}

.food-item-selection.expanded .food-item-bottom-box {
    max-height: 500px;
}

.food-item-options {
    padding: 12px;
}

.food-item-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 0;
    width: 100%;
}

.food-item-option:last-child {
    margin-bottom: 0;
}

.food-item-name {
    color: #613C21;
    font-size: 14px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    min-width: 150px !important;
    flex: 1 1 auto !important;
    width: auto !important;
}

.food-item-upcharge {
    color: #BC326B !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
    display: inline-block !important;
}

.food-item-qty {
    width: 50px !important;
    padding: 6px 4px !important;
    border: 1px solid #613C21;
    border-radius: 0px;
    font-size: 14px;
    color: #613C21;
    text-align: center;
    background-color: white;
    min-width: 50px !important;
    max-width: 50px !important;
}

.food-item-qty:focus {
    border-color: #613C21;
    outline: none;
    box-shadow: 0 0 0 2px rgba(188, 50, 107, 0.3);
}

.food-item-buttons {
    padding: 0 12px 12px 12px;
    display: flex;
    gap: 8px;
}

.food-item-apply,
.food-item-clear {
    padding: 6px 12px;
    border: 1px solid #613C21;
    border-radius: 0px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.food-item-apply {
    background-color: #BC326B;
    color: white !important;
    border-color: #BC326B;
}

.food-item-apply:hover {
    background-color: #a52958;
    color: white;
}

.food-item-apply.applied {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.food-item-clear {
    background-color: #613C21;
    color: white !important;
    border-color: #613C21;
}

.food-item-clear:hover {
    background-color: #4d2f18;
    color: white;
}

/* Error states */
.food-item-selection.error .food-item-top-box {
    border-color: #dc3545;
}

.food-item-selection.error .food-item-qty {
    border-color: #dc3545;
}

/* Mobile responsive 
@media (max-width: 767px) {
    .food-item-top-box {
        padding: 10px 12px;
    }
    
    .food-item-label {
        font-size: 14px;
    }
    
    .food-item-chips {
        gap: 4px;
    }
    
    .food-item-chip {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .food-item-options {
        padding: 10px;
    }
    
    .food-item-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .food-item-qty {
        align-self: flex-end;
        width: 50px;
    }
    
    .food-item-buttons {
        padding: 0 10px 10px 10px;
        flex-direction: column;
    }
    
    .food-item-apply,
    .food-item-clear {
        width: 100%;
        padding: 8px 16px;
    }
}*/

/* Accessibility improvements */
.food-item-selection select:focus,
.food-item-selection input:focus {
    box-shadow: 0 0 0 2px rgba(188, 50, 107, 0.3);
}

/* Clear floats */
.food-item-selection::after {
    content: "";
    display: table;
    clear: both;
}

/* When chips are present, hide label */
.food-item-display.has-chips .food-item-label {
    display: none;
}

.price-breakdown {
    font-size: 14px;
    color: #613C21;
    line-height: 1.2;
}