/* Paywall CTA - partials/content-cta.hbs
/* Replaces Ghost's default upgrade prompt on restricted posts.
/*
/* Deliberately NOT using Ghost's own .gh-post-upgrade-cta / .gh-btn class names:
/* Ghost injects styles for those through {{ghost_head}}, which sits after this
/* stylesheet in the cascade and would win. These names are ours alone.
/*
/* Everything is scoped under .vip-cta so the rules outrank ".gh-content a",
/* which colours and underlines every link inside the post body.
/* ---------------------------------------------------------- */

.vip-cta {
    margin: max(4.8vmin, 36px) 0;
}

.vip-cta-inner {
    padding: max(4.8vmin, 32px) max(4vmin, 24px);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-lightgrey);
    text-align: center;
}

.vip-cta .vip-cta-title {
    margin: 0 0 16px;
    color: var(--color-darkgrey);
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
}

/* Follow the site's title font setting, like the other headings do */
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .vip-cta .vip-cta-title {
    font-family: var(--gh-font-heading, var(--font-serif));
}

.vip-cta .vip-cta-text {
    max-width: 52rem;
    margin: 0 auto 12px;
    color: var(--color-secondary-text);
    font-family: var(--gh-font-body, inherit);
    font-size: 1.7rem;
    line-height: 1.5;
}

/* Same pill treatment as the header's accent button, one size up */
.vip-cta .vip-cta-button,
.member-account .vip-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 12px;
    padding: 10px 28px;
    border-radius: 48px;
    background: var(--ghost-accent-color, var(--color-darkgrey));
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.2;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.vip-cta .vip-cta-button:hover,
.member-account .vip-cta-button:hover {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
}

.vip-cta .vip-cta-note {
    margin: 16px 0 0;
    color: var(--color-secondary-text);
    font-size: 1.4rem;
}

.vip-cta .vip-cta-note a {
    color: var(--color-secondary-text);
    text-decoration: underline;
}

.vip-cta .vip-cta-note a:hover {
    color: var(--color-darkgrey);
}

/* Dark mode
/* ---------------------------------------------------------- */

html.dark-mode .vip-cta-inner {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

html.dark-mode .vip-cta .vip-cta-title {
    color: #fff;
}

html.dark-mode .vip-cta .vip-cta-text,
html.dark-mode .vip-cta .vip-cta-note,
html.dark-mode .vip-cta .vip-cta-note a {
    color: rgba(255, 255, 255, 0.7);
}

html.dark-mode .vip-cta .vip-cta-note a:hover {
    color: #fff;
}

@media (prefers-color-scheme: dark) {
    html.auto-color .vip-cta-inner {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.05);
    }

    html.auto-color .vip-cta .vip-cta-title {
        color: #fff;
    }

    html.auto-color .vip-cta .vip-cta-text,
    html.auto-color .vip-cta .vip-cta-note,
    html.auto-color .vip-cta .vip-cta-note a {
        color: rgba(255, 255, 255, 0.7);
    }

    html.auto-color .vip-cta .vip-cta-note a:hover {
        color: #fff;
    }
}

@media (max-width: 767px) {
    .vip-cta-inner {
        padding: 28px 20px;
    }

    .vip-cta .vip-cta-text {
        font-size: 1.6rem;
    }

    .vip-cta .vip-cta-button,
    .member-account .vip-cta-button {
        width: 100%;
    }
}


/* VIP badge in the site header
/* ---------------------------------------------------------- */

.gh-head-vip {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 8px 18px;
    border: 1px solid #d4af37;
    border-radius: 48px;
    color: #d4af37;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.gh-head-vip svg {
    width: 14px;
    height: 14px;
}

/* The call to action, as a filled pill: solid gold reads as "do this", while
   the outlined badge above reads as "you are this". Keeps gh-head-link so it
   still joins the burger menu animation. */
.gh-head-vip-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 8px 18px;
    border: 1px solid #d4af37;
    border-radius: 48px;
    background: #d4af37;
    color: #15171A;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.gh-head-vip-link:hover {
    color: #15171A;
    opacity: 0.85;
}

.gh-head-vip-link svg {
    width: 15px;
    height: 15px;
}

/* The paywall already does the selling - below the burger breakpoint the header
   only keeps the badge, so the actions row doesn't get crowded. */
@media (max-width: 767px) {
    .gh-head-vip {
        font-size: 1.3rem;
        padding: 8px 16px;
    }

    .gh-head-vip-link {
        width: 100%;
        font-size: 1.8rem;
    }
}


