/**
 * Burton Farms WooCommerce Features - Frontend Styles
 */

/* Local Pickup Only Styles */
.pickup-only-notice {
    background-color: #f7f9fc;
    border-color: #3498db;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.pickup-only-notice strong {
    font-size: 1.1em;
    color: #2c3e50;
}

.pickup-time-wrapper {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.pickup-time-wrapper h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.store-hours-notice {
    background-color: #e3f2fd;
    padding: 10px 15px;
    border-left: 4px solid #2196f3;
    margin-bottom: 15px;
    font-style: italic;
}

/* Weight-Based Pricing Styles */
.weight-pricing-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    clear: both;
}

.pricing-breakdown {
    margin-bottom: 10px;
}

.pricing-breakdown p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.6;
}

.pricing-breakdown strong {
    color: #212529;
    font-weight: 600;
}

.estimated-item-price {
    background-color: #e9ecef;
    padding: 8px 12px;
    border-radius: 3px;
    margin-top: 10px !important;
}

.estimated-amount {
    color: #28a745;
    font-size: 1.1em;
    font-weight: bold;
}

.variance-info {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 5px;
}

.weight-notice {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.weight-notice small {
    color: #6c757d;
    font-size: 12px;
}

/* Simplified price display in title */
.price .per-unit {
    font-size: 0.85em;
    font-weight: normal;
    color: #6c757d;
}

/* Weight input styling */
.weight-input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #212529;
}

.weight-input {
    background-color: #f8f9fa !important;
    border: 2px solid #28a745 !important;
}

/* Adjust weight instructions styling */
.weight-instructions {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
}

.weight-instructions strong {
    display: block;
    margin-bottom: 5px;
}

/* Weight total display */
.weight-total {
    margin-top: 10px;
    padding: 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    font-size: 1.1em;
}

.weight-total .woocommerce-Price-amount {
    color: #155724;
    font-weight: bold;
}

/* Weight unit in cart */
.weight-unit {
    font-weight: normal;
    color: #6c757d;
    margin-left: 5px;
}

/* Pound input styling */
.weight-input-container {
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.pound-input-wrapper {
    margin: 10px 0;
}

.pound-input-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #212529;
}

.pound-input {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #28a745;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
}

.pound-unit {
    font-weight: 600;
    color: #28a745;
    margin-left: 8px;
    font-size: 16px;
}

.ounce-reminder {
    margin: 5px 0;
    color: #6c757d;
    font-style: italic;
}

.weight-calculation-display {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.calculated-ounces {
    display: block;
    margin-bottom: 8px;
    color: #495057;
}

.calculated-price {
    display: block;
    font-size: 1.2em;
}

.calculated-price .woocommerce-Price-amount {
    color: #28a745;
    font-weight: bold;
}

/* Hide quantity field for weight mode */
.hidden-for-weight-mode,
.hidden-quantity-field {
    display: none !important;
}

/* Weight quantity display in cart */
.weight-quantity-display {
    text-align: center;
    padding: 10px;
}

.weight-quantity-display strong {
    font-size: 1.2em;
    color: #212529;
}

.weight-quantity-display small {
    color: #6c757d;
    font-style: italic;
}

.weight-pricing-notice {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #856404;
    margin: 20px 0;
}

/* Cart Item Weight Display */
.woocommerce-cart .product-price small.estimated,
.woocommerce-cart .product-subtotal small.estimated {
    color: #e67e22;
    font-style: italic;
}

/* Checkout Styling - Force visibility of pickup fields */
#pickup_time_field {
    clear: both;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 9999 !important;
}

#pickup_time_field .form-row {
    margin-bottom: 15px;
    display: block !important;
    visibility: visible !important;
}

/* Force date and time inputs to be visible */
#pickup_date,
#pickup_time,
#pickup_instructions {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

/* Ensure the entire wrapper is visible */
.pickup-time-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
}

/* Hide shipping fields on checkout */
.woocommerce-shipping-fields {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pickup-time-wrapper {
        padding: 15px;
    }
    
    .weight-estimation-notice {
        padding: 10px;
        font-size: 0.95em;
    }
}

/* Admin Order Weight Input */
.woocommerce_order_items .item_weight input {
    width: 80px;
}

