/*
|--------------------------------------------------------------------------
| Trading Journal - Checkout
|--------------------------------------------------------------------------
*/

:root {
    --bg: #080b0a;
    --bg-soft: #0d110f;
    --panel: #101512;
    --panel-2: #141a16;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #f4f7f5;
    --muted: #98a39d;
    --muted-2: #6f7b74;

    --green: #7cff57;
    --green-dark: #5ee83b;
    --green-soft: rgba(124, 255, 87, 0.12);

    --coral: #ff785f;

    --danger: #ff6b6b;
    --danger-soft: rgba(255, 107, 107, 0.10);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;

    --shadow:
        0 24px 80px rgba(0, 0, 0, 0.35);
}


/*
|--------------------------------------------------------------------------
| RESET
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(124, 255, 87, 0.07),
            transparent 34%
        ),
        radial-gradient(
            circle at 95% 15%,
            rgba(255, 120, 95, 0.05),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}


/*
|--------------------------------------------------------------------------
| PAGE
|--------------------------------------------------------------------------
*/

.checkout-page {
    width: 100%;
    min-height: 100vh;
}


/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.checkout-header {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;

    min-height: 92px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    gap: 20px;
}

.back-link {
    justify-self: start;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    font-size: 14px;
    font-weight: 600;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.back-link:hover {
    color: var(--text);
    transform: translateX(-2px);
}

.brand {
    justify-self: center;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 0 5px rgba(124, 255, 87, 0.08),
        0 0 20px rgba(124, 255, 87, 0.35);
}

.header-spacer {
    justify-self: end;
}


/*
|--------------------------------------------------------------------------
| MAIN
|--------------------------------------------------------------------------
*/

.checkout-main {
    width: min(1080px, calc(100% - 40px));

    margin: 0 auto;

    padding:
        48px
        0
        90px;
}


/*
|--------------------------------------------------------------------------
| INTRO
|--------------------------------------------------------------------------
*/

.intro {
    max-width: 720px;

    margin-bottom: 34px;
}

.eyebrow {
    margin-bottom: 12px;

    color: var(--green);

    font-size: 12px;
    line-height: 1;
    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.intro h1 {
    margin: 0;

    font-size:
        clamp(
            34px,
            5vw,
            56px
        );

    line-height: 1.02;

    letter-spacing: -0.045em;
}

.intro p {
    max-width: 650px;

    margin:
        18px
        0
        0;

    color: var(--muted);

    font-size: 17px;
    line-height: 1.65;
}


/*
|--------------------------------------------------------------------------
| LAYOUT
|--------------------------------------------------------------------------
*/

.checkout-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.48fr)
        minmax(280px, 0.72fr);

    align-items: start;

    gap: 24px;
}


/*
|--------------------------------------------------------------------------
| PLAN CARD
|--------------------------------------------------------------------------
*/

.plan-card {
    padding: 32px;

    border: 1px solid var(--border);
    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0)
        ),
        var(--panel);

    box-shadow: var(--shadow);
}

.plan-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 24px;
}

.plan-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px;
}

.plan-title-row h2 {
    margin: 0;

    font-size: 30px;
    letter-spacing: -0.035em;
}

.plan-badge,
.trial-pill {
    display: inline-flex;
    align-items: center;

    min-height: 28px;

    padding:
        0
        10px;

    border-radius: 999px;

    font-size: 11px;
    line-height: 1;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.07em;
}

.plan-badge {
    border: 1px solid rgba(124, 255, 87, 0.25);

    background: var(--green-soft);

    color: var(--green);
}

.trial-pill {
    flex-shrink: 0;

    border: 1px solid rgba(124, 255, 87, 0.26);

    background: var(--green);

    color: #071006;
}

.plan-description {
    max-width: 560px;

    margin:
        13px
        0
        0;

    color: var(--muted);

    font-size: 15px;
    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| BILLING SWITCH
|--------------------------------------------------------------------------
*/

.billing-switch {
    margin-top: 28px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 6px;

    padding: 5px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: var(--bg-soft);
}

.billing-option {
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding:
        8px
        14px;

    border-radius: 11px;

    color: var(--muted);

    font-size: 14px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.billing-option span {
    color: var(--green);

    font-size: 11px;
}

.billing-option:hover {
    color: var(--text);
}

.billing-option.active {
    background: var(--panel-2);

    color: var(--text);

    box-shadow:
        inset 0 0 0 1px var(--border-strong);
}


/*
|--------------------------------------------------------------------------
| PRICE
|--------------------------------------------------------------------------
*/

.price-area {
    padding:
        30px
        0
        26px;

    border-bottom: 1px solid var(--border);
}

.main-price {
    display: flex;
    align-items: baseline;

    gap: 9px;
}

.main-price strong {
    font-size:
        clamp(
            40px,
            7vw,
            58px
        );

    line-height: 1;

    letter-spacing: -0.05em;
}

.main-price span {
    color: var(--muted);

    font-size: 14px;
    font-weight: 600;
}

.yearly-equivalent {
    margin-top: 11px;

    color: var(--muted);

    font-size: 13px;
}

.yearly-equivalent strong {
    color: var(--text);
}

.tax-note {
    margin-top: 14px;

    color: var(--green);

    font-size: 13px;
    font-weight: 700;
}


/*
|--------------------------------------------------------------------------
| TRIAL
|--------------------------------------------------------------------------
*/

.trial-box {
    margin-top: 24px;

    padding: 18px;

    display: flex;
    align-items: flex-start;

    gap: 14px;

    border:
        1px solid
        rgba(124, 255, 87, 0.16);

    border-radius: var(--radius-md);

    background: var(--green-soft);
}

.trial-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--green);

    color: #061005;

    font-size: 15px;
    font-weight: 900;
}

