/* Stentorian Universal Payment Center V2 */

.st-payment-v2 {
    --st-navy: #0B3A4A;
    --st-teal: #1F7A8C;
    --st-aqua: #2FA4A9;
    --st-green: #6CC24A;
    --st-orange: #F39C3D;
    --st-white: #F4F6F7;
    --st-ink: #102A33;
    --st-muted: #60747C;
    --st-border: rgba(11,58,74,.11);
    --st-shadow: 0 24px 70px rgba(11,58,74,.10);

    font-family: Manrope, system-ui, sans-serif;
    color: var(--st-ink);
    background:
        radial-gradient(circle at 8% 6%,
            rgba(47,164,169,.10), transparent 28%),
        radial-gradient(circle at 94% 20%,
            rgba(108,194,74,.08), transparent 25%),
        #f7fafb;
}

.st-payment-v2 *,
.st-payment-v2 *::before,
.st-payment-v2 *::after {
    box-sizing: border-box;
}

.st-payment-v2 .stp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 112px 0 86px;
    background:
        radial-gradient(circle at 84% 24%,
            rgba(47,164,169,.36), transparent 25%),
        radial-gradient(circle at 12% 78%,
            rgba(108,194,74,.15), transparent 24%),
        linear-gradient(135deg,
            #071f29 0%, #0B3A4A 47%, #145a68 100%);
}

.st-payment-v2 .stp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px,
            transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.06) 1px,
            transparent 1px);
    background-size: 42px 42px;
}

.st-payment-v2 .stp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    margin-bottom: 22px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #dffcff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.st-payment-v2 .stp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--st-green);
    box-shadow: 0 0 0 6px rgba(108,194,74,.13);
}

.st-payment-v2 .stp-hero h1 {
    max-width: 840px;
    margin: 0;
    color: #fff;
    font-size: clamp(36px,5.7vw,76px);
    line-height: 1.04;
    letter-spacing: -.045em;
    font-weight: 750;
}

.st-payment-v2 .stp-hero h1 span {
    color: #82dfe3;
}

.st-payment-v2 .stp-hero-copy {
    max-width: 700px;
    margin: 24px 0 0;
    color: rgba(255,255,255,.80);
    font-size: 17px;
    line-height: 1.75;
}

.st-payment-v2 .stp-workspace {
    position: relative;
    padding: 0 0 84px;
}

.st-payment-v2 .stp-card {
    padding: clamp(22px,4vw,38px);
    border: 1px solid var(--st-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--st-shadow);
}

.st-payment-v2 .stp-overlap {
    position: relative;
    margin-top: -36px;
}

.st-payment-v2 .stp-card h2,
.st-payment-v2 .stp-card h3 {
    color: var(--st-navy);
    font-weight: 750;
    letter-spacing: -.025em;
}

.st-payment-v2 .stp-card p {
    color: var(--st-muted);
    line-height: 1.75;
}

.st-payment-v2 .stp-status-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 22px;
    border-radius: 18px;
    background: #fff4e7;
    color: #9a4e0a;
    font-size: 30px;
    font-weight: 750;
}

.st-payment-v2 .stp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.st-payment-v2 .stp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 13px;
    text-decoration: none;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.st-payment-v2 .stp-btn-primary {
    background: var(--st-navy);
    color: #fff;
}

.st-payment-v2 .stp-btn-primary:hover {
    background: #145a68;
    color: #fff;
}

.st-payment-v2 .stp-btn-secondary {
    background: #fff;
    color: var(--st-navy);
    border-color: var(--st-border);
}

.st-payment-v2 .stp-btn-secondary:hover {
    background: #eef6f7;
    color: var(--st-navy);
}

.st-payment-v2 :is(a,button,input,select,textarea):focus-visible {
    outline: 3px solid var(--st-aqua);
    outline-offset: 3px;
}

.st-payment-v2 .stp-card label {
    color: var(--st-navy);
    font-weight: 700;
}

.st-payment-v2 .stp-card :is(
    input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
    select,
    textarea
) {
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid #d5e2e5;
    border-radius: 13px;
    background: #fff;
    color: var(--st-ink);
    font: inherit;
}

.st-payment-v2 .stp-notice {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--st-border);
    border-radius: 14px;
    background: #f4f8f9;
    color: var(--st-ink);
    line-height: 1.65;
}

