/* Аккаунты сайта (26.10.2026): меню аккаунта в шапке, «Выберите аккаунт» в окне входа, страница «Аккаунт» (?page=account) */

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #2b2b2b;
    border: 1px solid rgba(173, 131, 90, .5);
}

.account-avatar--lg {
    width: 48px;
    height: 48px;
}

.account-avatar--xl {
    width: 96px;
    height: 96px;
    border-width: 2px;
}

/* в окнах сайта .modal img — 400px (styles.css): аватару — свой размер */
.modal img.account-avatar {
    width: 36px;
    height: 36px;
    margin: 0;
    display: block;
}

/* ---------------------------------------------------------------- меню в шапке */

.header-user .account-menu > .user-header-image {
    position: relative;
    overflow: visible;
}

.header-user .account-menu > .user-header-image img {
    border-radius: 50%;
}

.account-menu__count {
    position: absolute;
    right: -6px;
    bottom: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ad835a;
    color: #111;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #222;
}

.account-menu .account-menu__panel {
    min-width: 300px;
    max-width: 92vw;
    /* шапка закреплена — меню прокручивается само (высоту до низа экрана ставит accounts.js; это — запас без скрипта) */
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    background: #1d1d1d;
    border: 1px solid #3a3226;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

.account-menu .account-menu__panel,
.account-menu .account-menu__panel * {
    text-shadow: none !important;
}

.account-menu__current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 12px;
}

.account-menu__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.account-menu__name {
    color: #ecd19a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu__meta {
    color: #8d8d8d;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* уровень и поселение в игре — как .account-list__game на странице «Аккаунт» */
.account-menu__game {
    color: #ad835a;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu .account-menu__panel > li > a.account-menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #d8d8d8 !important;
    font-size: 14px;
    text-align: left !important;
    white-space: nowrap;
}

.account-menu .account-menu__panel > li > a.account-menu__link i,
.account-menu .account-menu__panel .account-menu__link--button i {
    width: 18px;
    color: #ad835a;
    text-align: center;
}

.account-menu .account-menu__panel > li > a.account-menu__link:hover,
.account-menu .account-menu__panel > li > a.account-menu__link:focus,
.account-menu .account-menu__panel .account-menu__link--button:hover,
.account-menu .account-menu__panel .account-menu__link--button:focus {
    background: #2a2622 !important;
    color: #fff !important;
    outline: none;
}

.account-menu .account-menu__panel .divider {
    margin: 6px 0;
    background-color: #333;
}

.account-menu__header {
    padding: 6px 16px 4px;
    color: #7c7c7c;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.account-menu__switch {
    margin: 0;
}

.account-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.account-menu__item:hover,
.account-menu__item:focus {
    background: #2a2622;
    outline: none;
}

.account-menu__item .account-menu__name {
    color: #d8d8d8;
    font-weight: 400;
}

/* узкий экран: меню раскрывается внутри панели навигации */
@media (max-width: 767px) {
    .navbar-nav .open .account-menu__panel {
        background: #1d1d1d !important;
        border: 1px solid #3a3226 !important;
        margin: 0 8px 8px;
        max-width: none;
    }

    /* панель навигации Bootstrap — не выше 340px: с меню аккаунта ей нужна высота экрана */
    .navbar-fixed-top .navbar-collapse {
        max-height: calc(100vh - 60px);
    }

    /* аватар в панели — посередине строки: счётчик рядом с ним, а не у края */
    .header-user .account-menu > .user-header-image .account-menu__count {
        right: auto;
        left: calc(50% + 8px);
    }
}

/* ---------------------------------------------------------------- окно входа: «Выберите аккаунт» */

.account-chooser {
    width: 300px;
    max-width: 100%;
    margin: 0 auto 16px;
}

.account-chooser__title {
    margin-bottom: 8px;
    color: #ecd19a;
    font-size: 15px;
    text-align: center;
}

.account-chooser__row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
}

.account-chooser__pick {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.account-chooser__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #3a3226;
    border-radius: 6px;
    background: rgba(0, 0, 0, .35);
    cursor: pointer;
    text-align: left;
}

