/* Общесайтовый виджет пользователя (шапка) и попап входа через VK ID — намеренно отдельно от
   assets/puzzle/, т.к. задуман как единый для любого приложения сайта (см. docs/USERS.md,
   docs/MENUS.md). Визуальный паттерн попапа/кнопок — тот же, что уже используется в Пазлум
   (categories-modal, sidebar-category-link), но без зависимости от puzzle/style.css. */

.header-user-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: #e4e8ef;
    color: #3d4451;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.header-user-widget--guest:hover {
    background: #dbe0e9;
}

.header-user-widget--authorized {
    cursor: default;
    padding-left: 6px;
}

.header-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-logout-form {
    display: contents;
}

.header-user-logout-btn {
    border: none;
    background: transparent;
    font: inherit;
    font-size: 12px;
    color: #8a93a3;
    cursor: pointer;
    text-decoration: underline;
}

.header-user-logout-btn:hover {
    color: #3d4451;
}

/* Узкие экраны (см. docs/MENUS.md, "Адаптация шапки на узких экранах"): имени рядом с прижатым
   влево названием приложения уже не помещается — оставляем только аватарку, кнопка «Выйти»
   при этом остаётся видимой в любом случае. Порог 860px — общий для всех приложений сайта. */
@media (max-width: 860px) {
    .header-user-name {
        display: none;
    }
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 12, 16, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.auth-modal[hidden] {
    display: none;
}

.auth-modal--closing {
    opacity: 0;
}

.auth-modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
    padding: 28px 24px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.auth-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    background: #f3f5f9;
    border-radius: 8px;
    cursor: pointer;
}

.auth-modal-close svg {
    width: 20px;
    height: 20px;
}

.auth-modal-close:hover {
    background: #e9ecf2;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
}

.auth-provider-btn--vk {
    background: #0077ff;
}

.auth-provider-btn--vk:hover {
    background: #0066dd;
}

.auth-provider-btn--ok {
    background: #ee8208;
}

.auth-provider-btn--ok:hover {
    background: #d67306;
}

.auth-provider-btn--mail {
    background: #005ff9;
}

.auth-provider-btn--mail:hover {
    background: #0052dc;
}

/* Общесайтовый баннер flash-уведомлений (см. partials/flash-notice.blade.php) — первый пользователь
   этого компонента — ошибки входа через VK ID, но ключи session('status')/session('error') общие,
   годятся для любого будущего случая на любой из страниц, где подключён этот партиал. */
.flash-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
}

.flash-notice--success {
    background: #eafaf0;
    color: #14713a;
}

.flash-notice--error {
    background: #fdecea;
    color: #9c2a1e;
}

.flash-notice-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
}

.flash-notice-close:hover {
    opacity: 1;
}
