/**
 * ===================================
 * GunCult UI Kit - Profile Card
 * ===================================
 * 
 * Карточка профиля в стиле UI Kit
 * Без зависимости от Bootstrap grid
 */

/* Контейнер карточки профиля */
.gc-profile-card {
    position: relative;
    background: var(--surface-panel);
    border: none;
    border-radius: var(--radius-16);
    overflow: visible;
    margin-top: 0;
}

/* Обложка профиля */
.gc-profile-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: var(--gc-cover-aspect);
    overflow: visible; /* Позволяем аватару выходить за границы */
    border-radius: var(--radius-16) var(--radius-16) 0 0;
}

.gc-profile-cover {
    position: absolute;
    inset: 0;
    background-color: var(--surface-control);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-16) var(--radius-16) 0 0;
    overflow: hidden; /* Обрезаем только само изображение, не аватар */
}

/* Обложка как <img> (без inline background) — эпик / профиль */
.gc-profile-cover-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-16) var(--radius-16) 0 0;
}

/* Контент профиля */
.gc-profile-content {
    padding: var(--space-4);
    background: var(--surface-panel);
    border-radius: 0 0 var(--radius-16) var(--radius-16);
    position: relative;
    z-index: 1; /* Поверх обложки для правильного порядка */
}

/* Layout контента: аватар по нижнему краю рядом с текстом */
.gc-profile-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: end;
}

/* Колонка аватара */
.gc-profile-avatar-col {
    display: flex;
    justify-content: center;
    margin-top: -56px; /* Накладываем на обложку (под размер аватара ниже) */
}

/* Аватар в шапке карточки профиля (класс gc-avatar-128 — legacy-имя размера) */
.gc-profile-card .gc-avatar-128 {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    cursor: pointer;
    border: 3px solid var(--surface-panel);
    transition: box-shadow var(--transition-fast);
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {

.gc-profile-card .gc-avatar-128:hover {
    box-shadow: 0 0 0 2px var(--border-default);
}
}

/* Колонка информации */
.gc-profile-info-col {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Для текста с ellipsis */
}

/* Внутренний layout для main и actions */
.gc-profile-layout-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
}

/* Основная информация (имя, статус, мета) */
.gc-profile-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    flex: 1;
    min-width: 0;
}

/* Группа: Заголовок + Мета (маленький отступ между ними) */
.gc-profile-header-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    position: relative;
}

/* Действия (кнопки) */
.gc-profile-actions {
    display: flex;
    gap: var(--space-1);
    flex-shrink: 0;
}

.gc-profile-actions .gc-btn {
    white-space: nowrap;
}

.gc-profile-actions-wrap {
    flex-wrap: wrap;
}

.gc-profile-cover-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    max-width: 55%;
    height: auto;
    pointer-events: none;
}

/* Figma 1643:26665 — cover (rounded) + content на canvas; без обводки и общего panel-bg */
.gc-profile-hero {
    --gc-profile-hero-avatar-size: 88px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
}

.gc-profile-hero .gc-profile-cover-wrapper {
    border-radius: var(--radius-16);
    overflow: hidden;
}

.gc-profile-hero .gc-profile-cover {
    border-radius: 0;
}

.profile-rail-cover {
    position: relative;
    /* Слои фото (z-index: 2) не должны вылезать поверх overlay-скроллбара рейла. */
    isolation: isolate;
    width: 100%;
    aspect-ratio: var(--gc-cover-aspect);
    overflow: hidden;
    border-radius: 0;
    background: var(--surface-control);
}

.profile-rail-cover__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gc-context-rail .profile-rail-header {
    margin-top: calc(-1 * var(--profile-rail-widget-stack-gap));
    margin-inline: calc(-1 * var(--profile-rail-widget-inset-x));
}

.profile-rail-header__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    /* space/3 под именем → настрел; stack-gap между виджетами гасится ниже */
    padding: var(--space-4) var(--profile-rail-widget-inset-x, var(--space-4)) var(--space-3);
}

/*
 * Имя и мозаика настрела — одна identity-группа, не два виджета.
 * Гасим widget stack-gap: остаётся только padding-bottom body (space/3).
 */
.profile-show-sidebar-stack > .profile-rail-header + .profile-show-sidebar-stack__lead {
    margin-top: calc(-1 * var(--profile-rail-widget-stack-gap));
}

