/* Nova Hosting – WHMCS 9 / Stripe Dynamic payment page
 * Presentation only. No payment fields, identifiers or gateway logic are changed.
 */

#frmPayment {
    --nh-pay-navy: #073b49;
    --nh-pay-teal: #087b73;
    --nh-pay-orange: #f5a623;
    --nh-pay-text: #24313a;
    --nh-pay-muted: #697984;
    --nh-pay-border: #e2e8eb;
    --nh-pay-soft: #f6f8f9;
    --nh-pay-shadow: 0 14px 38px rgba(7, 59, 73, .09);
    max-width: 1240px;
    margin: 18px auto 48px;
    color: var(--nh-pay-text);
}

#frmPayment > .row {
    margin-right: -14px;
    margin-left: -14px;
    align-items: flex-start;
}

#frmPayment > .row > [class*="col-"] {
    padding-right: 14px;
    padding-left: 14px;
}

#frmPayment > .row > .col-md-7 {
    flex: 0 0 calc(100% - 390px);
    max-width: calc(100% - 390px);
}

#frmPayment > .row > .col-md-5 {
    flex: 0 0 390px;
    max-width: 390px;
}

#frmPayment .card {
    border: 1px solid var(--nh-pay-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--nh-pay-shadow);
    overflow: hidden;
}

#frmPayment > .row > .col-md-7 > .card > .card-body {
    padding: 30px 32px 32px;
}

#frmPayment .card-title {
    margin: 0 0 26px;
    color: var(--nh-pay-navy);
    font-size: 1.55rem;
    font-weight: 750;
    line-height: 1.25;
}

#frmPayment .gateway-errors {
    margin-bottom: 18px;
    border: 0;
    border-radius: 10px;
}

/* Payment method selector */
#frmPayment #paymentGatewayInput > .cc-payment-form > .form-group.row:first-child {
    display: block;
    margin: 0 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nh-pay-border);
}

#frmPayment #paymentGatewayInput > .cc-payment-form > .form-group.row:first-child > label,
#frmPayment #paymentGatewayInput > .cc-payment-form > .form-group.row:first-child > div {
    width: 100%;
    max-width: none;
    flex: 0 0 100%;
    padding: 0;
    text-align: left !important;
}

#frmPayment #paymentGatewayInput > .cc-payment-form > .form-group.row:first-child > label {
    margin-bottom: 11px;
    color: var(--nh-pay-navy);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

#frmPayment .three-column-grid {
    display: grid;
    grid-template-columns: 28px 34px minmax(120px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 12px 15px;
    border: 1px solid #cfdadd;
    border-radius: 11px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

#frmPayment .three-column-grid:hover {
    border-color: var(--nh-pay-teal);
    box-shadow: 0 0 0 3px rgba(8, 123, 115, .08);
}

#frmPayment .three-column-grid .paymethod-info {
    min-width: 0;
}

#frmPayment .three-column-grid .paymethod-info label {
    margin: 0;
    color: var(--nh-pay-text);
    cursor: pointer;
}

#frmPayment .three-column-grid .paymethod-info .fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1434cb;
    font-size: 1.8rem;
    line-height: 1;
}

#frmPayment .three-column-grid .paymethod-info .fa-cc-mastercard {
    color: #eb001b;
}

#frmPayment .three-column-grid .paymethod-info .fa-cc-amex {
    color: #006fcf;
}

#frmPayment .three-column-grid .paymethod-info .fa-cc-discover {
    color: #f68121;
}

#frmPayment .cc-payment-form > .form-group.row:first-child .col-sm-8 > .paymethod-info {
    margin-top: 10px;
    padding: 13px 15px;
    border: 1px solid var(--nh-pay-border);
    border-radius: 11px;
    background: var(--nh-pay-soft);
}

#frmPayment .cc-payment-form > .form-group.row:first-child .col-sm-8 > .paymethod-info label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 650;
}

#frmPayment .iradio_square-blue {
    flex: 0 0 auto;
}

/* Stripe Payment Element wrapper. Inner secure fields stay controlled by Stripe. */
#frmPayment #stripeDynamicElements {
    margin: 0 0 24px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#frmPayment #payment-element,
#frmPayment #payment-element.StripeElement,
#frmPayment #stripeDynamicElements iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Billing selection */
#frmPayment #billingAddressChoice {
    display: block;
    margin: 24px 0 0 !important;
    padding: 22px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--nh-pay-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#frmPayment #billingAddressChoice > label,
#frmPayment #billingAddressChoice > div {
    width: 100%;
    max-width: none;
    flex: 0 0 100%;
    padding: 0;
    text-align: left !important;
}

#frmPayment #billingAddressChoice > label {
    margin-bottom: 11px;
    color: var(--nh-pay-navy);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

#frmPayment #billingAddressChoice .col-sm-8 > label {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 9px;
    line-height: 1.55;
    cursor: pointer;
}

#frmPayment #billingAddressChoice .col-sm-8 > br {
    display: block;
}

/* New billing address; WHMCS still controls visibility and validation. */
#frmPayment #newBillingAddress {
    margin: 20px 0 4px;
    padding: 22px 22px 6px;
    border: 1px solid var(--nh-pay-border);
    border-radius: 13px;
    background: #fbfcfc;
}

#frmPayment #newBillingAddress .cc-billing-address {
    margin-right: 0;
    margin-left: 0;
}

#frmPayment #newBillingAddress .cc-billing-address > label {
    flex: 0 0 31%;
    max-width: 31%;
    padding-left: 0;
    color: #44545e;
    font-weight: 650;
}

