/* Meal Plan Field Styling */
.cs-form-field.cs-meal-plan {
    margin-bottom: 20px;
}

.cs-form-field.cs-meal-plan .field-wrap {
    position: relative;
}

.cs-form-field.cs-meal-plan .meal-plan-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.cs-form-field.cs-meal-plan .meal-plan-select:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.cs-form-field.cs-meal-plan .meal-plan-description {
    margin-top: 10px;
    padding: 12px;
    background-color: #f9f9f9;
    border-left: 3px solid #c41e3a;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    border-radius: 3px;
}

.meal-plan-price-preview {
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.meal-plan-price-preview strong {
    color: #333;
}

/* Price Breakdown Meal Plan Line */
.cs-form-price-details .meal-plan-breakdown {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cs-form-price-details .meal-plan-breakdown .csf-pd-label {
    font-size: 14px;
    color: #666;
}

.cs-form-price-details .meal-plan-breakdown .csf-pd-value {
    font-size: 14px;
    font-weight: 600;
    color: #c41e3a;
}

/* Cart Display Styling */
.woocommerce-cart-form .product-name dl.variation {
    margin-top: 10px;
}

.woocommerce-cart-form .product-name dl.variation dt {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.woocommerce-cart-form .product-name dl.variation dd {
    margin-left: 0;
    margin-bottom: 8px;
    color: #666;
}

.woocommerce-cart-form .product-name dl.variation dd p {
    margin: 0;
}

/* Order Details Styling */
.woocommerce-order-details .woocommerce-table__product-name dl {
    margin: 10px 0;
}

.woocommerce-order-details .woocommerce-table__product-name dt {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.woocommerce-order-details .woocommerce-table__product-name dd {
    margin-left: 0;
    margin-bottom: 8px;
    color: #666;
}

/* Admin Order Details */
.woocommerce-order-items .wc-order-item-name dl {
    margin: 10px 0 0 0;
}

.woocommerce-order-items .wc-order-item-name dt {
    font-weight: 600;
    color: #333;
}

.woocommerce-order-items .wc-order-item-name dd {
    margin: 5px 0;
    padding-left: 10px;
}

/* Checkout Page Styling */
.woocommerce-checkout-review-order .product-name dl {
    margin-top: 5px;
    font-size: 0.9em;
}

.woocommerce-checkout-review-order .product-name dt {
    font-weight: 600;
    display: inline;
}

.woocommerce-checkout-review-order .product-name dd {
    display: inline;
    margin: 0 0 0 5px;
}

.woocommerce-checkout-review-order .product-name dd:after {
    content: "";
    display: block;
    margin-bottom: 3px;
}

/* Price Display */
.meal-plan-price-preview .woocommerce-Price-amount {
    font-weight: 600;
    color: #c41e3a;
}

/* Loading State */
.cs-form-field.cs-meal-plan.loading .meal-plan-select {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .cs-form-field.cs-meal-plan .meal-plan-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .cs-form-field.cs-meal-plan .meal-plan-description {
        font-size: 12px;
        padding: 10px;
    }
}

/* Square style compatibility */
.cs-form-square .cs-form-field.cs-meal-plan .meal-plan-select {
    border-radius: 0;
}

/* Inline label style compatibility */
.inline-label .cs-form-field.cs-meal-plan .cs-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Style Block compatibility */
.style-block .cs-form-field.cs-meal-plan {
    background-color: transparent;
}

/* Email Order Details Styling */
.woocommerce-email table.td dl {
    margin: 10px 0;
}

.woocommerce-email table.td dt {
    font-weight: bold;
}

.woocommerce-email table.td dd {
    margin: 5px 0;
}

/* Theme Integration Styling */
.cs-reservation-form .cs-form-field.cs-meal-plan {
    margin-bottom: 20px;
    background-color: transparent;
}

.cs-reservation-form .cs-form-field.cs-meal-plan .cs-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-select:focus {
    border-color: #c41e3a;
    outline: none;
    box-shadow: 0 0 0 1px rgba(196, 30, 58, 0.3);
    background-color: rgba(255,255,255,0.15);
}

.cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-select option {
    background-color: #333;
    color: #fff;
}

.cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-description {
    margin-top: 10px;
    padding: 12px;
    background-color: rgba(255,255,255,0.05);
    border-left: 3px solid #c41e3a;
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
    border-radius: 3px;
}

/* Price Details Integration */
.cs-form-price-details .meal-plan-breakdown-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cs-form-price-details .meal-plan-breakdown-line .csf-pd-label {
    color: #999;
    font-size: 14px;
}

.cs-form-price-details .meal-plan-breakdown-line .csf-pd-value {
    color: #c41e3a;
    font-weight: 600;
    font-size: 14px;
}

/* Responsive Design for Theme */
@media screen and (max-width: 768px) {
    .cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .cs-reservation-form .cs-form-field.cs-meal-plan .meal-plan-description {
        font-size: 12px;
        padding: 10px;
    }
}

/* Hide confusing pricing breakdown items */
/* Hide Total Base Price - use visibility hidden so JavaScript can still read it */
.cs-form-price-details .csf-pd-total-base,
.cs-form-price-details ul .csf-pd-total-base {
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
}

/* Hide Meal Plan breakdown line */
.cs-form-price-details .meal-plan-breakdown-line {
    display: none !important;
}

/* Hide Extra Services from template (white text, theme default) - but keep dynamically added one */
.cs-form-price-details .template-extra-services {
    display: none !important;
}