/* wwwroot/css/pfx-login.css */
/* Login / identity page styles. Scoped under .pfx-login-shell and .pfx-login-footer. */

/* ── Shell ────────────────────────────────────────────────── */
.pfx-login-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    min-height: calc(100dvh - 53px); /* account for footer */
    background: var(--pfx-bg-page, #f5f3ee);
}

/* ── Card ─────────────────────────────────────────────────── */
.pfx-login-card {
    background: #fff;
    border: 1px solid #dedad2;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 2px 24px rgba(45, 80, 56, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ── Logo band ────────────────────────────────────────────── */
.pfx-login-logo-band {
    background: var(--pfx-forest-dark, #2d5038);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 40px 32px;
}

    .pfx-login-logo-band img {
        width: 180px;
        height: auto;
        display: block;
    }

/* ── Form section ─────────────────────────────────────────── */
.pfx-login-form-section {
    padding: 32px 36px 28px;
}

.pfx-login-heading {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--pfx-text, #1a1f1a);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.pfx-login-sub {
    font-size: 13px;
    color: #7a8278;
    margin-bottom: 28px;
}

/* ── Fields ───────────────────────────────────────────────── */
.pfx-login-field {
    margin-bottom: 18px;
}

    .pfx-login-field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #4a5248;
        margin-bottom: 7px;
    }

.pfx-login-input-wrap {
    position: relative;
}

.pfx-login-field .form-control {
    height: 44px;
    border: 1px solid #c8c2b6;
    border-radius: 7px;
    background: var(--pfx-bg-page, #f5f3ee);
    padding: 0 40px 0 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--pfx-text, #1a1f1a);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

    .pfx-login-field .form-control:focus {
        border-color: var(--pfx-forest-dark, #2d5038);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(45, 80, 56, 0.12);
    }

    .pfx-login-field .form-control.input-validation-error {
        border-color: #8b2020;
        background: #fdf0f0;
    }

        .pfx-login-field .form-control.input-validation-error:focus {
            box-shadow: 0 0 0 3px rgba(139, 32, 32, 0.10);
        }

/* ── Password toggle ──────────────────────────────────────── */
.pfx-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7a8278;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

    .pfx-toggle-pw:hover {
        color: var(--pfx-forest-dark, #2d5038);
    }

/* ── Validation messages ──────────────────────────────────── */
.pfx-login-field .text-danger {
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ── Server-side error alert ──────────────────────────────── */
.pfx-login-alert {
    background: #fdf0f0;
    border: 1px solid rgba(139, 32, 32, 0.2);
    border-radius: 7px;
    padding: 11px 14px;
    font-size: 13px;
    color: #8b2020;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

    .pfx-login-alert svg {
        flex-shrink: 0;
        margin-top: 1px;
    }

/* ── Remember / forgot row ────────────────────────────────── */
.pfx-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 8px;
}

.pfx-login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4a5248;
    cursor: pointer;
    user-select: none;
}

    .pfx-login-remember input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border: 1.5px solid #c8c2b6;
        border-radius: 4px;
        background: var(--pfx-bg-page, #f5f3ee);
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
        transition: border-color 0.15s, background 0.15s;
    }

        .pfx-login-remember input[type="checkbox"]:checked {
            background: var(--pfx-forest-dark, #2d5038);
            border-color: var(--pfx-forest-dark, #2d5038);
        }

            .pfx-login-remember input[type="checkbox"]:checked::after {
                content: '';
                position: absolute;
                left: 4px;
                top: 1.5px;
                width: 5px;
                height: 9px;
                border: 2px solid #fff;
                border-top: none;
                border-left: none;
                transform: rotate(45deg);
            }

.pfx-login-forgot {
    font-size: 13px;
    color: var(--pfx-forest-mid, #3a6b4a);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

    .pfx-login-forgot:hover {
        color: var(--pfx-forest-dark, #2d5038);
        text-decoration: underline;
    }

/* ── Submit button ────────────────────────────────────────── */
.pfx-btn-login {
    width: 100%;
    height: 46px;
    background: var(--pfx-forest-dark, #2d5038);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .pfx-btn-login:hover:not(:disabled) {
        background: var(--pfx-forest-mid, #3a6b4a);
    }

    .pfx-btn-login:active:not(:disabled) {
        transform: scale(0.99);
    }

    .pfx-btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .pfx-btn-login .pfx-spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.4);
        border-top-color: #fff;
        border-radius: 50%;
        animation: pfx-spin 0.7s linear infinite;
        display: none;
    }

    .pfx-btn-login.pfx-loading .pfx-btn-label {
        display: none;
    }

    .pfx-btn-login.pfx-loading .pfx-spinner {
        display: block;
    }

@keyframes pfx-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── reCAPTCHA ────────────────────────────────────────────── */
.pfx-recaptcha-wrap {
    margin-bottom: 18px;
}

/* ── Divider ──────────────────────────────────────────────── */
.pfx-login-divider {
    border: none;
    border-top: 1px solid #dedad2;
    margin: 0 36px;
}

/* ── Card footer links ────────────────────────────────────── */
.pfx-login-card-footer {
    padding: 20px 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .pfx-login-card-footer a {
        font-size: 12.5px;
        color: #7a8278;
        text-decoration: none;
        transition: color 0.15s;
    }

        .pfx-login-card-footer a:hover {
            color: var(--pfx-forest-dark, #2d5038);
        }

/* ── Page footer ──────────────────────────────────────────── */
.pfx-login-footer {
    border-top: 1px solid #dedad2;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: #7a8278;
    background: var(--pfx-bg-page, #f5f3ee);
}

    .pfx-login-footer a {
        color: #7a8278;
        text-decoration: none;
        transition: color 0.15s;
    }

        .pfx-login-footer a:hover {
            color: var(--pfx-forest-dark, #2d5038);
        }

.pfx-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4caf82;
    margin-right: 5px;
    vertical-align: middle;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .pfx-login-shell {
        padding: 0;
        justify-content: flex-start;
    }

    .pfx-login-card {
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        min-height: calc(100dvh - 53px);
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }

    .pfx-login-logo-band {
        padding: 44px 40px 36px;
    }

        .pfx-login-logo-band img {
            width: 150px;
        }

    .pfx-login-form-section {
        padding: 28px 24px 24px;
        flex: 1;
    }

    .pfx-login-card-footer {
        padding: 0 24px 32px;
    }

    .pfx-login-divider {
        margin: 0 24px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .pfx-login-card {
        max-width: 92vw;
    }
}


/* ── Auth page layout links ─────────────────────────────────────────────── */
.pfx-auth-logo-link  { display: block; line-height: 0; }
.pfx-auth-back-link  { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