#frmPayment #newBillingAddress .cc-billing-address > div {
    flex: 0 0 69%;
    max-width: 69%;
    padding-right: 0;
}

#frmPayment .form-control,
#frmPayment .custom-select {
    min-height: 46px;
    border: 1px solid #cfd9dd;
    border-radius: 9px;
    background-color: #fff;
}

#frmPayment .form-control:focus,
#frmPayment .custom-select:focus {
    border-color: var(--nh-pay-teal) !important;
    box-shadow: 0 0 0 3px rgba(8, 123, 115, .11) !important;
}

#frmPayment .intl-tel-input {
    width: 100%;
}

#frmPayment #inputDescriptionContainer {
    display: block !important;
    margin: 20px 0 0 !important;
    padding: 20px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--nh-pay-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

#frmPayment #inputDescriptionContainer > label,
#frmPayment #inputDescriptionContainer > div {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding-right: 0;
    padding-left: 0;
    text-align: left !important;
}

#frmPayment #inputDescriptionContainer > label {
    display: block;
    margin-bottom: 8px;
    color: var(--nh-pay-navy);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

#frmPayment #inputDescription {
    width: 100%;
}

#frmPayment #btnSubmitContainer {
    margin: 24px 0 0;
}

#frmPayment #btnSubmit {
    width: 100%;
    min-height: 54px;
    padding: 13px 24px;
    border: 0 !important;
    border-radius: 10px;
    background: var(--nh-pay-orange) !important;
    color: #fff !important;
    box-shadow: 0 9px 20px rgba(245, 166, 35, .22);
    font-size: 1rem;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

#frmPayment #btnSubmit:hover,
#frmPayment #btnSubmit:focus {
    background: #e99712 !important;
    box-shadow: 0 11px 24px rgba(233, 151, 18, .28);
    transform: translateY(-1px);
}

#frmPayment #btnSubmit:disabled {
    opacity: .65;
    transform: none;
}

/* Invoice summary */
#frmPayment #invoiceIdSummary {
    position: sticky;
    top: 22px;
}

#frmPayment #invoiceIdSummary .card-body {
    padding: 25px;
}

#frmPayment #invoiceIdSummary h2 {
    margin: 0 0 20px;
    color: var(--nh-pay-navy);
    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1.3;
}

#frmPayment .invoice-summary-table {
    overflow: hidden;
    border: 1px solid var(--nh-pay-border);
    border-radius: 10px;
}

#frmPayment .invoice-summary-table .table {
    margin: 0;
}

#frmPayment .invoice-summary-table td {
    padding: 11px 12px;
    border-color: #e9edef;
    vertical-align: middle;
}

#frmPayment .invoice-summary-table tr:first-child td {
    background: var(--nh-pay-soft);
    color: #42535d;
    font-size: .82rem;
}

#frmPayment .invoice-summary-table .total-row {
    background: #fbfcfc;
    font-weight: 650;
}

#frmPayment #invoiceIdSummary .alert-success {
    border: 0;
    border-radius: 9px;
    background: #e4f4ec;
    color: #17643f;
}

#frmPayment > .alert-warning {
    margin-top: 22px;
    padding: 15px 18px;
    border: 1px solid #dce8e5;
    border-radius: 11px;
    background: #f1f7f5;
    color: #49615b;
    font-size: .9rem;
}

#frmPayment > .alert-warning .fa-lock {
    color: var(--nh-pay-teal);
}

@media (max-width: 991.98px) {
    #frmPayment {
        margin-top: 10px;
    }

    #frmPayment > .row > .col-md-7,
    #frmPayment > .row > .col-md-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #frmPayment > .row > .col-md-5 {
        margin-top: 22px;
    }

    #frmPayment #invoiceIdSummary {
        position: static;
    }
}

@media (max-width: 575.98px) {
    #frmPayment {
        margin-bottom: 28px;
    }

    #frmPayment > .row {
        margin-right: -8px;
        margin-left: -8px;
    }

    #frmPayment > .row > [class*="col-"] {
        padding-right: 8px;
        padding-left: 8px;
    }

    #frmPayment > .row > .col-md-7 > .card > .card-body,
    #frmPayment #invoiceIdSummary .card-body {
        padding: 21px 18px;
    }

    #frmPayment .card {
        border-radius: 12px;
    }

    #frmPayment .three-column-grid {
        grid-template-columns: 28px 30px minmax(0, 1fr) auto;
        gap: 8px;
    }

    #frmPayment .three-column-grid .paymethod-info:nth-child(4) {
        display: none;
    }

    #frmPayment .three-column-grid .paymethod-info:nth-child(5) {
        grid-column: 3 / 5;
        color: var(--nh-pay-muted);
        font-size: .84rem;
    }

    #frmPayment #stripeDynamicElements {
        padding: 0 !important;
        border-radius: 0 !important;
    }

    #frmPayment #newBillingAddress {
        padding: 18px 16px 4px;
    }

    #frmPayment #newBillingAddress .cc-billing-address > label,
    #frmPayment #newBillingAddress .cc-billing-address > div,
    #frmPayment #inputDescriptionContainer > label,
    #frmPayment #inputDescriptionContainer > div {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
        text-align: left !important;
    }

    #frmPayment #newBillingAddress .cc-billing-address > label,
    #frmPayment #inputDescriptionContainer > label {
        margin-bottom: 7px;
    }

    #frmPayment #inputDescriptionContainer {
        margin-right: 0;
        margin-left: 0;
    }

    #frmPayment #billingAddressChoice {
        padding-top: 18px !important;
    }
}

@media print {
    #frmPayment #btnSubmitContainer,
    #frmPayment > .alert-warning {
        display: none !important;
    }
}