.profile-rail-header__name {
    margin: 0;
    font-size: var(--font-size-16);
    font-weight: 500;
    overflow-wrap: anywhere;
}

@media (min-width: 1280px) {
    .profile-show-main .gc-profile-hero > .gc-profile-cover-wrapper {
        display: none;
    }

    .profile-show-main .gc-profile-hero-body__profile {
        padding-top: 0;
    }
}

/*
 * Identity → about: space/4; внутри about (био → nav) — space/2.
 * Krehel: межгруппа ≥ 2× внутри группы.
 */
.gc-profile-hero-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

.gc-profile-hero-body__profile {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: var(--space-3);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Нет обложки (show без фото или list subpage) — identity сразу под page chrome */
.gc-profile-hero--no-cover .gc-profile-hero-body__profile {
    padding-top: 0;
}

.gc-profile-hero-body__identity {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/*
 * «О себе» под identity — без карточки (не speech-bubble / secondary+shadow).
 * Био + telegram / «В Шути с…» как supporting copy на page surface.
 */
.gc-profile-hero-body__about {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

.gc-profile-hero-body__nav,
.gc-profile-hero-body__stats {
    min-width: 0;
}

/* Hero + служебные подписи (preview /u/{username}) — один компактный блок перед виджетами */
.profile-show-intro {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.profile-show-intro .profile-intro-notice {
    margin: 0;
}

.profile-guest-preview-banner {
    position: sticky;
    top: calc(var(--layout-three-col-subheader-height) + var(--space-2));
    z-index: calc(var(--z-sticky) - 1);
    align-self: flex-start;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-4);
    margin-bottom: 0;
    line-height: 1.5;
    background: var(--gc-mobile-nav-title-pill-bg);
    backdrop-filter: blur(var(--gc-mobile-nav-glass-blur));
    -webkit-backdrop-filter: blur(var(--gc-mobile-nav-glass-blur));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    box-shadow: var(--gc-subheader-control-shadow, var(--gc-mobile-nav-icon-shadow));
}

.profile-guest-preview-banner .gc-toast-message {
    flex: 1 1 240px;
    min-width: 0;
}

.profile-guest-preview-banner.gc-toast > i:first-child {
    color: #000;
    opacity: 1;
}

.profile-guest-preview-banner__exit {
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .profile-guest-preview-banner {
        top: calc(env(safe-area-inset-top, 0px) + var(--gc-mobile-nav-header-row-min-height) + var(--space-2));
    }
}

.profile-show-intro .profile-intro-notice--callout {
    border-radius: var(--radius-16);
    background: var(--surface-panel);
    border: none;
}

.profile-show-intro .profile-intro-notice--callout .gc-callout-icon {
    font-size: var(--font-size-24);
    margin-top: 0;
    color: var(--text-secondary);
}

.gc-profile-bio {
    margin: 0;
    width: 100%;
    max-width: 40rem;
    box-sizing: border-box;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: calc(22 / 14);
    color: var(--text-primary);
    white-space: pre-wrap;
}

.gc-profile-hero-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.gc-profile-hero-nav-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: calc(22 / 14);
    text-decoration: none;
}

.gc-profile-hero-nav-item i,
.gc-profile-hero-nav-item .gc-post-attachment-brand {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    font-size: var(--font-size-16);
    line-height: 1;
}

.gc-profile-hero-nav-item--phone,
.gc-profile-hero-nav-item--telegram,
.gc-profile-hero-nav-item--max,
.gc-profile-hero-nav-item--vk {
    color: var(--tint-rose);
}

.gc-profile-hero-nav-item--phone i,
.gc-profile-hero-nav-item--telegram i,
.gc-profile-hero-nav-item--max .gc-post-attachment-brand,
.gc-profile-hero-nav-item--vk .gc-post-attachment-brand {
    color: var(--tint-rose);
}

.gc-profile-hero-nav-item--phone:hover,
.gc-profile-hero-nav-item--telegram:hover,
.gc-profile-hero-nav-item--max:hover,
.gc-profile-hero-nav-item--vk:hover {
    color: var(--tint-rose-deep);
}

.gc-profile-hero-nav-item--phone:hover i,
.gc-profile-hero-nav-item--telegram:hover i,
.gc-profile-hero-nav-item--max:hover .gc-post-attachment-brand,
.gc-profile-hero-nav-item--vk:hover .gc-post-attachment-brand {
    color: var(--tint-rose-deep);
}

.gc-profile-hero-nav-item--member-since {
    color: var(--text-primary);
}

.gc-profile-hero-nav-item--member-since i {
    color: var(--text-primary);
}

/* Figma 1643:26666 — одна горизонтальная строка; на узких экранах — scroll */
.gc-profile-hero-stats {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-2-5);
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gc-profile-hero-stats::-webkit-scrollbar {
    display: none;
}

/*
 * Stat chips на gray page: Surface/Secondary + radius-full.
 * Компактный pill (space/1 × space/3) — как Figma 1643:26666.
 */
.gc-profile-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
    min-width: 0;
    white-space: nowrap;
    padding: var(--space-1) var(--space-3);
    background: var(--surface-secondary);
    border: none;
    border-radius: var(--radius-full);
    box-sizing: border-box;
}

.gc-profile-hero-stat-value {
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: calc(22 / 14);
    color: var(--text-primary);
}

.gc-profile-hero-stat-label {
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: calc(22 / 14);
    color: var(--text-secondary);
}

.gc-profile-hero-stat-label-row {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}

.gc-profile-hero-stat--interactive {
    margin: 0;
    padding: var(--space-1) var(--space-3);
    border: none;
    background: var(--surface-secondary);
    color: inherit;
    font: inherit;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast) var(--ease-in-out);
}

