/* Submit wait screen (views/partials/loader.ejs, public/js/loader.js). Colors come from lp-forms.css. */
.lp-loader {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(246, 249, 252, .9);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: lp-loader-fade .25s ease-out;
}
.lp-loader[hidden] {
    display: none;
}
.lp-loader-open,
.lp-loader-open body {
    overflow: hidden;
}
@keyframes lp-loader-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lp-loader-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 2rem 1.75rem 1.5rem;
    overflow: hidden;
    border: 1px solid var(--lp-line);
    border-radius: 20px;
    /* Very light green at the top, fading to white */
    background: linear-gradient(180deg, rgba(23, 166, 127, .11) 0%, rgba(23, 166, 127, .04) 28%, rgba(255, 255, 255, 0) 55%) #fff;
    box-shadow: var(--lp-card-shadow);
    text-align: center;
}
/* Graph-paper pattern behind the logo, fading out on every side */
.lp-loader-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 380px;
    height: 230px;
    background-image:
        linear-gradient(rgba(23, 166, 127, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 166, 127, .16) 1px, transparent 1px);
    background-position: center top;
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 42%, #000 15%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 42%, #000 15%, transparent 100%);
    transform: translateX(-50%);
    pointer-events: none;
}
.lp-loader-card > * {
    position: relative;
}

.lp-loader-logo {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 14px;
}

.lp-loader-title {
    margin: 0;
    color: var(--lp-ink);
    font-size: 1.5rem;
}
.lp-loader-sub {
    margin: .375rem 0 0;
    color: var(--lp-muted);
    font-size: 1rem;
}

/* Progress bar: what's happening now, the percentage, and "Step 1 of 2" */
.lp-loader-progress {
    margin: 1.5rem 0 0;
    text-align: left;
}
.lp-loader-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
}
.lp-loader-step {
    color: var(--lp-ink);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}
.lp-loader-pct {
    flex: 0 0 auto;
    color: var(--lp-green);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.lp-loader-bar {
    position: relative;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(31, 44, 51, .09);
    box-shadow: inset 0 1px 2px rgba(31, 44, 51, .08);
}
.lp-loader-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    /* Soft moving stripes, so the bar always looks alive */
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, .22) 75%, transparent 75%) 0 0 / 28px 28px,
        var(--lp-green);
    transition: width .4s linear;
    animation: lp-loader-stripes 1s linear infinite;
}
@keyframes lp-loader-stripes {
    to { background-position: 28px 0, 0 0; }
}
.lp-loader.is-done .lp-loader-fill {
    background: var(--lp-green);
    animation: none;
}
.lp-loader.is-done .lp-loader-time {
    visibility: hidden;
}
.lp-loader-count {
    margin: .5rem 0 0;
    color: var(--lp-muted);
    font-size: .9375rem;
}

/* Reminders under the bar ("Please don't refresh the page") */
.lp-loader-items {
    display: grid;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.lp-loader-items:empty {
    display: none;
}
.lp-loader-items li {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 44px;
    padding: .55rem .875rem;
    border: 1px solid rgba(63, 101, 119, .25);
    border-radius: 12px;
    background: var(--lp-steel-soft);
    color: var(--lp-steel);
    font-size: 1rem;
    font-weight: 600;
}
.lp-loader-items i {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 1.0625rem;
}

.lp-loader-time {
    margin: 1rem 0 0;
    color: #6b7580;
    font-size: .875rem;
}

@media (prefers-reduced-motion: reduce) {
    .lp-loader,
    .lp-loader-fill {
        animation: none;
    }
    .lp-loader-fill {
        transition: none;
    }
}
@media (max-width: 575.98px) {
    .lp-loader-card {
        padding: 1.5rem 1.125rem 1.25rem;
    }
    .lp-loader-logo {
        width: 48px;
        height: 48px;
    }
}

/* /offers: the tab /pl opens for the Prime offer */
.lp-offer-wait {
    min-height: 60vh;
    padding: 4rem 0;
    background: var(--lp-bg);
}
.lp-offer-wait-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1.75rem;
    border: 1px solid var(--lp-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lp-card-shadow);
    text-align: center;
}
.lp-offer-wait-card[hidden] {
    display: none;
}
.lp-offer-wait-card h1 {
    margin: 0 0 .5rem;
    color: var(--lp-ink);
    font-size: 1.5rem;
}
.lp-offer-wait-card p {
    margin: 0;
    color: var(--lp-muted);
}