/* Account page - custom-account.hbs
/* ---------------------------------------------------------- */

.member-account {
    margin: max(4.8vmin, 36px) 0 0;
}

.member-account-identity {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.member-account .member-account-name {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.member-account .member-account-email {
    margin: 4px 0 0;
    color: var(--color-secondary-text);
    font-family: var(--gh-font-body, inherit);
    font-size: 1.6rem;
}

.member-account-status {
    margin-top: 28px;
    padding: max(4vmin, 28px) max(3.2vmin, 22px);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-lightgrey);
    text-align: center;
}

.member-account-status.is-vip {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
}

.member-account .member-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: #d4af37;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.member-account .member-account-badge.is-free {
    color: var(--color-secondary-text);
}

.member-account-badge svg {
    width: 15px;
    height: 15px;
}

.member-account .member-account-title {
    margin: 0 0 12px;
    color: var(--color-darkgrey);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.member-account .member-account-text {
    max-width: 52rem;
    margin: 0 auto 12px;
    color: var(--color-secondary-text);
    font-family: var(--gh-font-body, inherit);
    font-size: 1.7rem;
    line-height: 1.5;
}

.member-account .member-account-note {
    margin: 12px 0 0;
    font-size: 1.5rem;
}

.member-account .member-account-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.5rem;
}

.member-account .member-account-links li {
    margin: 0;
    padding: 0;
}

/* Dark mode
/* ---------------------------------------------------------- */

html.dark-mode .member-account-identity {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .member-account .member-account-name,
html.dark-mode .member-account .member-account-title {
    color: #fff;
}

html.dark-mode .member-account-status {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

html.dark-mode .member-account-status.is-vip {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.1);
}

html.dark-mode .member-account .member-account-email,
html.dark-mode .member-account .member-account-text {
    color: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
    html.auto-color .member-account-identity {
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }

    html.auto-color .member-account .member-account-name,
    html.auto-color .member-account .member-account-title {
        color: #fff;
    }

    html.auto-color .member-account-status {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.05);
    }

    html.auto-color .member-account-status.is-vip {
        border-color: rgba(212, 175, 55, 0.5);
        background: rgba(212, 175, 55, 0.1);
    }

    html.auto-color .member-account .member-account-email,
    html.auto-color .member-account .member-account-text {
        color: rgba(255, 255, 255, 0.7);
    }
}

@media (max-width: 767px) {
    .member-account-status {
        padding: 24px 18px;
    }

    .member-account .member-account-text {
        font-size: 1.6rem;
    }
}


/* The offer line ("N coffees = N months") - the one thing to actually read.
/* Kept last in the file so it outranks the plain body-text rules above, which
/* match the same element with the same specificity.
/* ---------------------------------------------------------- */

.vip-cta .vip-cta-terms,
.member-account .vip-cta-terms {
    margin-bottom: 16px;
    color: var(--color-darkgrey);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.4;
}

html.dark-mode .vip-cta .vip-cta-terms,
html.dark-mode .member-account .vip-cta-terms {
    color: #fff;
}

@media (prefers-color-scheme: dark) {
    html.auto-color .vip-cta .vip-cta-terms,
    html.auto-color .member-account .vip-cta-terms {
        color: #fff;
    }
}

@media (max-width: 767px) {
    .vip-cta .vip-cta-terms,
    .member-account .vip-cta-terms {
        font-size: 1.75rem;
    }
}


/* Scan-to-pay QR
/* The code is drawn as a plain black-on-white SVG and sits on a white card:
/* QR readers need that contrast and quiet zone, in either colour scheme.
/* ---------------------------------------------------------- */

.vip-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 24px 0 4px;
}

.vip-qr-code {
    width: 132px;
    height: 132px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    line-height: 0;
}

.vip-qr-code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.vip-cta .vip-qr-caption,
.member-account .vip-qr-caption {
    color: var(--color-secondary-text);
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html.dark-mode .vip-cta .vip-qr-caption,
html.dark-mode .member-account .vip-qr-caption {
    color: rgba(255, 255, 255, 0.55);
}

@media (prefers-color-scheme: dark) {
    html.auto-color .vip-cta .vip-qr-caption,
    html.auto-color .member-account .vip-qr-caption {
        color: rgba(255, 255, 255, 0.55);
    }
}

/* Nobody scans a code on the screen they're holding */
@media (max-width: 767px) {
    .vip-qr {
        display: none;
    }
}