@media (max-width: 767px) {
    .st-payment-v2 .stp-hero {
        padding: 84px 0 65px;
    }

    .st-payment-v2 .stp-hero-copy {
        font-size: 15px;
    }

    .st-payment-v2 .stp-actions {
        flex-direction: column;
    }

    .st-payment-v2 .stp-actions .stp-btn {
        width: 100%;
    }

    .st-payment-v2 .stp-workspace {
        padding-bottom: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-payment-v2 .stp-btn {
        transition: none;
    }
}

/* UPC-03B: Existing payment frontend theme */

.st-payment-v2.stp-page-success,
.st-payment-v2.stp-page-checkout,
.st-payment-v2.stp-page-history {
    min-height: 60vh;
}

.st-payment-v2 .content-inner.bg-light {
    background: transparent !important;
    padding-bottom: 84px;
}

.st-payment-v2 .content-inner .card {
    border: 1px solid var(--st-border);
    border-radius: 24px;
    box-shadow: var(--st-shadow) !important;
    background: #fff;
    overflow-wrap: anywhere;
}

.st-payment-v2 .content-inner h2,
.st-payment-v2 .content-inner h3,
.st-payment-v2 .content-inner h5 {
    font-weight: 750;
    letter-spacing: -.025em;
}

.st-payment-v2 .content-inner h3,
.st-payment-v2 .content-inner h5 {
    color: var(--st-navy);
}

.st-payment-v2 .content-inner label {
    color: var(--st-navy);
    font-weight: 700;
    margin-bottom: 8px;
}

.st-payment-v2 .content-inner .form-control {
    min-height: 52px;
    border: 1px solid #d5e2e5;
    border-radius: 13px;
    padding: 12px 15px;
    font-family: inherit;
    color: var(--st-ink);
}

.st-payment-v2 .content-inner .form-control:focus {
    border-color: var(--st-aqua);
    box-shadow: 0 0 0 4px rgba(47,164,169,.12);
}

.st-payment-v2 .content-inner .btn-primary {
    min-height: 48px;
    border-radius: 13px;
    background: var(--st-navy);
    border-color: var(--st-navy);
    font-weight: 700;
    color: #fff;
}

.st-payment-v2 .content-inner .btn-primary:hover {
    background: #145a68;
    border-color: #145a68;
}

.st-payment-v2.stp-page-history .st-pay-center {
    background: transparent;
}

.st-payment-v2.stp-page-history .st-pay-hero {
    background:
        radial-gradient(
            circle at 84% 24%,
            rgba(47,164,169,.36),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #071f29 0%,
            #0B3A4A 47%,
            #145a68 100%
        );
    border-radius: 24px;
}

.st-payment-v2.stp-page-history .st-pay-hero h1 {
    font-weight: 750;
    letter-spacing: -.035em;
}

.st-payment-v2.stp-page-history .form-control {
    min-height: 52px;
    border-radius: 13px;
    border-color: #d5e2e5;
    font-family: inherit;
}

.st-payment-v2.stp-page-history .table-responsive {
    border-radius: 14px;
}

.st-payment-v2.stp-page-success .content-inner .card {
    max-width: 880px;
    margin-inline: auto;
    padding: clamp(24px,5vw,56px) !important;
}

@media (max-width: 767px) {
    .st-payment-v2 .content-inner.bg-light {
        padding-bottom: 48px;
    }

    .st-payment-v2.stp-page-history .st-pay-hero {
        padding: 25px;
    }

    .st-payment-v2.stp-page-history .st-pay-hero h1 {
        font-size: clamp(26px,7vw,36px);
    }

    .st-payment-v2 .content-inner .card {
        border-radius: 18px;
    }
}

/* UPC-03B.2: Premium page composition */

.st-payment-v2 .stp-premium-page-hero {
    padding: 112px 0 100px;
}

.st-payment-v2 .stp-premium-content {
    position: relative;
    padding-top: 0 !important;
    padding-bottom: 84px;
    margin-top: -38px;
    background: transparent !important;
}

.st-payment-v2 .stp-premium-content .card {
    position: relative;
    padding: clamp(24px,4vw,44px) !important;
}

.st-payment-v2.stp-page-checkout
.stp-premium-content .col-lg-6,

.st-payment-v2.stp-page-retry
.stp-premium-content .col-lg-6 {
    width: 100%;
    max-width: 820px;
}

.st-payment-v2.stp-page-retry .content-inner .card {
    border: 1px solid var(--st-border) !important;
    border-radius: 24px;
}

.st-payment-v2.stp-page-history .st-pay-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.st-payment-v2.stp-page-history .st-pay-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.035) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
}

@media (max-width: 767px) {

    .st-payment-v2 .stp-premium-page-hero {
        padding: 84px 0 74px;
    }

    .st-payment-v2 .stp-premium-content {
        margin-top: -24px;
        padding-bottom: 48px;
    }

    .st-payment-v2 .stp-premium-content .card {
        padding: 24px !important;
    }
}

/* UPC-03C: Payment terms */

