/* ================== */
/* = Payment return = */
/* ================== */

/* templates/reader/payment_return.xhtml: the page shown after a checkout, a plan switch, a redeemed code
   or a new trial. The account's own sites light up in the plan's color as they are turned on
   (media/js/newsblur/payments/payment_return.js). Plan colors match the pricing tiers in static_pages.css. */

.NB-payment-return {
    /* -plan colors text and the check, -glow the light under each site that is on. */
    --NB-payment-return-plan: #166534;
    --NB-payment-return-glow: rgba(22, 163, 74, 0.55);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 78px);
    padding: 48px 24px 96px;
    text-align: center;
}

.NB-payment-return-plan-archive,
.NB-payment-return-plan-archive_extra {
    --NB-payment-return-plan: #115e59;
    --NB-payment-return-glow: rgba(13, 148, 136, 0.55);
}

.NB-payment-return-plan-pro {
    --NB-payment-return-plan: #9a3412;
    --NB-payment-return-glow: rgba(234, 88, 12, 0.55);
}

.NB-payment-return-title {
    max-width: 760px;
    margin: 0 0 14px;
    font-family: 'Gotham Narrow A', 'Gotham Narrow B', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.5px;
    color: #2d261a;
    text-wrap: balance;
}

/* One line of status at a time: working, then ready, or slow when the account never catches up. */
.NB-payment-return-status {
    max-width: 560px;
    min-height: 28px;
    margin: 0 0 40px;
    font-family: 'Chronicle Display A', 'Chronicle Display B', Georgia, serif;
    font-style: italic;
    font-size: 19px;
    line-height: 1.45;
    color: #705611;
}

.NB-payment-return-status p {
    margin: 0;
}

.NB-payment-return-working {
    animation: NB-payment-return-breathe 2.2s ease-in-out infinite;
}

/* A switch to another plan has already happened by the time this page loads, so nothing is "being upgraded". */
.NB-payment-return-switched .NB-payment-return-working {
    visibility: hidden;
}

.NB-payment-return-ready,
.NB-payment-return-slow,
.NB-payment-return.NB-ready .NB-payment-return-working,
.NB-payment-return.NB-slow .NB-payment-return-working {
    display: none;
}

.NB-payment-return.NB-ready .NB-payment-return-ready,
.NB-payment-return.NB-slow .NB-payment-return-slow {
    display: block;
}

.NB-payment-return-check {
    margin: 0;
    margin-inline-end: 4px;
    vertical-align: -3px;
    color: var(--NB-payment-return-plan);
}

.NB-payment-return-check path {
    stroke-dasharray: 17;
    stroke-dashoffset: 17;
}

.NB-payment-return.NB-ready .NB-payment-return-check path {
    animation: NB-payment-return-draw 0.35s ease-out 0.1s forwards;
}

.NB-payment-return-continue {
    display: inline-block;
    margin: 20px 0 0;
    padding: 12px 28px;
    border-radius: 12px;
    background: #D9A621;
    font-family: 'Gotham Narrow A', 'Gotham Narrow B', sans-serif;
    font-style: normal;
    font-size: 17px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: background 0.2s ease;
}

body.NB-static a.NB-payment-return-continue,
body.NB-static a.NB-payment-return-continue:hover {
    color: white;
}

.NB-payment-return-continue:hover {
    background: #C4941B;
}

.NB-payment-return-continue:focus-visible {
    outline: 2px solid #2d261a;
    outline-offset: 3px;
}

/* The account's sites, one tile each. A tile is dim until its site is turned on. */
.NB-payment-return-sites {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 752px;
    margin: 0 0 22px;
}