.trial-box strong {
    display: block;

    color: var(--green);

    font-size: 14px;
}

.trial-box p {
    margin:
        7px
        0
        0;

    color: #c6d3ca;

    font-size: 13px;
    line-height: 1.55;
}


/*
|--------------------------------------------------------------------------
| FEATURES
|--------------------------------------------------------------------------
*/

.features {
    padding:
        24px
        0;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px 18px;
}

.feature {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    color: #c9d2cc;

    font-size: 13px;
    line-height: 1.5;
}

.check {
    color: var(--green);

    font-weight: 900;
}


/*
|--------------------------------------------------------------------------
| BUTTON
|--------------------------------------------------------------------------
*/

.checkout-button {
    width: 100%;

    min-height: 58px;

    border: 0;
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding:
        0
        24px;

    background:
        linear-gradient(
            180deg,
            #89ff68,
            var(--green-dark)
        );

    color: #071006;

    font-size: 15px;
    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 14px 34px rgba(94, 232, 59, 0.15);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.checkout-button:hover:not(:disabled) {
    transform: translateY(-1px);

    box-shadow:
        0 18px 40px rgba(94, 232, 59, 0.22);
}

.checkout-button:active:not(:disabled) {
    transform: translateY(0);
}

.checkout-button:disabled {
    cursor: wait;

    opacity: 0.75;
}

.button-loader {
    display: none;

    width: 17px;
    height: 17px;

    border: 2px solid rgba(7, 16, 6, 0.28);
    border-top-color: #071006;

    border-radius: 50%;

    animation:
        checkout-spin
        0.7s
        linear
        infinite;
}

.checkout-button.loading .button-loader {
    display: inline-block;
}

@keyframes checkout-spin {
    to {
        transform: rotate(360deg);
    }
}


/*
|--------------------------------------------------------------------------
| ERROR
|--------------------------------------------------------------------------
*/

.checkout-error {
    margin-top: 14px;

    padding: 15px;

    border:
        1px solid
        rgba(255, 107, 107, 0.18);

    border-radius: 12px;

    background: var(--danger-soft);

    color: #ffd0d0;

    font-size: 13px;
    line-height: 1.5;
}

.checkout-error strong,
.checkout-error span {
    display: block;
}

.checkout-error span {
    margin-top: 4px;
}

.checkout-error[hidden] {
    display: none;
}


/*
|--------------------------------------------------------------------------
| POWERED
|--------------------------------------------------------------------------
*/

.powered {
    margin:
        13px
        0
        0;

    color: var(--muted-2);

    text-align: center;

    font-size: 11px;
}


/*
|--------------------------------------------------------------------------
| INFO COLUMN
|--------------------------------------------------------------------------
*/

.checkout-info {
    display: grid;

    gap: 14px;
}

.info-card {
    padding: 20px;

    display: flex;
    align-items: flex-start;

    gap: 14px;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        rgba(16, 21, 18, 0.76);

    backdrop-filter: blur(12px);
}

.info-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--green-soft);

    color: var(--green);

    font-size: 16px;
    font-weight: 900;
}

.info-card h3 {
    margin: 1px 0 0;

    font-size: 14px;
    letter-spacing: -0.01em;
}

.info-card p {
    margin:
        7px
        0
        0;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 860px) {

    .checkout-main {
        padding-top: 30px;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-info {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

    .info-card {
        display: block;
    }

    .info-icon {
        margin-bottom: 13px;
    }
}


@media (max-width: 680px) {

    .checkout-header {
        width: min(
            100% - 28px,
            1180px
        );

        min-height: 76px;

        grid-template-columns:
            1fr
            auto;
    }

    .brand {
        justify-self: end;
    }

    .header-spacer {
        display: none;
    }

    .brand-name {
        display: none;
    }

    .checkout-main {
        width: min(
            100% - 28px,
            1080px
        );

        padding:
            24px
            0
            60px;
    }

    .intro {
        margin-bottom: 26px;
    }

    .intro p {
        font-size: 15px;
    }

    .plan-card {
        padding: 22px;
        border-radius: 22px;
    }

    .plan-card-top {
        display: block;
    }

    .trial-pill {
        margin-top: 14px;
    }

    .billing-switch {
        grid-template-columns: 1fr;
    }

    .billing-option {
        min-height: 45px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .checkout-info {
        grid-template-columns: 1fr;
    }

    .info-card {
        display: flex;
    }

    .info-icon {
        margin-bottom: 0;
    }
}


@media (max-width: 420px) {

    .plan-title-row {
        display: block;
    }

    .plan-badge {
        margin-top: 10px;
    }

    .main-price strong {
        font-size: 42px;
    }

}