/* =====================================================
   CHECKOUT V2 STYLES
   Price breakdown, confirmation modal, ACH flow
   ===================================================== */

/* --- Order Confirmation Modal --- */
.order-confirmation-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.order-confirmation-overlay.active {
    display: flex !important;
}
.order-confirmation-modal {
    background: white;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: confirmSlideUp 0.4s ease;
}
@keyframes confirmSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.confirmation-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    padding: 30px 24px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}
.confirmation-checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    animation: checkPop 0.5s ease 0.2s both;
}
@keyframes checkPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.confirmation-header h3 {
    font-size: 1.4rem;
    margin: 0 0 4px;
}
.confirmation-order-number {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}
.confirmation-body {
    padding: 24px;
}

/* --- Receipt Price Breakdown Table --- */
.price-breakdown {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
}
.price-breakdown .item-row td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.price-breakdown .item-name {
    font-weight: 600;
    color: var(--earth-dark, #2C1810);
    font-size: 0.95rem;
}
.price-breakdown .item-detail {
    font-size: 0.82rem;
    color: var(--earth-brown, #5D4037);
    margin-top: 2px;
}
.price-breakdown .item-amount {
    text-align: right;
    font-weight: 600;
    color: var(--earth-dark, #2C1810);
    white-space: nowrap;
}
.price-breakdown .free-row td {
    padding: 8px 0;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.9rem;
}
.price-breakdown .fee-row td {
    padding: 6px 0;
    font-size: 0.85rem;
    color: #666;
}
.price-breakdown .total-row td {
    padding: 14px 0 8px;
    border-top: 2px solid var(--earth-dark, #2C1810);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--earth-dark, #2C1810);
}

/* --- Confirmation Delivery Info --- */
.confirmation-delivery-info {
    background: #f8faf8;
    border: 1px solid #e0e8e0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
}
.confirmation-delivery-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--earth-brown, #5D4037);
}
.confirmation-delivery-info strong {
    color: var(--earth-dark, #2C1810);
}
.confirmation-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 10px;
}
.confirmation-footer .btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-receipt {
    background: var(--earth-dark, #2C1810);
    color: white !important;
    border: none;
}
.btn-receipt:hover { opacity: 0.9; }
.btn-close-confirm {
    background: white;
    color: var(--earth-dark, #2C1810) !important;
    border: 2px solid #e0e0e0;
}
.btn-close-confirm:hover { background: #f5f5f5; }

/* --- Checkout Step 3 Price Breakdown --- */
.checkout-price-breakdown {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}
.checkout-price-breakdown .bp-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--earth-brown, #5D4037);
}
.checkout-price-breakdown .bp-line.bp-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.checkout-price-breakdown .bp-line.bp-item .bp-label {
    font-weight: 600;
    color: var(--earth-dark, #2C1810);
}
.checkout-price-breakdown .bp-detail {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}
.checkout-price-breakdown .bp-free {
    color: #16a34a !important;
    font-weight: 600;
}
.checkout-price-breakdown .bp-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0 4px;
    border-top: 2px solid var(--earth-dark, #2C1810);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--earth-dark, #2C1810);
    margin-top: 4px;
}
.checkout-price-breakdown .bp-savings {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #155724;
    font-weight: 600;
    text-align: center;
}

/* --- ACH Delivery Warning --- */
.ach-delivery-warning {
    background: #FFF3CD;
    border: 1px solid #FFCC00;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    display: none;
}
.ach-delivery-warning.show {
    display: block;
}
.ach-delivery-warning h4 {
    margin: 0 0 8px;
    color: #856404;
    font-size: 0.95rem;
}
.ach-delivery-warning p {
    margin: 4px 0;
    font-size: 0.88rem;
    color: #856404;
}
.ach-delivery-warning .ach-switch-link {
    color: var(--warm-orange, #FF6F00);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

/* Consent checkbox — override .form-group label (display:block, uppercase, bold) */
.consent-checkbox-group .consent-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    text-transform: none;
    font-size: 13px;
    font-weight: 400;
    color: #5D4037;
    line-height: 1.5;
    margin-bottom: 0;
    letter-spacing: 0;
}

.consent-checkbox-group .consent-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #E07B39;
}

.consent-checkbox-group .checkbox-text {
    flex: 1;
    text-transform: none;
    font-size: 12px;
    font-weight: 400;
    color: #5D4037;
    line-height: 1.5;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .confirmation-footer { flex-direction: column; }
    .order-confirmation-modal { max-height: 95vh; }
    .confirmation-header { padding: 24px 16px; }
    .confirmation-body { padding: 16px; }
}
