/* Product page: stack Pickup Date, capacity, then quantity+button in a clear layout */
.single-product .sb-product-description form.cart .sb-buttons-frame {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Pickup Date and capacity each take full width = own row */
.single-product .sb-product-description .sb-buttons-frame .aidafood-pickup-date-wrapper,
.single-product .sb-product-description .sb-buttons-frame .aidafood-capacity-display {
    flex: 1 1 100%;
    width: 100%;
    margin-bottom: 0;
}

/* Quantity + Add to cart on same row at bottom */
.single-product .sb-product-description .sb-buttons-frame .sb-input-number-frame {
    margin-right: 1rem;
    margin-bottom: 0;
}

.aidafood-pickup-date-wrapper {
    background: #f8f6f3;
    border: 1px solid #e8e4de;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.aidafood-pickup-date-wrapper h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.aidafood-date-desc {
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.aidafood-pickup-date-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.aidafood-pickup-date {
    width: 100%;
    min-width: 260px;
    max-width: min(100%, 24rem);
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #1e4238;
    border-radius: 8px;
    background: #fff;
    display: block;
    box-sizing: border-box;
}

/* Native <select> often clips weekday + date labels unless min-height/line-height are explicit */
select.aidafood-pickup-date-select {
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: menulist;
    line-height: 1.55;
    min-height: 3.5rem;
    height: auto;
    padding: 0.9rem 2.5rem 0.9rem 1rem;
    vertical-align: middle;
}

/* Prominent capacity display on product page */
.aidafood-capacity-display {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 600;
}

.aidafood-capacity-remaining {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #1b5e20;
}

.aidafood-capacity-soldout {
    background: #ffebee;
    border: 2px solid #e53935;
    color: #b71c1c;
}

.aidafood-capacity-number {
    display: block;
}

/* Quantity input - wider and more visible */
.woocommerce .quantity input.qty {
    width: 80px !important;
    min-width: 80px !important;
    padding: 0.85rem 1rem !important;
    font-size: 1.15rem !important;
    text-align: center;
    border: 2px solid #1e4238;
    border-radius: 8px;
}

.aidafood-pickup-info,
.aidafood-thankyou-pickup {
    background: #f0f7f0;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.aidafood-pickup-info h4,
.aidafood-thankyou-pickup h3 {
    margin-top: 0;
}

/* Pick up at door box — prominent confirmation before Place order button */
.aidafood-pickup-at-door-box {
    background: linear-gradient(135deg, #2d4a3e 0%, #3d6b5a 100%);
    color: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0 1.25rem;
    text-align: center;
    border: 2px solid #3d5a4e;
}

.aidafood-pickup-at-door-label {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: 0.05em;
}

.aidafood-pickup-at-door-address {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    opacity: 0.95;
}

.aidafood-pickup-at-door-phone {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    opacity: 0.95;
    font-weight: 600;
}

/* Block order summary: same horizontal inset as .wc-block-components-order-summary (16px). */
.wp-block-woocommerce-checkout-order-summary-block .aidafood-checkout-order-summary-pickup.aidafood-pickup-info,
.wp-block-woocommerce-cart-order-summary-block .aidafood-checkout-order-summary-pickup.aidafood-pickup-info {
    margin: 0 16px 16px;
    padding: 10px 12px;
    box-sizing: border-box;
    width: auto;
    max-width: none;
}

.wp-block-woocommerce-checkout-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-heading,
.wp-block-woocommerce-cart-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-heading {
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.35;
}

.wp-block-woocommerce-checkout-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-line,
.wp-block-woocommerce-cart-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-line {
    margin: 0 0 6px;
    font-size: 1em;
    line-height: 1.45;
}

.wp-block-woocommerce-checkout-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-line:last-child,
.wp-block-woocommerce-cart-order-summary-block .aidafood-checkout-order-summary-pickup .aidafood-pickup-summary-line:last-child {
    margin-bottom: 0;
}

.aidafood-pickup-at-door-note {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

