/* Login modal overlay, guest card and header "Войти" entry.
   The modal card itself reuses login-form.css (.login-card, .login-form-input, …); here are only the
   overlay/positioning helpers plus the guest card and header button. Referenced from App.razor. */

/* ---- Login modal overlay (wraps the reused .login-card) ---- */
.login-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 16px;
}

.login-modal-backdrop .login-card {
    position: relative;
    margin: 0;
    width: 100%;
    max-width: 420px;
}

/* Long unbroken error strings (e.g. exception messages) must wrap inside the card, not overflow it. */
.error-message {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.login-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-gray-color, #7C8AA0);
    z-index: 1;
}

.login-modal-sub {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--text-gray-color, #7C8AA0);
}

/* ---- Guest gate (profile page when not signed in) ---- */
.guest-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s-3);
    max-width: 480px;
    margin: 32px auto;
    padding: var(--s-8) var(--s-6);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--elev-1);
}

.guest-card__icon {
    color: var(--accent-action);
}

.guest-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--t-title);
    line-height: var(--t-title-lh);
    font-weight: var(--w-semi);
    letter-spacing: var(--track-tight);
    color: var(--text-primary);
}

.guest-card__sub {
    margin: 0;
    font-size: var(--t-ui);
    line-height: var(--t-ui-lh);
    color: var(--text-secondary);
    max-width: 44ch;
}

.guest-card__value {
    list-style: none;
    margin: var(--s-3) 0 0;
    padding: 0;
    display: grid;
    gap: var(--s-3);
    text-align: left;
    width: 100%;
}

    .guest-card__value li {
        display: flex;
        gap: var(--s-3);
        align-items: flex-start;
        font-size: var(--t-ui);
    }

    .guest-card__value b {
        display: block;
        font-weight: var(--w-bold);
        color: var(--text-primary);
    }

    .guest-card__value b + span,
    .guest-card__value li > span > span {
        color: var(--text-secondary);
        font-size: var(--t-sub);
    }

.guest-card__tick {
    flex: 0 0 auto;
    margin-top: 3px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: var(--r-full);
    background: var(--success-soft);
    color: var(--success);
}

.guest-card__actions {
    display: grid;
    gap: var(--s-2);
    width: 100%;
    max-width: 320px;
    margin-top: var(--s-3);
}

.guest-card__cta {
    min-height: 46px;
    width: 100%;
}

/* ---- Header "Войти" entry (anonymous) ---- */
.header-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    background: var(--accent-action);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.header-login-button:hover {
    filter: brightness(1.05);
}
