/**
 * PowerPac Login Panel - the sign-in page only
 *
 * On top of auth-panel-shared.css: the sign-in form's label row (Forgot
 * password beside Password), the Show button, and the slides that replace the
 * partner panel when the block has slides (one picture each, like the home
 * page slider).
 *
 * @package PowerPac
 */

/* ============================================================
   Form
   ============================================================ */

.pp-signin__field { margin: 0 0 18px; }

.pp-signin__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.pp-auth .pp-signin__label-row label { margin: 0; }

.pp-auth .pp-signin__forgot {
    font-family: var(--pp-font);
    font-size: 0.82rem;
    color: var(--pp-red);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.pp-auth .pp-signin__forgot:hover { color: var(--pp-red-hover); }

/* Fields as on the rest of the site: square, light border. */
.pp-auth .pp-signin input[type="text"],
.pp-auth .pp-signin input[type="password"] {
    border-radius: 0;
    border-color: #ededed;
}

.pp-auth .pp-signin input[type="text"]:focus,
.pp-auth .pp-signin input[type="password"]:focus { border-color: var(--pp-red); }

.pp-signin__password { position: relative; }

.pp-auth .pp-signin__password input { padding-right: 84px; }

/* The theme styles bare <button> as a red pill; this one is a quiet text button in the field. */
.pp-auth .pp-signin__show {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: auto !important;
    min-height: 38px;
    margin: 0 !important;
    padding: 0 12px !important;
    font-family: var(--pp-font);
    font-size: 0.75rem !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pp-navy) !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.pp-auth .pp-signin__show:hover { color: var(--pp-red) !important; }

.pp-auth .pp-signin__show:focus-visible {
    outline: 2px solid var(--pp-red);
    outline-offset: 2px;
}

.pp-auth .pp-signin .pp-signin__remember { margin: 4px 0 22px !important; gap: 8px; }

.pp-auth .pp-signin__submit { border-radius: 6px !important; }

.pp-signin__done { font-size: 0.95rem; color: var(--pp-navy); }
.pp-signin__done a { color: var(--pp-red); font-weight: 700; }

/* ============================================================
   Slides
   ============================================================ */

.pp-auth .pp-auth__panel--slides {
    position: relative;
    display: grid;
    padding: 0;
    overflow: hidden;
    background: var(--pp-navy);
}

/* Stacked in one grid cell, each as tall as the tallest; only the active one shows. */
.pp-slide {
    grid-area: 1 / 1;
    align-self: stretch;
    position: relative;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.pp-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s ease;
}

.pp-slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.pp-slide__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 38, 62, 0.5) 0%, rgba(0, 38, 62, 0.8) 55%, rgba(0, 38, 62, 0.92) 100%);
}

.pp-slide__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 44px 24px 72px;
    color: #ffffff;
}

/* The cut-out picture sits above the words (the rewards on their own, or the book). */
.pp-slide__aside {
    order: -1;
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 0 26px;
    object-fit: contain;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.pp-slide--split .pp-slide__aside {
    width: auto;
    max-height: 340px;
    align-self: center;
}

/* A logo in place of the label, e.g. Powerpac 360. */
.pp-slide__logo {
    display: block;
    width: auto;
    height: 64px;
    margin: 0 0 18px;
}

/* Same label as the home page slides. */
.pp-slide__badge {
    display: inline-block;
    margin: 0 0 14px;
    padding: 7px 16px;
    font-family: var(--pp-font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
}

.pp-auth .pp-slide__title {
    font-family: var(--pp-font);
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.08;
    text-transform: none;
    color: #ffffff;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.pp-slide__title span { color: var(--pp-red); }

.pp-slide__text {
    max-width: 520px;
    margin: 0 0 26px;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.pp-auth .pp-slide__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 28px;
    font-family: var(--pp-font);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff !important;
    background: var(--pp-red);
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.pp-auth .pp-slide__btn:hover { background: var(--pp-red-hover); }

/* Red dashes, as on the home page. Each is 24px tall to tap; the bar is the middle 4px. */
.pp-slides__dots {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pp-auth .pp-slides__dot {
    width: 36px !important;
    height: 24px;
    min-height: 0;
    margin: 0 !important;
    padding: 10px 0 !important;
    background: rgba(255, 255, 255, 0.45) !important;
    background-clip: content-box !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.pp-auth .pp-slides__dot[aria-current="true"] { background-color: var(--pp-red) !important; }

.pp-auth .pp-slides__dot:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

@media (min-width: 900px) {
    .pp-auth .pp-auth__panel--slides { min-height: 620px; }

    /* Out to the site's 1425px band, as on the create-account page. Scoped to
       this block: live loads every block's sheet on every page, so the
       create-account sheet's 640px column rule is also on this page. */
    .pp-auth.pp-auth--signin .pp-auth__panel--form .pp-auth__inner {
        max-width: 480px;
        margin-left: max(0px, calc((100vw - 1425px) / 2 - 56px));
        margin-right: auto;
    }

    .pp-slide__inner {
        max-width: 640px;
        margin-left: auto;
        margin-right: max(0px, calc((100vw - 1425px) / 2));
        padding: 64px 56px 84px;
    }

    .pp-slide__logo { height: 76px; }

    /* Text left, the picture big on the right, running to the panel's edge. */
    .pp-slide--split .pp-slide__inner {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        align-items: center;
        gap: 32px;
        max-width: 760px;
        padding-right: 0;
    }

    .pp-slide--split .pp-slide__aside {
        order: 0;
        width: 100%;
        max-height: 560px;
        margin: 0;
        justify-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pp-slide,
    .pp-slide.is-active { transition: none; }
}

/* Small desktops: the half-width panel is too narrow for words beside the picture. */
@media (min-width: 900px) and (max-width: 1099px) {
    .pp-slide--split .pp-slide__inner {
        display: flex;
        padding-right: 56px;
    }

    .pp-slide--split .pp-slide__aside {
        order: -1;
        width: auto;
        max-height: 340px;
        margin: 0 0 26px;
        justify-self: auto;
    }
}
