/* ============================================
   Portal Payment Forms - 2-Column Layout
   ============================================ */

/* Payment Form Container */
.portal-payment-form {
    max-width: 700px;
    margin: 0;
}

/* 2-Column Layout */
.payment-form-columns {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.payment-form-left {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
}

.payment-form-right {
    flex: 0 0 220px;
}

/* Form Field Groups */
.payment-field-group {
    margin-bottom: 15px;
}

.payment-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
}

/* Inline Fields Row (Expiration + CVV) */
.payment-fields-inline {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.payment-fields-inline .payment-field-group {
    margin-bottom: 0;
}

/* ============================================
   Shared Input Styling (Braintree + eWay)
   ============================================ */
.braintree-hosted-field,
.portal-payment-form input[type="text"],
.portal-payment-form select {
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.braintree-hosted-field:focus-within,
.portal-payment-form input[type="text"]:focus,
.portal-payment-form select:focus {
    border-color: #000;
    outline: none;
}

/* Validation states - text color only */
.braintree-hosted-fields-invalid {
    color: #e41c18;
}

.braintree-hosted-fields-valid {
    color: #333;
}

/* Field Widths */
.field-card-name,
.field-card-number {
    width: 100%;
}

.field-expiration {
    width: 120px;
}

.field-cvv {
    width: 80px;
}

/* eWay dropdown adjustments */
.field-exp-month,
.field-exp-year {
    width: 90px;
}

.field-ccv {
    width: 70px;
}

/* ============================================
   Card Icons - Own row below fields
   ============================================ */
.payment-card-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
}

.payment-card-icons img {
    opacity: 0.4;
    width: 32px;
    height: auto;
    transition: opacity 0.2s ease;
}

.payment-card-icons img.active {
    opacity: 1;
}

/* ============================================
   Payment Summary Section (Right Column)
   ============================================ */
.payment-summary {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.payment-summary-row:last-child {
    margin-bottom: 0;
}

.payment-summary-label {
    font-weight: 600;
    color: #333;
}

.payment-summary-value {
    color: #000;
}

.payment-summary-total {
    font-size: 16px;
    font-weight: 700;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 10px;
}

.payment-summary-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* ============================================
   Submit Button & Security Badge
   ============================================ */
.payment-actions {
    margin-top: 20px;
}

.payment-actions #payment-pay {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

.payment-security-badge {
    margin-top: 15px;
    text-align: center;
}

.payment-security-badge img {
    height: 40px;
    width: auto;
}

#please-wait-message {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#please-wait-message img {
    width: 20px;
    height: 20px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 600px) {
    .payment-form-columns {
        flex-direction: column;
        gap: 20px;
    }

    .payment-form-left,
    .payment-form-right {
        flex: none;
        width: 100%;
        max-width: none;
    }

    .payment-fields-inline {
        flex-wrap: wrap;
    }

    .field-expiration,
    .field-exp-month,
    .field-exp-year {
        flex: 1;
        min-width: 80px;
    }

    .payment-card-icons img {
        width: 28px;
    }

    .payment-actions #payment-pay {
        width: auto;
        min-width: 140px;
    }
}
