/* ============================================================================
   CHECKOUT MODAL - FULL SCREEN
   ============================================================================ */

.beetle-checkout-modal {
    z-index: 100000;
}

.beetle-checkout-modal .beetle-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.beetle-checkout-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 100001;
    overflow-y: auto;
    padding: 60px 20px 20px;
}

.beetle-checkout-modal .beetle-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 30px;
    line-height: 40px;
    z-index: 100002;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.beetle-checkout-modal .beetle-modal-close:hover {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
    transform: rotate(90deg);
}


/* ============================================================================
   CHECKOUT CONTAINER - CENTERED
   ============================================================================ */

.beetle-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.beetle-checkout-container h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}


/* ============================================================================
   FORM AND SUMMARY - TWO COLUMNS
   ============================================================================ */

.beetle-checkout-form-and-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .beetle-checkout-form-and-summary {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* ============================================================================
   CUSTOMER INFO FORM - LEFT SIDE
   ============================================================================ */

.beetle-checkout-customer-info {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.beetle-form-group {
    margin-bottom: 8px;
}

.beetle-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.beetle-form-input,
.beetle-form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.beetle-form-input:focus,
.beetle-form-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.beetle-form-input.beetle-form-invalid,
.beetle-form-select.beetle-form-invalid {
    border-color: #f44336;
}

.beetle-form-error {
    display: block;
    color: #f44336;
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.3;
}

.beetle-form-select {
    cursor: pointer;
    background: #fff;
}

.beetle-invoice-notice {
    display: none; /* Hidden - phone field label already shows requirement */
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 20px;
}

#beetle-phone-required {
    color: #f44336;
    font-weight: bold;
}


/* ============================================================================
   ORDER SUMMARY - RIGHT SIDE
   ============================================================================ */

.beetle-checkout-summary {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.beetle-checkout-totals {
    margin-bottom: 25px;
}

.beetle-checkout-total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

.beetle-checkout-total-row:last-of-type {
    border-bottom: none;
}

.beetle-checkout-grand-total {
    font-size: 22px;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #333;
}

.beetle-checkout-shipping-note {
    font-size: 12px;
    color: #666;
    margin: 10px 0;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
}

.beetle-checkout-tax-note {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 10px;
    font-style: italic;
}

#beetle-confirm-payment-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}


/* ============================================================================
   CHECKOUT ITEMS - COMPACT ONE-LINERS
   ============================================================================ */

.beetle-checkout-items {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 40px;
}

#beetle-checkout-items-list {
    max-height: none;
    overflow-y: visible;
}

.beetle-checkout-item-row {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.beetle-checkout-item-row:last-child {
    border-bottom: none;
}

.beetle-checkout-item-title {
    font-weight: 600;
    color: #333;
}

.beetle-checkout-item-qty {
    color: #666;
    font-size: 14px;
}

.beetle-checkout-item-unit-price {
    color: #888;
    font-size: 13px;
}

.beetle-checkout-item-price {
    margin-left: auto;
    font-weight: 700;
    color: #4CAF50;
    font-size: 16px;
}

.beetle-checkout-discount-badge {
    background: #4CAF50;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.beetle-checkout-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.beetle-checkout-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-style: italic;
}


/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .beetle-checkout-content {
        padding: 80px 15px 15px;
    }
    
    .beetle-checkout-container {
        padding: 10px;
    }
    
    .beetle-checkout-customer-info,
    .beetle-checkout-summary,
    .beetle-checkout-items {
        padding: 20px;
    }
    
    .beetle-checkout-item-row {
        font-size: 14px;
    }
    
    .beetle-checkout-item-price {
        font-size: 15px;
    }
    
    .beetle-checkout-grand-total {
        font-size: 18px;
    }
}


/* ============================================================================
   BUTTON STATES
   ============================================================================ */

.beetle-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.beetle-btn-primary {
    background: #4CAF50;
    color: #fff;
}

.beetle-btn-primary:hover:not(.beetle-btn-disabled) {
    background: #45a049;
}

.beetle-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
}