﻿/* =========================================================
   VillaDenti
   Subscription + Stripe Success
   Shared stylesheet
========================================================= */


/* =========================================================
   SHARED PAGE / BACKGROUND
========================================================= */

.sub-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 10% 5%, rgba(99,102,241,.10), transparent 32%), radial-gradient(circle at 90% 15%, rgba(14,165,233,.08), transparent 28%), var(--vd-page-bg);
}

.sub-container {
    position: relative;
    z-index: 2;
    padding-top: 64px !important;
    padding-bottom: 64px !important;
}

.sub-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(90px);
    pointer-events: none;
    opacity: .45;
}

.sub-glow-one {
    width: 420px;
    height: 420px;
    top: -160px;
    left: -140px;
    background: rgba(99,102,241,.15);
}

.sub-glow-two {
    width: 420px;
    height: 420px;
    right: -180px;
    top: 180px;
    background: rgba(14,165,233,.10);
}


/* =========================================================
   SHARED HERO
========================================================= */

.sub-hero {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.sub-brand-badge {
    width: fit-content;
    margin: 0 auto 18px;
    padding: 7px 13px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--vd-border-soft);
    background: var(--vd-surface);
    color: var(--vd-text-soft);
    font-size: .82rem;
    font-weight: 700;
}

.sub-brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 14px rgba(99,102,241,.8);
}

.sub-title {
    color: var(--vd-text);
    font-weight: 850 !important;
    letter-spacing: -.04em !important;
    line-height: 1.1 !important;
}

.sub-subtitle {
    max-width: 680px;
    margin: 18px auto 0 !important;
    color: var(--vd-text-soft) !important;
    font-weight: 400 !important;
    line-height: 1.7 !important;
}

.sub-clinic {
    width: fit-content;
    margin: 22px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--vd-surface-2);
    border: 1px solid var(--vd-border-soft);
    color: var(--vd-text-soft);
    font-size: .9rem;
    font-weight: 600;
}


/* =========================================================
   SUBSCRIPTION - PLAN SWITCHER
========================================================= */

.sub-plan-switch {
    width: min(100%, 560px);
    margin: 0 auto 32px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--vd-surface-2) 88%, transparent);
    border: 1px solid var(--vd-border-soft);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 50px rgba(0,0,0,.08);
    backdrop-filter: blur(18px);
}

.sub-plan-switch-option {
    min-width: 0;
    min-height: 64px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--vd-text-soft);
    font: inherit;
    cursor: pointer;
    transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}

    .sub-plan-switch-option:hover {
        color: var(--vd-text);
    }

    .sub-plan-switch-option:active {
        transform: scale(.98);
    }

.sub-plan-switch-active {
    color: var(--vd-text);
    background: var(--vd-surface);
    box-shadow: 0 10px 30px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.05);
}

.sub-plan-switch-name {
    font-size: .88rem;
    font-weight: 750;
}

.sub-plan-switch-option strong {
    color: inherit;
    font-size: 1.05rem;
    font-weight: 850;
    direction: ltr;
    unicode-bidi: isolate;
}


/* =========================================================
   SUBSCRIPTION - PLAN CARD
========================================================= */

.sub-single-plan {
    width: min(100%, 620px);
    margin: 0 auto;
}

.sub-plan-card-dynamic {
    width: 100%;
    min-height: 540px;
    animation: sub-plan-enter .28s ease;
}

@keyframes sub-plan-enter {
    from {
        opacity: .78;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-plan-card {
    height: 100%;
    position: relative;
    padding: 32px;
    overflow: visible;
    border-radius: 22px;
    border: 1px solid var(--vd-border);
    background: linear-gradient( 155deg, color-mix(in srgb, var(--vd-surface) 96%, transparent), color-mix(in srgb, var(--vd-surface-2) 85%, transparent) );
    transition: transform .20s ease, border-color .20s ease, box-shadow .20s ease;
}

    .sub-plan-card:hover {
        transform: translateY(-4px);
        border-color: color-mix(in srgb, #6366f1 45%, var(--vd-border));
        box-shadow: 0 22px 55px rgba(0,0,0,.12);
    }

.sub-plan-card-featured {
    border-color: color-mix(in srgb, #6366f1 55%, var(--vd-border));
    box-shadow: 0 18px 45px rgba(99,102,241,.10);
}

.sub-plan-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.sub-plan-name {
    color: var(--vd-text);
    font-weight: 800 !important;
}

.sub-plan-description {
    max-width: 320px;
    margin-top: 6px !important;
    color: var(--vd-text-soft) !important;
    line-height: 1.6 !important;
}

.sub-plan-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(99,102,241,.10);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,.18);
}

.sub-plan-icon-yearly {
    background: rgba(14,165,233,.09);
    border-color: rgba(14,165,233,.16);
    color: #38bdf8;
}

.sub-renewal-note {
    display: block;
    margin-top: -4px !important;
    color: var(--vd-text-soft) !important;
    line-height: 1.5 !important;
    opacity: .82;
}


/* =========================================================
   SUBSCRIPTION - PRICE
========================================================= */

.sub-price-row {
    display: flex;
    align-items: baseline;
}

.sub-currency {
    margin-right: 3px;
    color: var(--vd-text-soft);
    font-size: 1.25rem;
    font-weight: 700;
}

.sub-price {
    color: var(--vd-text);
    font-size: 3.35rem;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.05em;
}

.sub-price-period {
    margin-left: 7px;
    color: var(--vd-text-soft);
    font-size: .95rem;
}

.sub-divider {
    height: 1px;
    background: var(--vd-border-soft);
}


/* =========================================================
   SUBSCRIPTION - FEATURES
========================================================= */

.sub-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--vd-text-soft);
    font-size: .94rem;
}

