/* ═══════════ Closed pages: sign-in, no access, signed-in bar ═══════════ */
/* Templates: core/templates/core/site_auth/. Plain CSS (no Tailwind build needed). */

.site-auth {
    background: #f8fafc;
    padding-bottom: 72px;
}

/* ── Hero (same gradient as the search page) ── */
.site-auth__hero {
    position: relative;
    overflow: hidden;
    padding: 132px 16px 120px;  /* top clears the fixed header, bottom is under the card */
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #00309E 0%, #0045D9 50%, #0058FF 100%);
}

.site-auth__hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.site-auth__hero > * {
    position: relative;
}

.site-auth__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.site-auth__icon svg {
    width: 28px;
    height: 28px;
}

.site-auth__title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.site-auth__lead {
    max-width: 520px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

/* ── Card ── */
.site-auth__card {
    position: relative;
    z-index: 1;
    width: calc(100% - 32px);
    max-width: 440px;
    margin: -72px auto 0;
    padding: 32px 28px;
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 24px 48px -24px rgba(0, 48, 158, 0.35),
        0 2px 8px rgba(15, 23, 42, 0.06);
}

.site-auth__field {
    margin-bottom: 18px;
}

.site-auth__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.site-auth__input {
    display: block;
    width: 100%;
    padding: 13px 14px;
    font-size: 16px;  /* 16px keeps iOS from zooming in on focus */
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-auth__input:focus {
    border-color: #0045D9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 69, 217, 0.12);
}

.site-auth__input[aria-invalid="true"] {
    border-color: #dc2626;
}

.site-auth__error {
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: 12px;
}

.site-auth__field-error {
    margin-top: 6px;
    font-size: 13px;
    color: #b91c1c;
}

.site-auth__note {
    margin-bottom: 20px;
    padding: 12px 14px;
    font-size: 14px;
    color: #334155;
    background: #f1f5f9;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.site-auth__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0045D9 0%, #0058FF 100%);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px -8px rgba(0, 69, 217, 0.6);
    cursor: pointer;
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.site-auth__button:hover {
    color: #fff;
    filter: brightness(1.07);
    box-shadow: 0 10px 24px -8px rgba(0, 69, 217, 0.7);
}

.site-auth__button:active {
    transform: translateY(1px);
}

.site-auth__button:focus-visible,
.site-auth__link:focus-visible {
    outline: 3px solid rgba(0, 69, 217, 0.35);
    outline-offset: 2px;
}

.site-auth__button--ghost,
.site-auth__button--ghost:hover {
    color: #0045D9;
    background: #eef3ff;
    box-shadow: none;
}

.site-auth__button--ghost:hover {
    filter: none;
    background: #e2eaff;
}

.site-auth__actions {
    display: grid;
    gap: 10px;
}

.site-auth__actions form {
    margin: 0;
}

.site-auth__hint {
    margin-top: 20px;
    font-size: 13.5px;
    line-height: 1.5;
    text-align: center;
    color: #64748b;
}

.site-auth__link {
    display: block;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: #0045D9;
}

.site-auth__link:hover {
    text-decoration: underline;
}

@media (min-width: 1024px) {
    .site-auth__hero {
        padding-top: 220px;
    }

    .site-auth__title {
        font-size: 36px;
    }
}

/* ── Signed-in bar: bottom-left (the chatbot sits bottom-right) ── */
.site-user-bar {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 120px);
    padding: 6px 6px 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    color: #fff;
    background: rgba(15, 23, 42, 0.88);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(8px);
}

.site-user-bar__icon {
    flex: none;
    width: 20px;
    height: 20px;
    opacity: 0.85;
}

.site-user-bar__name {
    min-width: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-user-bar form {
    flex: none;
    margin: 0;
}

.site-user-bar button {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.site-user-bar button:hover {
    background: rgba(255, 255, 255, 0.26);
}

.site-user-bar button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-auth-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