.gc-profile-hero-stat--interactive:hover {
    background: var(--surface-interaction-row-hover);
}

.gc-profile-hero-stat--interactive:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
}

/* Интерактивный чип — шеврон всегда виден (не резервируем «пустой» слот под hover) */
.gc-profile-hero-stat--interactive .weapon-card-chevron {
    opacity: 1;
    transform: none;
}

@media (max-width: 767.98px) {
    .gc-profile-hero-stat--interactive .weapon-card-chevron {
        display: inline-flex;
    }
}

.gc-profile-hero__shooting-partners {
    min-width: 0;
    padding: 0 var(--space-4) var(--space-4);
}

.gc-profile-shooting-partners-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin: 0;
    padding: var(--space-2) 0 0;
    border: 0;
    border-top: 1px solid var(--border-subtle);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: var(--radius-8);
    transition: background var(--transition-fast) var(--ease-in-out);
}

.gc-profile-shooting-partners-trigger:hover {
    background: var(--gc-interactive-hover-bg);
}

.gc-profile-shooting-partners-trigger:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
}

.gc-profile-shooting-partners-trigger__avatars {
    flex-shrink: 0;
}

.gc-profile-shooting-partners-trigger__avatars > * {
    pointer-events: none;
}

.gc-profile-shooting-partners-trigger__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.gc-profile-shooting-partners-trigger__title {
    font-size: var(--font-size-15);
    font-weight: 500;
    line-height: var(--line-height-list-title);
    color: var(--text-primary);
}

.gc-profile-shooting-partners-trigger__meta {
    font-size: var(--font-size-13);
    line-height: var(--line-height-list-meta);
    color: var(--text-secondary);
}

.gc-profile-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-width: 0;
    width: 100%;
}

.gc-profile-identity-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    flex: 1 1 auto;
}

.gc-profile-hero .gc-profile-identity,
.channel-shooter .gc-profile-identity {
    align-items: flex-start;
}

.gc-profile-identity-avatar {
    position: relative;
    width: var(--gc-profile-hero-avatar-size, var(--space-16));
    height: var(--gc-profile-hero-avatar-size, var(--space-16));
    object-fit: cover;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.gc-profile-identity-avatar.gc-list-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-32);
    font-weight: 600;
    line-height: 1;
    color: var(--text-on-solid);
}

.gc-profile-identity-avatar[onclick] {
    cursor: pointer;
}

.gc-profile-identity-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.gc-profile-hero .gc-profile-identity-main > .gc-profile-header-group {
    flex: 1 1 auto;
    min-width: 0;
}

.gc-profile-identity-actions {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 0;
}

.gc-profile-hero .gc-profile-header-group,
.channel-shooter .gc-profile-header-group {
    gap: var(--space-product-2);
}

