/*
 * Public account pages (login, register, forgot/reset password), modernised.
 *
 * Overrides the template rules in main-style.css, so all account views change
 * together without markup edits - the same approach as the admin sign-in. The
 * book photograph stays: it is the one piece of the old design that says
 * MissingPage. What goes is the teal-to-green gradient and the navy button
 * from a different palette.
 */

.main-box {
    background: #f5f7fb;
    background-image: none;
    overflow-x: hidden;
}

/* Left half: keep the book image, grounded with an ink wash so it reads as a
   designed panel rather than a bare stock photo. #43 — an info panel (brand +
   value points) now sits over it, so the wash is deep enough for white text. */
.login-banner {
    background:
        linear-gradient(to top, rgba(11, 60, 48, .82), rgba(12, 42, 35, .55) 55%, rgba(16, 18, 22, .35)),
        url('../images/login-page.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

/* #43 — value-proposition panel on the sign-in screen (like the marketing site). */
.mp-login-info {
    color: #eafaf4;
    padding: 0 clamp(28px, 6vw, 64px);
    max-width: 520px;
    margin: 0 auto;
}
.mp-login-info-brand {
    font-family: 'Nexa-Bold', sans-serif;
    font-size: .95rem;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 22px;
}
.mp-login-info-brand span { color: #7fe3c8; }
.mp-login-info-title {
    font-family: 'Nexa-Bold', sans-serif;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 26px;
    letter-spacing: -.3px;
}
.mp-login-info-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mp-login-info-points li {
    font-size: 1.02rem;
    line-height: 1.4;
    color: #eafaf4;
    display: flex;
    align-items: center;
    gap: 12px;
}
.mp-login-info-points i {
    color: #7fe3c8;
    width: 20px;
    text-align: center;
    flex: 0 0 20px;
}

/* Right half: the form floats as a card on the light canvas. */
.login-box {
    top: 50%;
    transform: translateY(-50%);
    max-width: calc(100% - 48px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .10);
    padding: 36px 36px 28px;
}

/* The register form is tall - absolute vertical-centering (top:50% + translateY)
   slides its first fields up under the floating header pill. Let this one box
   flow from the top with clearance for the pill, and scroll if needed. Scoped
   with :has() so the short login / forgot-password boxes keep their centering. */
.login-box:has(#registerForm) {
    position: static;
    top: auto;
    transform: none;
    margin: 84px auto 48px;
}

.text-heading {
    font-size: 1.7em;
    line-height: 1.25;
    color: #101216;
}

.login-box form {
    margin-top: 24px;
}

.login-box form input[type="text"],
.login-box form input[type="password"],
.login-box input[type="text"].form-control,
.login-box input[type="password"].form-control {
    height: 54px !important;
    font-size: 16px;
    border: 1px solid #dfe4ec !important;
    border-radius: 10px;
    background: #fff !important;
}

.login-box form input.form-control:focus {
    border-color: #46b7c5 !important;
    box-shadow: 0 0 0 3px rgba(70, 183, 197, .16) !important;
}

.login-box label {
    color: #6b7280;
    font-size: .8em;
}

.login-box .form-check-input:checked {
    background-color: #46b7c5 !important;
    border-color: #46b7c5;
}

.login-box .form-check-label {
    color: #3d434b;
}

/* The primary action: brand gradient instead of the navy block. */
.login-btn,
.login-box .login-btn {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 14px 0;
    background: linear-gradient(135deg, #46b7c5, #2e8fa3);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Nexa-Bold', sans-serif;
    font-size: 1.02rem;
    letter-spacing: .4px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 14px rgba(70, 183, 197, .35);
}

.login-btn:hover,
.login-btn:focus {
    background: linear-gradient(135deg, #3aa5b3, #257e91);
    color: #fff;
    text-decoration: none;
}

/* Secondary links and the social row */
.trouble-login {
    color: #3aa5b3;
}

.social-login .text-small {
    color: #8b93a1;
}

.social-login button {
    background: transparent;
    border: none;
}

.signup-btn span {
    color: #5b6270;
}

.signup-btn a {
    color: #3aa5b3;
    font-weight: 600;
}

/* One column on narrow screens: the info panel becomes a compact band above the
   form (#43 — nothing hidden, and the form clears the fixed header). */
@media (max-width: 900px) {
    .login-banner {
        position: static;
        width: 100%;
        height: auto;
        min-height: 150px;
        padding: 82px 0 24px; /* top clearance so the headline sits below the fixed brand bar */
    }

    .mp-login-info { padding: 0 22px; }
    .mp-login-info-brand { margin-bottom: 12px; font-size: .85rem; }
    .mp-login-info-title { font-size: 1.3rem; margin-bottom: 14px; }
    .mp-login-info-points { gap: 8px; }
    .mp-login-info-points li { font-size: .9rem; }

    .right-block {
        width: 100%;
        float: none;
    }

    .login-box {
        position: static;
        transform: none;
        margin: 24px auto 40px;
    }
}

/* Inline sign-in failure: message lives in the form, not in a popup. */
.login-error {
    background: #fdecec;
    color: #b3363c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .92rem;
    line-height: 1.45;
}

@keyframes mp-shake {
    10%, 90% { transform: translate(-1px, -50%); }
    20%, 80% { transform: translate(2px, -50%); }
    30%, 50%, 70% { transform: translate(-4px, -50%); }
    40%, 60% { transform: translate(4px, -50%); }
}

.login-box.login-shake {
    animation: mp-shake .45s cubic-bezier(.36, .07, .19, .97) both;
}

/* Static account boxes (mobile layout) shake around their normal position. */
@media (max-width: 900px) {
    @keyframes mp-shake {
        10%, 90% { transform: translateX(-1px); }
        20%, 80% { transform: translateX(2px); }
        30%, 50%, 70% { transform: translateX(-4px); }
        40%, 60% { transform: translateX(4px); }
    }
}