.sub-feature-icon {
    color: #22c55e !important;
    font-size: 20px !important;
}


/* =========================================================
   SHARED PRIMARY PLAN BUTTON
========================================================= */

.sub-plan-button {
    min-height: 52px;
    margin-top: 4px !important;
    border-radius: 12px !important;
    background: #4f46e5 !important;
    color: white !important;
    font-weight: 800 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

    .sub-plan-button:hover {
        background: #4338ca !important;
    }

.sub-plan-button-yearly {
    background: #2563eb !important;
}

    .sub-plan-button-yearly:hover {
        background: #1d4ed8 !important;
    }


/* =========================================================
   SUBSCRIPTION - POPULAR BADGE
========================================================= */

.sub-popular-badge {
    position: absolute;
    top: -13px;
    right: 24px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #4f46e5;
    color: white;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .02em;
}


/* =========================================================
   SUBSCRIPTION - TEAM MEMBER
========================================================= */

.sub-member-card {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 36px 28px;
    border-radius: 22px;
    border: 1px solid var(--vd-border);
    background: var(--vd-surface);
    text-align: center;
}

.sub-member-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(99,102,241,.10);
    color: #818cf8;
}

.sub-member-title {
    color: var(--vd-text);
    font-weight: 800 !important;
}

.sub-member-text {
    max-width: 560px;
    color: var(--vd-text-soft) !important;
    text-align: center;
    line-height: 1.65 !important;
}


/* =========================================================
   SUBSCRIPTION - RESTORE
========================================================= */

.sub-restore-card {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 22px;
    border-radius: 18px;
    background: var(--vd-surface);
    border: 1px solid var(--vd-border-soft);
}

.sub-restore-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sub-restore-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sub-restore-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--vd-surface-2);
    color: var(--vd-text-accent);
}

.sub-restore-title {
    color: var(--vd-text);
    font-weight: 750 !important;
}

.sub-restore-text {
    max-width: 590px;
    margin-top: 3px !important;
    color: var(--vd-text-soft) !important;
    line-height: 1.55 !important;
}

.sub-restore-button {
    flex-shrink: 0;
    min-height: 44px;
    border-radius: 11px !important;
    text-transform: none !important;
    font-weight: 750 !important;
}


/* =========================================================
   SHARED TRUST
========================================================= */

.sub-trust-card {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    border-radius: 18px;
    background: var(--vd-surface);
    border: 1px solid var(--vd-border-soft);
}

.sub-trust-item {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.sub-trust-icon {
    color: var(--vd-text-accent) !important;
    margin-top: 2px;
}

.sub-trust-title {
    color: var(--vd-text);
    font-weight: 750 !important;
}

.sub-trust-text {
    display: block;
    margin-top: 3px !important;
    color: var(--vd-text-soft) !important;
    line-height: 1.5 !important;
}


/* =========================================================
   SHARED STRIPE BADGE
========================================================= */

.sub-stripe-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--vd-border-soft);
}

    .sub-stripe-badge a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: .82;
        transition: opacity .2s ease, transform .2s ease;
    }

        .sub-stripe-badge a:hover {
            opacity: 1;
            transform: translateY(-1px);
        }

.sub-stripe-badge-image {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   SUBSCRIPTION - ALERT / FOOTER / LOADING
========================================================= */

.sub-alert {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px !important;
}

.sub-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--vd-text-soft);
}

.sub-footer-separator {
    opacity: .45;
}

.sub-support-link {
    color: var(--vd-text-accent);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
}

    .sub-support-link:hover {
        text-decoration: underline;
    }

.sub-loading {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    color: var(--vd-text-soft);
}


