/* =============================================
   ShopAve Subscription Checkout v4
   Shared styles for free signup + paid checkout
   ============================================= */


/* ─── Layout ─────────────────────────────────────────────────────── */

.shopave-checkout-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.shopave-checkout-wrap *,
.shopave-checkout-wrap *::before,
.shopave-checkout-wrap *::after {
    box-sizing: border-box;
}


/* ─── Product header ─────────────────────────────────────────────── */

.shopave-product-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #6b3fa0;
}

.shopave-product-header h2 {
    margin: 0 0 5px !important;
    font-size: 28px !important;
    color: #6b3fa0 !important;
}

.shopave-price {
    font-size: 20px;
    color: #888;
    margin: 0;
}


/* ─── Sections ───────────────────────────────────────────────────── */

.shopave-section {
    margin-bottom: 24px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.shopave-section h3 {
    margin: 0 0 20px !important;
    padding: 0 0 12px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    border-bottom: 1px solid #ddd;
}

.shopave-section-submit {
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
}


/* ─── Fields ─────────────────────────────────────────────────────── */

.shopave-field {
    margin-bottom: 16px;
}

.shopave-field:last-child {
    margin-bottom: 0;
}

/* ─── Field Row (for side-by-side fields) ──────────────────────── */

.shopave-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.shopave-field-half {
    flex: 1;
    margin-bottom: 0;
}

/* Mobile: stack fields vertically */
@media (max-width: 600px) {
    .shopave-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .shopave-field-half {
        margin-bottom: 16px;
    }
    
    .shopave-field-half:last-child {
        margin-bottom: 0;
    }
}

.shopave-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.shopave-field label abbr.required {
    color: #e74c3c;
    text-decoration: none;
    border: none;
}

.shopave-optional {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.shopave-field input.input-text,
.shopave-field select.input-text,
.shopave-field input[type="text"],
.shopave-field input[type="email"],
.shopave-field input[type="tel"],
.shopave-field input[type="password"],
.shopave-field select {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    background: #fff !important;
    color: #333 !important;
    transition: border-color 0.2s ease;
    appearance: auto;
    -webkit-appearance: auto;
}

.shopave-field input:focus,
.shopave-field select:focus {
    outline: none !important;
    border-color: #6b3fa0 !important;
    box-shadow: 0 0 0 2px rgba(107, 63, 160, 0.15) !important;
}

.shopave-field input[readonly],
.shopave-field input:disabled {
    background: #f0f0f0 !important;
    color: #666 !important;
    cursor: not-allowed;
}

.shopave-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}


/* ─── Two-column rows ────────────────────────────────────────────── */

.shopave-row {
    display: flex;
    gap: 16px;
}

.shopave-half {
    flex: 1;
    min-width: 0;
}

@media (max-width: 520px) {
    .shopave-row {
        flex-direction: column;
        gap: 0;
    }
}


/* ─── Payment section ────────────────────────────────────────────── */

.shopave-section-payment #payment {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.shopave-section-payment .wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shopave-section-payment .wc_payment_method {
    margin-bottom: 10px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.shopave-section-payment .wc_payment_method label {
    font-weight: 500;
    cursor: pointer;
}

.shopave-section-payment .payment_box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.shopave-section-payment .payment_box fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.shopave-section-payment .payment_box .form-row {
    margin-bottom: 12px;
}

.shopave-section-payment .payment_box input,
.shopave-section-payment .payment_box select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}


/* ─── Order summary ──────────────────────────────────────────────── */

.shopave-order-summary {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.shopave-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.shopave-summary-row + .shopave-summary-row {
    border-top: 1px solid #eee;
}

.shopave-summary-total {
    font-weight: 700;
    font-size: 16px;
    border-top: 2px solid #333 !important;
    padding-top: 10px !important;
}


/* ─── Submit button ──────────────────────────────────────────────── */

.shopave-submit-btn {
    display: block !important;
    width: 100% !important;
    padding: 16px 30px !important;
    background-color: #6b3fa0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.shopave-submit-btn:hover {
    background-color: #5a2d91 !important;
}

.shopave-submit-btn:active {
    transform: scale(0.99);
}

.shopave-submit-btn:disabled,
.shopave-submit-btn.shopave-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}


/* ─── Terms / Privacy ────────────────────────────────────────────── */

.shopave-terms {
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.shopave-terms a {
    color: #6b3fa0;
}

.shopave-privacy {
    font-size: 12px;
    color: #999;
}


/* ─── Notices ────────────────────────────────────────────────────── */

.shopave-error {
    background: #fce4e4;
    border: 1px solid #e74c3c;
    padding: 12px 16px;
    border-radius: 4px;
    color: #c0392b;
}

.shopave-notice-info {
    background: #eef6ff;
    border: 1px solid #3498db;
    padding: 20px;
    border-radius: 6px;
    color: #2c3e50;
    text-align: center;
}

.shopave-notice-info a {
    color: #6b3fa0;
    font-weight: 600;
}

.shopave-notice-success {
    background: #eafaf1;
    border: 1px solid #27ae60;
    padding: 20px;
    border-radius: 6px;
    color: #1e8449;
    text-align: center;
}

/* AJAX notices container */
.shopave-notices .shopave-error {
    margin-bottom: 16px;
}

.shopave-notices .shopave-error ul {
    margin: 0;
    padding: 0 0 0 18px;
}

/* WC notices */
.shopave-checkout-wrap .woocommerce-error {
    margin-bottom: 20px;
}

/* Validation highlight */
.shopave-field-invalid input,
.shopave-field-invalid select {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15) !important;
}


/* ─── Hide WC elements we don't need ─────────────────────────────── */

.shopave-checkout-wrap .woocommerce-form-coupon-toggle,
.shopave-checkout-wrap .woocommerce-form-coupon,
.shopave-checkout-wrap .woocommerce-additional-fields,
.shopave-checkout-wrap #order_comments_field {
    display: none !important;
}
