/* Content of the sign-in pages inside AuthShell's card (Components/Account/Shared/AuthPage.razor and the pages in
   Components/Account/Pages): the head, notices, the form and its password box, and the links under it. The frame
   itself is WebbuilderUI's auth-shell.css, and result states use its StatusPanel. */

/* ========
     head
   ======== */

.aup-head {
    margin-bottom: 24px;
}

.aup-head-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.aup-title {
    margin: 10px 0 8px;
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--app-text-strong);
}

.aup-head-center .aup-title {
    margin-top: 18px;
}

.aup-lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--app-text-muted);
}

/* The icon tile above a centred head, the same size and ring as StatusPanel's */
.aup-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--app-accent-soft);
    font-size: 30px;
    color: var(--app-accent);
}

.aup-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1px solid var(--app-line);
    border-radius: 24px;
}

/* ===========
     notices
   =========== */

.aup-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    animation: aup-notice-in 0.3s var(--app-ease-out) both;
}

.aup-notice i {
    flex: none;
    font-size: 18px;
    line-height: 1.2;
}

.aup-notice-info {
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.aup-notice-success {
    background: var(--app-success-soft);
    color: var(--app-success);
}

.aup-notice-danger {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

@keyframes aup-notice-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ========
     form
   ======== */

.aup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* A label with a link (app-link, which takes the 14px from here) on the same line (Forgot password?) */
.aup-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.aup-label-row .app-label {
    margin: 0;
}

.aup-submit {
    width: 100%;
    margin-top: 4px;
}

.aup-check {
    align-self: flex-start;
}

.aup-check-hint {
    margin: -10px 0 0 30px;
}

/* ---------- password box with its show / hide button ---------- */

.aup-password {
    position: relative;
}

.aup-password-input {
    padding-right: 52px;
}

.aup-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 20px;
    color: var(--app-text-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
    .aup-password-toggle:hover {
        background: var(--app-accent-soft);
        color: var(--app-accent);
    }
}

.aup-password-toggle:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 1px;
}

.aup-password-toggle[aria-pressed="true"] {
    color: var(--app-accent);
}

/* Actions under the form: a quieter button and a link (app-link, which takes the 14px from here), centred */
.aup-secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
}

.aup-inline-form {
    display: contents;
}

.aup-foot {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--app-line);
    text-align: center;
}

.aup-foot p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--app-text-muted);
}

.aup-foot p + p {
    margin-top: 8px;
}

/* ==============
     responsive
   ============== */

@media (max-width: 767.98px) {
    /* At least 16px in the inputs, so iOS does not zoom the page when one is focused */
    .aup-form .app-input {
        font-size: 16px;
    }

    .aup-lead {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aup-notice {
        animation: none;
    }

    .aup-password-toggle {
        transition: none;
    }
}