/* =========================================================
   STRIPE SUCCESS - STATUS CARD
========================================================= */

.stripe-status-wrap {
    width: min(100%, 620px);
    margin: 0 auto;
}

.stripe-status-card {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 38px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    border-radius: 22px !important;
    border: 1px solid color-mix(in srgb, #6366f1 55%, var(--vd-border)) !important;
    background: linear-gradient( 155deg, color-mix(in srgb, var(--vd-surface) 96%, transparent), color-mix(in srgb, var(--vd-surface-2) 85%, transparent) ) !important;
    box-shadow: 0 18px 45px rgba(99,102,241,.10);
    animation: stripe-card-enter .28s ease;
}

    .stripe-status-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 1px;
        background: linear-gradient( 90deg, transparent, rgba(129,140,248,.55), transparent );
        pointer-events: none;
    }

@keyframes stripe-card-enter {
    from {
        opacity: .78;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   STRIPE SUCCESS - STATUS ICON
========================================================= */

.stripe-status-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 4px;
}

.stripe-status-icon-processing {
    background: rgba(99,102,241,.10);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,.18);
    box-shadow: 0 12px 32px rgba(99,102,241,.10);
}

.stripe-status-progress {
    color: #818cf8 !important;
}

    .stripe-status-progress circle {
        stroke: #818cf8 !important;
    }

.stripe-status-icon-error {
    background: var(--vd-danger-bg);
    color: var(--vd-danger-text);
    border: 1px solid var(--vd-danger-border);
    box-shadow: 0 12px 32px rgba(220,38,38,.08);
}


/* =========================================================
   STRIPE SUCCESS - STATUS TEXT
========================================================= */

.stripe-status-title {
    color: var(--vd-text) !important;
    font-weight: 800 !important;
}

.stripe-status-text {
    max-width: 480px;
    color: var(--vd-text-soft) !important;
    line-height: 1.65 !important;
}

.stripe-status-help {
    max-width: 470px;
    color: var(--vd-text-soft) !important;
    line-height: 1.6 !important;
}

.stripe-status-note {
    display: block;
    margin-top: 4px !important;
    color: var(--vd-text-soft) !important;
    opacity: .75;
    line-height: 1.5 !important;
}

.stripe-status-card .sub-divider {
    width: 100%;
    margin: 4px 0;
}


/* =========================================================
   STRIPE SUCCESS - PROCESSING DETAILS
========================================================= */

.stripe-status-detail {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--vd-surface-2);
    border: 1px solid var(--vd-border-soft);
    color: var(--vd-text-soft);
    text-align: left;
    font-size: .9rem;
    font-weight: 600;
}

.stripe-status-detail-icon {
    color: #818cf8 !important;
    flex-shrink: 0;
}


/* =========================================================
   STRIPE SUCCESS - ACTIONS
========================================================= */