.woocommerce_order_items .item_weight small {
    color: #666;
    font-style: italic;
}

/* Store Selection Styles */
.store-selection-wrapper {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.store-selection-wrapper h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
    font-size: 1.2em;
}

/* Radio button styling */
.store-selection-wrapper input[type="radio"] {
    margin-right: 8px;
}

.store-selection-wrapper label {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    font-weight: 600;
}

.store-selection-wrapper .woocommerce-input-wrapper label {
    margin-bottom: 10px;
}

/* Store details display */
.store-details-display {
    margin-top: 15px;
    padding: 15px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.store-detail {
    line-height: 1.6;
}

.store-detail strong {
    color: #28a745;
    font-size: 1.1em;
}

/* Admin Store Display */
.order-store-location {
    background: #e3f2fd;
    padding: 10px;
    border-left: 4px solid #2196f3;
    margin: 10px 0;
}

/* Checkout Cart Controls */
.checkout-quantity-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkout-quantity-wrap .qty {
    width: 60px !important;
    text-align: center;
    padding: 8px;
    border: 2px solid #000;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 500;
}

.checkout-quantity-wrap button {
    padding: 8px 12px !important;
    border: 1px solid #000 !important;
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    cursor: pointer !important;
    border-radius: 3px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
    font-weight: bold !important;
}

.checkout-quantity-wrap button:hover {
    background: #333 !important;
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.checkout-quantity-wrap .minus-qty,
.checkout-quantity-wrap .plus-qty {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    font-weight: bold !important;
    font-size: 20px !important;
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
}

.checkout-quantity-wrap .minus-qty:hover,
.checkout-quantity-wrap .plus-qty:hover {
    background: #333 !important;
    background-color: #333 !important;
}

.checkout-quantity-wrap .remove-item {
    background: #dc3545 !important;
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
    margin-left: 10px !important;
    font-size: 24px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
}

.checkout-quantity-wrap .remove-item:hover {
    background: #c82333 !important;
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Override any Avada theme styles */
.woocommerce-checkout .checkout-quantity-wrap button,
.woocommerce .checkout-quantity-wrap button,
body .checkout-quantity-wrap button {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
}

/* Thank You Page Pickup Information Styling */
.thankyou-pickup-info {
    background-color: #e8f5e9;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thankyou-pickup-info h3 {
    color: #155724;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #28a745;
}

.pickup-store-details {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
}

.pickup-store-details strong {
    color: #28a745;
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

.pickup-store-details .store-address {
    color: #495057;
    margin-bottom: 5px;
}

.pickup-store-details .store-phone {
    color: #007bff;
    font-weight: 600;
}

.pickup-datetime-info {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    margin-bottom: 15px;
}

.pickup-datetime-info strong {
    color: #856404;
    display: inline-block;
    min-width: 80px;
}

.pickup-datetime-info .pickup-date,
.pickup-datetime-info .pickup-time {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.pickup-instructions {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    margin-bottom: 15px;
    border-radius: 0 5px 5px 0;
}

.pickup-instructions strong {
    color: #495057;
    display: block;
    margin-bottom: 5px;
}

.store-hours-reminder {
    padding: 10px 15px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    color: #0c5460;
    font-style: italic;
}

.pickup-order-number {
    padding: 10px 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-top: 15px;
    font-weight: 600;
    color: #155724;
}

/* Mobile Responsive for Thank You Page */
@media (max-width: 768px) {
    .thankyou-pickup-info {
        padding: 15px;
        margin: 20px 0;
    }
    
    .thankyou-pickup-info h3 {
        font-size: 1.3em;
    }
    
    .pickup-store-details,
    .pickup-datetime-info {
        padding: 10px;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    .checkout-quantity-wrap {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .checkout-quantity-wrap .qty {
        width: 40px !important;
        font-size: 14px;
    }
    
    .checkout-quantity-wrap button {
        padding: 4px 8px;
        font-size: 14px;
    }
    
    .checkout-quantity-wrap .minus-qty,
    .checkout-quantity-wrap .plus-qty,
    .checkout-quantity-wrap .remove-item {
        width: 26px;
        height: 26px;
    }
    
    .thankyou-pickup-info h3 {
        font-size: 1.2em;
    }
    
    .pickup-store-details strong {
        font-size: 1.1em;
    }
}