.gc-profile-hero .gc-profile-name,
.channel-shooter .gc-profile-name {
    margin: 0;
    font-size: var(--type-heading-h4-size);
    font-weight: 500;
    line-height: calc(22 / 16);
    white-space: normal;
    overflow-wrap: anywhere;
}

.channel-shooter a.gc-profile-name {
    color: inherit;
    text-decoration: none;
}

.gc-profile-hero .gc-profile-meta {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: calc(22 / 14);
    gap: var(--space-1);
    flex-wrap: nowrap;
    white-space: nowrap;
}

.gc-profile-hero .gc-profile-meta-id {
    color: var(--text-secondary);
    font-weight: 400;
}

.gc-profile-hero .gc-profile-meta-id--copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    /* Визуал как текст; хит ≥40px (desktop aim) через pad + negative margin */
    padding: var(--space-2) var(--space-1-5);
    margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-1-5));
    min-height: calc(var(--space-8) + var(--space-2));
    border: 0;
    border-radius: var(--radius-8);
    background: none;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    text-align: inherit;
    color: inherit;
    transition: color var(--transition-fast);
}

.gc-profile-hero .gc-profile-meta-id--copy:hover,
.gc-profile-hero .gc-profile-meta-id--copy:focus-visible,
.gc-profile-hero .gc-profile-meta-id--copy.is-copied {
    color: var(--text-primary);
}

.gc-profile-hero .gc-profile-meta-id__check {
    font-size: var(--font-size-14);
    line-height: 1;
    animation: gc-btn-copy-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.gc-profile-hero .gc-profile-meta a {
    font-weight: 400;
}

.gc-profile-hero .name-history-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0;
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    line-height: calc(22 / 16);
}

.gc-profile-hero .name-history-trigger:hover,
.gc-profile-hero .name-history-trigger[aria-expanded="true"] {
    background-color: transparent;
    color: inherit;
}

.gc-profile-hero .name-history-trigger[aria-expanded="true"] .name-history-trigger-caret {
    color: var(--text-secondary);
}