.NB-payment-return-site {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 0 0 1px rgba(45, 38, 26, 0.05);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.NB-payment-return-site img {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    filter: grayscale(1);
    opacity: 0.28;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.NB-payment-return-site.NB-on {
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(45, 38, 26, 0.16), 0 9px 16px -6px var(--NB-payment-return-glow);
    animation: NB-payment-return-pop 0.5s ease-out;
}

.NB-payment-return-site.NB-on img {
    filter: none;
    opacity: 1;
}

.NB-payment-return-count {
    min-height: 20px;
    margin: 0;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: rgba(45, 38, 26, 0.72);
}

.NB-payment-return-count b {
    font-weight: 600;
    color: var(--NB-payment-return-plan);
}

@keyframes NB-payment-return-breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes NB-payment-return-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes NB-payment-return-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

.NB-dark .NB-payment-return {
    --NB-payment-return-plan: #4ade80;
    --NB-payment-return-glow: rgba(74, 222, 128, 0.5);
}

.NB-dark .NB-payment-return-plan-archive,
.NB-dark .NB-payment-return-plan-archive_extra {
    --NB-payment-return-plan: #2dd4bf;
    --NB-payment-return-glow: rgba(45, 212, 191, 0.5);
}

.NB-dark .NB-payment-return-plan-pro {
    --NB-payment-return-plan: #fb923c;
    --NB-payment-return-glow: rgba(251, 146, 60, 0.5);
}

.NB-dark .NB-payment-return-title {
    color: rgba(255, 255, 255, 0.95);
}

.NB-dark .NB-payment-return-status {
    color: #FBDB9B;
}

.NB-dark .NB-payment-return-continue:focus-visible {
    outline-color: white;
}

.NB-dark .NB-payment-return-site {
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.NB-dark .NB-payment-return-site.NB-on {
    background-color: #f3f0e8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 16px -6px var(--NB-payment-return-glow);
}

.NB-dark .NB-payment-return-count {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 600px) {
    .NB-payment-return {
        padding: 32px 16px 72px;
    }

    .NB-payment-return-title {
        font-size: 30px;
    }

    .NB-payment-return-status {
        margin-bottom: 28px;
        font-size: 17px;
    }

    /* Nine tiles across at any phone width, five full rows; the count under them covers the rest. */
    .NB-payment-return-site {
        width: calc((100% - 64px) / 9 - 0.1px);
        height: auto;
        aspect-ratio: 1;
    }

    .NB-payment-return-site:nth-child(n+46) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .NB-payment-return-working,
    .NB-payment-return-site.NB-on {
        animation: none;
    }

    .NB-payment-return.NB-ready .NB-payment-return-check path {
        animation: none;
        stroke-dashoffset: 0;
    }

    .NB-payment-return-site,
    .NB-payment-return-site img {
        transition: none;
    }
}

/* ========== */
/* = Stripe = */
/* ========== */

.NB-static-form-wrapper {
    margin: 48px 0 18px;
    background: rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
}

.NB-static-form {
    margin: 0 auto;
    width: 360px;
}

.NB-stripe-form {
    overflow: hidden;
}

.NB-static-form input,
.NB-static-form select {
    font-size: 14px;
    padding: 4px 6px;
    margin: 6px 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;

    width: 200px;
    box-sizing: border-box;
}

.NB-static-oauth .NB-static-form .controls input,
.NB-stripe-form.NB-static-form .controls input {
    width: 180px;
}

.NB-static-form .NB-label-right {
    margin: 0 0 24px 206px;
    width: 200px;
    box-sizing: border-box;
}

.NB-static-form input.error,
.NB-static-form select.error {
    border-color: #830C0C;
}

.NB-static-form button {
    width: 200px;
    margin: 12px 0 4px 150px;
    box-shadow: none;
}

.NB-static-form .helptext {
    display: none;
}

.NB-static-form #id_card_cvv {
    width: 42px;
}

.NB-static-form .NB-stripe-username {
    margin: 6px 0 12px;
}

.NB-static-form label {
    width: 150px;
    display: block;
    float: left;
    clear: both;
    margin: 6px 0 0;
    padding: 2px 0 0;
    text-shadow: none;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
}

.NB-static-form .NB-creditcards {
    margin: 8px 0 0 150px;
    overflow: hidden;
}

.NB-static-form .NB-creditcards img {
    float: left;
    margin-right: 4px;
    width: 32px;
    height: 20px;
}

.NB-static-form input[type=submit] {
    margin-left: 150px;
    width: 200px;
}

.NB-static-form label.error {
    width: 100%;
    margin-left: 150px;
    text-transform: none;
    color: darkred;
}

.NB-static-form #payment-form>div {
    clear: both;
}

.NB-static-form p {
    overflow: hidden;
}

.NB-static-form #id_plan {
    margin: 0;
}

.NB-static-form #id_plan label {
    margin-top: 0;
}

.NB-static-form .NB-stripe-plan-choice {
    float: left;
    width: 200px;
    margin-top: 0px;
    padding: 0 2px;
    font-weight: bold;
}

.NB-static-form .NB-stripe-plan-choice label {
    width: auto;
    float: left;
    margin-top: 0;
    padding-top: 0;
}

.NB-static-form .NB-stripe-plan-choice input {
    width: auto;
    margin-right: 4px;
}

.NB-static-form .NB-small {
    font-size: 10px;
    margin-left: 4px;
    color: #575857;
}

.NB-static-form .payment-errors {
    margin: 8px 0 0 150px;
    color: #600000;
    display: block;
    font-weight: bold;
}

.NB-static-form .payment-notice {
    margin: 8px 0 0 150px;
    color: #606060;
    display: block;
    font-weight: 300;
    font-size: 11px;
}

.NB-static-form .payextra-label {
    clear: none;
    width: 200px;
    text-transform: none;
}

.NB-static-form .payextra-label input {
    width: auto;
    margin: 0 4px 0 0;
}

.NB-static-form input[name=plan] {
    display: none;
}

.NB-static-form .g-recaptcha {
    padding-left: 120px;
}