.account-chooser__item:hover,
.account-chooser__item:focus {
    border-color: #ad835a;
    background: rgba(173, 131, 90, .12);
    outline: none;
}

.account-chooser__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.account-chooser__name {
    color: #e6e6e6;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-chooser__meta {
    color: #8d8d8d;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-chooser__forget-form {
    margin: 0;
}

.account-chooser__forget {
    height: 100%;
    width: 32px;
    border: 1px solid #3a3226;
    border-radius: 6px;
    background: rgba(0, 0, 0, .35);
    color: #8d8d8d;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.account-chooser__forget:hover {
    color: #fff;
    border-color: #7a3b3b;
}

.account-chooser__or {
    margin-top: 12px;
    color: #8d8d8d;
    font-size: 13px;
    text-align: center;
}

/* ---------------------------------------------------------------- страница «Аккаунт» */

.account-page {
    padding: 90px 0 60px;
    min-height: 70vh;
    background: #141414;
    color: #d8d8d8;
}

.account-page .section-name {
    margin: 0 0 24px;
    color: #ecd19a;
    text-align: center;
}

.account-card {
    max-width: 760px;
    margin: 0 auto 20px;
    padding: 20px 22px;
    background: #1d1d1d;
    border: 1px solid #3a3226;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}

.account-card--me {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.account-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.account-card__name {
    color: #ecd19a;
    font-size: 22px;
    line-height: 1.25;
    word-break: break-word;
}

.account-card__title {
    margin: 0 0 6px;
    color: #ecd19a;
    font-size: 18px;
}

.account-card__hint,
.account-card__lead {
    margin: 0 0 14px;
    color: #9a9a9a;
    font-size: 14px;
    line-height: 1.45;
}

.account-card__lead {
    color: #d8d8d8;
    font-size: 16px;
}

.account-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 14px;
    margin: 12px 0 0;
    font-size: 14px;
}

.account-facts dt {
    color: #8d8d8d;
    font-weight: 400;
}

.account-facts dd {
    margin: 0;
    color: #e6e6e6;
    word-break: break-word;
}

.account-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.account-card__actions form {
    margin: 0;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #ad835a;
    border-radius: 6px;
    background: transparent;
    color: #ecd19a !important;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none !important;
    cursor: pointer;
}

.account-btn:hover,
.account-btn:focus {
    background: rgba(173, 131, 90, .15);
    color: #fff !important;
    outline: none;
}

.account-btn--primary {
    background: #3f7d2c;
    border-color: #4f9a37;
    color: #fff !important;
}

.account-btn--primary:hover,
.account-btn--primary:focus {
    background: #4a9134;
}

.account-btn--ghost {
    border-color: #3a3a3a;
    color: #b5b5b5 !important;
}

.account-btn--small {
    padding: 5px 10px;
    font-size: 13px;
}

.account-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-list__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #2b2b2b;
}

.account-list__row:first-child {
    border-top: 0;
}

.account-list__who {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.account-list__name {
    color: #e6e6e6;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-list__meta {
    color: #8d8d8d;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-list__action {
    margin: 0;
    flex: 0 0 auto;
}

.account-badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(173, 131, 90, .18);
    color: #ecd19a;
    font-size: 12px;
}

.account-device-icon {
    width: 36px;
    flex: 0 0 auto;
    color: #ad835a;
    font-size: 20px;
    text-align: center;
}

@media (max-width: 600px) {
    .account-page {
        padding-top: 70px;
    }

    /* на телефоне у «Переключиться» — только значок: имя аккаунта не обрезается */
    .account-list__action .account-btn__text {
        display: none;
    }

    .account-card {
        margin-left: 0;
        margin-right: 0;
        padding: 16px;
    }

    .account-card--me {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .account-facts {
        text-align: left;
    }

    .account-card--me .account-card__actions {
        justify-content: center;
    }
}

/* уровень и поселение в игре (страница «Аккаунт») */
.account-list__game {
    color: #ad835a;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