/* Legacy subpage shell — старая карточка в одном блоке */
.gc-profile-card-figma .gc-profile-content {
    padding: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.gc-profile-card-figma .gc-profile-layout {
    gap: var(--space-4);
}

.gc-profile-card-figma .gc-profile-layout-inner {
    align-items: center;
}

.gc-profile-menu-btn {
    padding: 0;
    justify-content: center;
    align-items: center;
}

.gc-profile-menu-btn i {
    font-size: var(--font-size-14);
}

.gc-profile-edit-btn {
    min-height: 28px;
    padding: var(--space-2) var(--space-2);
    gap: var(--space-1);
    align-items: center;
}

.gc-profile-edit-btn i {
    font-size: var(--font-size-13);
}

/* Группа заголовка и метаданных (deprecated, использовать gc-profile-main) */
.gc-profile-title-group {
    display: flex;
    flex-direction: column;
}

/* Имя пользователя / Заголовок */
.gc-profile-name,
.gc-profile-title {
    flex: 1;
    min-width: 0;
}

/* Статус */
.gc-profile-status {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
}

/* Метаданные (ID, Telegram) */
.gc-profile-meta {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
    font-size: var(--font-size-13);
    color: var(--text-primary);
    font-weight: 400;
    margin: 0;
}

.gc-profile-meta-separator {
    color: var(--text-secondary);
}

.gc-profile-meta a {
    color: var(--accent-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.gc-profile-meta a:hover {
    color: var(--accent-link-hover);
}

/* Адаптивность */
@media (max-width: 768px) {
    .gc-profile-card .gc-profile-layout,
    .gc-profile-card-figma .gc-profile-layout {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    
    .gc-profile-card .gc-profile-avatar-col,
    .gc-profile-card-figma .gc-profile-avatar-col {
        margin-top: -48px;
    }
    
    .gc-avatar-150 {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }
    
    /*
     * Центрирование и скрытие actions — только legacy .gc-profile-card (канал и т.п.).
     * Hero (1643:26666) — горизонтальная строка на всех брейкпоинтах.
     */
    .gc-profile-card .gc-profile-layout .gc-profile-layout-inner,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-layout-inner {
        flex-direction: column;
        align-items: center;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-main,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-main {
        align-items: center;
        text-align: center;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-actions,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-actions {
        display: none;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-name,
    .gc-profile-card .gc-profile-layout .gc-profile-title,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-name,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-title {
        text-align: center;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-main .name-history-trigger,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-main .name-history-trigger {
        justify-content: center;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-status,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-status {
        text-align: center;
    }

    .gc-profile-card .gc-profile-layout .gc-profile-meta,
    .gc-profile-card-figma .gc-profile-layout .gc-profile-meta {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .gc-profile-cover-wrapper {
        aspect-ratio: var(--gc-cover-aspect);
    }
    
    .gc-profile-avatar-col {
        margin-top: -40px;
    }
    
    .gc-avatar-150 {
        width: 100px;
        height: 100px;
    }
}

/* ─── История имён: имя + шеврон — один элемент ─────────────────────────── */

.name-history-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-1);
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: var(--space-product-2) var(--space-2);
    margin-inline: calc(-1 * var(--space-2));
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    border-radius: var(--radius-8);
    line-height: inherit;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.name-history-trigger-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.name-history-trigger:hover {
    background-color: var(--surface-control);
}

.name-history-trigger[aria-expanded="true"] {
    color: var(--accent-link);
    background-color: rgba(var(--accent-link-rgb), 0.08);
}

.name-history-trigger[aria-expanded="true"] .name-history-trigger-caret {
    color: var(--accent-link);
}

.name-history-trigger-caret {
    flex-shrink: 0;
    font-size: var(--font-size-13);
    color: var(--text-secondary);
}

/* Дропдаун истории имён: тот же список, что «Предстоящие» / «История мероприятий» (gc-event-feed-list) */

.name-history-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--space-2);
    min-width: min(100vw - var(--space-8), 320px);
    max-width: min(100vw - var(--space-8), 380px);
    display: none;
    z-index: var(--z-dropdown);
    background: var(--surface-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    box-shadow: var(--shadow-md);
    padding: var(--space-2);
}

.name-history-menu.show {
    display: block;
    animation: gc-fade-in-down 120ms var(--ease-out);
}

@keyframes gc-fade-in-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.name-history-content {
    max-height: min(320px, 50vh);
    overflow-y: auto;
}

.name-history-loading {
    padding: var(--space-4);
    text-align: center;
}

.name-history-loading-hint {
    font-size: var(--font-size-14);
    color: var(--text-secondary);
}

.name-history-empty-msg {
    margin: 0;
    padding: var(--space-4);
    text-align: center;
    font-size: var(--font-size-14);
    color: var(--text-secondary);
}

/* ─── Сообщества / организаторы — ряд чипов (карточка эпика / легаси, Figma: md-radius, outline) ─ */

.gc-organizers-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    row-gap: var(--space-2);
}

.gc-organizer-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 28px;
    padding: var(--space-2) var(--space-2);
    box-sizing: border-box;
    background: var(--surface-control);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-8);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--font-size-13);
    font-weight: 500;
    line-height: var(--line-height-list-title);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    max-width: 220px;
}

.gc-organizer-tag > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.gc-organizer-tag:hover {
    background: color-mix(in srgb, var(--fill-primary) 6%, transparent);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.gc-organizer-tag-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Иконка-сообщество в чипе: тот же размер, что аватар 20px */
.gc-organizer-tag .gc-list-avatar-icon.xs.gc-organizer-tag-avatar {
    --gc-list-media-size: 20px;
    --gc-list-media-glyph-size: var(--font-size-13);
    --gc-list-media-icon-padding: var(--space-2);
    --gc-list-media-mask-inset: 1px;
}

/* Модификатор: «ещё N» — вторичный контур */
.gc-organizer-tag-more {
    cursor: default;
    background: transparent;
    border-style: dashed;
    color: var(--text-secondary);
    font-size: var(--font-size-13);
}

.gc-organizer-tag-more:hover {
    background: var(--surface-control);
    border-style: solid;
    color: var(--accent-link);
}

@media (max-width: 768px) {
    .gc-organizer-tag {
        min-height: 32px;
        padding: var(--space-1) var(--space-2);
        max-width: 200px;
    }

    .gc-organizer-tag-avatar,
    .gc-organizer-tag .gc-list-avatar-icon.xs.gc-organizer-tag-avatar {
        --gc-list-media-size: 24px;
        width: 24px;
        height: 24px;
    }
}