.st-payment-v2.stp-page-terms .section-head {
    padding: clamp(22px,4vw,44px);
    border: 1px solid var(--st-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--st-shadow);
    overflow-wrap: anywhere;
}

.st-payment-v2.stp-page-terms .section-head h2,
.st-payment-v2.stp-page-terms .section-head h3,
.st-payment-v2.stp-page-terms .section-head h5 {
    color: var(--st-navy);
    font-weight: 750;
}

.st-payment-v2.stp-page-terms .section-head p,
.st-payment-v2.stp-page-terms .section-head li {
    line-height: 1.8;
}

.st-payment-v2.stp-page-terms .stentorian-payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    margin-bottom: 20px;
}

.st-payment-v2.stp-page-terms .stentorian-payment-table td {
    padding: 16px;
    border: 1px solid #dce7e9;
    color: var(--st-ink);
    overflow-wrap: anywhere;
}

.st-payment-v2.stp-page-terms
.stentorian-payment-table td:first-child {
    width: 38%;
    background: #f0f7f8;
    color: var(--st-navy);
}

@media (max-width: 767px) {
    .st-payment-v2.stp-page-terms .section-head {
        padding: 20px;
        border-radius: 18px;
    }

    .st-payment-v2.stp-page-terms
    .stentorian-payment-table td {
        padding: 10px;
        font-size: 13px;
    }
}

/* UPC-04A: Universal Payment Center */

.st-payment-v2 .stp-universal-grid {
    display: grid;
    grid-template-columns: minmax(0,1.7fr) minmax(0,1fr);
    gap: 28px;
    align-items: start;
    margin-top: 28px;
}

.st-payment-v2 .stp-universal-sidebar {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.st-payment-v2 .stp-progress {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
    padding: 24px;
}

.st-payment-v2 .stp-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--st-muted);
    font-size: 13px;
    font-weight: 700;
}

.st-payment-v2 .stp-step span {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #edf4f5;
    color: var(--st-navy);
}

.st-payment-v2 .stp-step-current {
    color: var(--st-navy);
}

.st-payment-v2 .stp-step-current span {
    background: var(--st-navy);
    color: #fff;
}

.st-payment-v2 .stp-fields {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 22px;
    margin-top: 26px;
}

.st-payment-v2 .stp-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.st-payment-v2 .stp-field small,
.st-payment-v2 .stp-preview-note {
    color: var(--st-muted);
    font-size: 12px;
    line-height: 1.6;
}

.st-payment-v2 .stp-full {
    grid-column: 1 / -1;
}

.st-payment-v2 .stp-divider {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--st-border);
    opacity: 1;
}

.st-payment-v2 .stp-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.7;
}

.st-payment-v2 .stp-consent input {
    flex-shrink: 0;
    margin-top: 5px;
    accent-color: var(--st-teal);
}

.st-payment-v2 .stp-wide {
    width: 100%;
    margin-top: 16px;
}

.st-payment-v2 .stp-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.st-payment-v2 .stp-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--st-border);
}

.st-payment-v2 .stp-summary-total {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 24px 0;
    padding: 22px;
    border-radius: 16px;
    background: #edf6f7;
    color: var(--st-navy);
}

.st-payment-v2 .stp-summary-total strong {
    font-size: 24px;
    overflow-wrap: anywhere;
}

.st-payment-v2 .stp-preview-note {
    display: block;
    margin-top: 12px;
    text-align: center;
}

@media (max-width: 991px) {
    .st-payment-v2 .stp-universal-grid {
        grid-template-columns: minmax(0,1fr);
    }
}

@media (max-width: 767px) {
    .st-payment-v2 .stp-fields {
        grid-template-columns: minmax(0,1fr);
        gap: 18px;
    }

    .st-payment-v2 .stp-progress {
        grid-template-columns: repeat(2,minmax(0,1fr));
        padding: 18px;
    }

    .st-payment-v2 .stp-step {
        font-size: 11px;
    }

    .st-payment-v2 .stp-step span {
        width: 30px;
        height: 30px;
    }

    .st-payment-v2 .stp-universal-grid {
        gap: 20px;
    }
}

/* UPC-04B: Dynamic form behaviour */

.st-payment-v2 [hidden] {
    display: none !important;
}

.st-payment-v2 .stp-validation-status {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid var(--st-border);
    border-radius: 12px;
    background: #f4f8f9;
    color: var(--st-muted);
    font-size: 13px;
    line-height: 1.6;
}

.st-payment-v2 .stp-validation-status.stp-details-ready {
    background: #edf7f0;
    border-color: #c8e5d0;
    color: #21643b;
}

.st-payment-v2 .stp-field input:focus:invalid {
    border-color: #c05c43;
}

.st-payment-v2 .stp-summary-total strong {
    font-variant-numeric: tabular-nums;
}