.stripe-success-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.stripe-retry-button {
    min-width: 150px;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.stripe-success-actions .sub-restore-button {
    min-height: 52px;
    padding-left: 22px !important;
    padding-right: 22px !important;
    border-radius: 12px !important;
    color: var(--vd-text) !important;
    border-color: var(--vd-border) !important;
}

    .stripe-success-actions .sub-restore-button:hover {
        border-color: color-mix(in srgb, #6366f1 55%, var(--vd-border)) !important;
        background: color-mix(in srgb, #6366f1 6%, transparent) !important;
    }

.stripe-trust-card {
    margin-top: 4px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .sub-container {
        padding-top: 38px !important;
        padding-bottom: 38px !important;
    }

    .sub-title {
        font-size: 2.15rem !important;
    }

    .sub-subtitle {
        font-size: 1rem !important;
    }

    .sub-plan-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .sub-price {
        font-size: 2.8rem;
    }

    .sub-restore-content {
        flex-direction: column;
        align-items: stretch;
    }

    .sub-restore-button {
        width: 100%;
    }

    .sub-footer {
        flex-direction: column;
    }

    .sub-footer-separator {
        display: none;
    }

    .sub-trial-note {
        max-width: 620px;
        margin: 16px auto 0 !important;
        color: var(--vd-text-soft) !important;
        font-weight: 600 !important;
        line-height: 1.6 !important;
    }

    .sub-pricing-note {
        display: block;
        max-width: 940px;
        margin: -8px auto 0 !important;
        text-align: center;
        color: var(--vd-text-soft) !important;
        line-height: 1.5 !important;
    }

    .sub-plan-switch {
        margin-bottom: 26px;
        padding: 6px;
    }

    .sub-plan-switch-option {
        min-height: 58px;
        padding: 8px 10px;
        flex-direction: column;
        gap: 1px;
    }

    .sub-plan-switch-name {
        font-size: .78rem;
    }

    .sub-plan-switch-option strong {
        font-size: .92rem;
    }

    .sub-single-plan {
        width: 100%;
    }

    .sub-plan-card-dynamic {
        min-height: 0;
    }

    .stripe-status-card {
        padding: 30px 20px;
        border-radius: 18px !important;
    }

    .stripe-status-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .stripe-success-actions {
        flex-direction: column;
    }

        .stripe-success-actions .mud-button-root {
            width: 100%;
        }

    .sub-trust-item {
        padding: 4px 0;
    }
}


/*
           IMPORTANT:
           The shared Subscription design comes from:
           css/subscription-stripe.css

           Everything below is ONLY specific to
           /subscription/manage
        */


/* =========================================================
           CONTAINER
        ========================================================= */

.manage-sub-container {
    max-width: 900px !important;
}


.manage-sub-hero {
    margin-bottom: 4px;
}


/* =========================================================
           REFRESH TOOLBAR
        ========================================================= */

.manage-sub-toolbar {
    display: flex;
    justify-content: flex-end;
    width: min(100%, 700px);
    margin: -10px auto 0;
}


.manage-sub-refresh {
    min-width: 150px;
}


/* =========================================================
           MAIN CARD
        ========================================================= */

.manage-sub-main-wrap {
    width: min(100%, 700px);
    margin: 0 auto;
}


.manage-sub-card {
    width: 100%;
    height: auto;
    padding: 32px;
    overflow: hidden;
}


/* =========================================================
           CARD HEADER
        ========================================================= */

.manage-sub-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}


.manage-sub-provider-icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
}


.manage-sub-card-heading {
    flex: 1;
    min-width: 0;
}


.manage-sub-provider-name {
    margin-top: 4px !important;
}


/* =========================================================
           STATUS
        ========================================================= */

.manage-sub-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}


.manage-sub-status-active {
    color: #22c55e;
    background: rgba(34,197,94,.10);
    border: 1px solid rgba(34,197,94,.20);
}


.manage-sub-status-trial {
    color: #60a5fa;
    background: rgba(37,99,235,.10);
    border: 1px solid rgba(37,99,235,.20);
}


.manage-sub-status-ending {
    color: #f59e0b;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(245,158,11,.20);
}


.manage-sub-status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}


/* =========================================================
           DETAILS
        ========================================================= */

.manage-sub-detail {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border-radius: 14px;
    background: var(--vd-surface);
    border: 1px solid var(--vd-border-soft);
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}


    .manage-sub-detail:hover {
        transform: translateY(-1px);
        border-color: color-mix( in srgb, #6366f1 30%, var(--vd-border) );
    }


.manage-sub-detail-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 11px;
    color: #818cf8;
    background: rgba(99,102,241,.09);
    border: 1px solid rgba(99,102,241,.14);
}


.manage-sub-detail-label {
    color: var(--vd-text-soft) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .055em;
}


.manage-sub-detail-value {
    margin-top: 4px !important;
    color: var(--vd-text) !important;
    font-weight: 750 !important;
}


/* =========================================================
           ALERT
        ========================================================= */

.manage-sub-alert {
    border-radius: 13px !important;
}


/* =========================================================
           ACTIONS
        ========================================================= */

.manage-sub-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


.manage-sub-primary-button,
.manage-sub-secondary-button {
    flex: 1 1 220px;
}


.manage-sub-primary-button {
    margin-top: 0 !important;
}


.manage-sub-secondary-button {
    min-height: 52px;
}


/* =========================================================
           INFO
        ========================================================= */

.manage-sub-info-card {
    max-width: 700px;
    padding: 22px;
}


.manage-sub-info-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}


    .manage-sub-info-content
    .sub-restore-text + .sub-restore-text {
        margin-top: 8px !important;
    }


/* =========================================================
           TRUST
        ========================================================= */

.manage-sub-trust {
    max-width: 700px;
}


/* =========================================================
           MOBILE
        ========================================================= */

@@media (max-width: 600px) {

    .manage-sub-toolbar {
        width: 100%;
    }


    .manage-sub-refresh {
        width: 100%;
    }


    .manage-sub-card {
        padding: 24px 20px;
    }


    .manage-sub-card-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }


    .manage-sub-card-heading {
        flex: 1 1 150px;
    }


    .manage-sub-status {
        margin-left: 72px;
    }


    .manage-sub-actions {
        flex-direction: column;
    }


    .manage-sub-primary-button,
    .manage-sub-secondary-button {
        width: 100%;
        flex: none;
    }


    .manage-sub-info-content {
        align-items: flex-start;
    }
}
