/* ==========================================================================
   Публичные профили пользователей, уникальные ID и модальное окно активности
   (reboot-child / inc/user-profile.php)
   ========================================================================== */

/* --- 1. Элементы в блоке комментариев --- */
.cm__ava-link {
    display: block;
    border-radius: 50%;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cm__ava-link:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px rgba(45, 129, 224, .35);
}
.cm__name--link {
    color: #1c1c1c !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: color .15s ease;
}
.cm__name--link:hover {
    color: #2d81e0 !important;
    text-decoration: underline !important;
}
.cm__uid {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 6px;
    background: #eef2f6;
    color: #5c626d;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .15s, color .15s;
    user-select: none;
}
.cm__uid:hover {
    background: #dbe7f7;
    color: #1f6fcb;
}
.cm__badge--guest {
    background: #f0f1f4;
    color: #8c9099;
}

/* --- 2. Статусы активности (Онлайн / Офлайн) --- */
.mos77-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.mos77-status-dot.is-online {
    background: #1aa356;
    box-shadow: 0 0 0 2px rgba(26, 163, 86, .25);
    animation: mos77-pulse 2s infinite;
}
.mos77-status-dot.is-offline {
    background: #a3a8b0;
}
@keyframes mos77-pulse {
    0% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(26, 163, 86, .5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(26, 163, 86, 0); }
    100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(26, 163, 86, 0); }
}

.mos77-badge-uid {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef4fd;
    color: #2d81e0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.mos77-badge-role {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f3f4f7;
    color: #555861;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* --- 3. Модальное окно профиля (всплывающее при клике в комментариях) --- */
.mos77-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.mos77-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.mos77-modal-window {
    background: #fff;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    border-radius: 20px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .3);
    transform: translateY(18px) scale(.98);
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1c1c1c;
}
.mos77-modal-overlay.is-active .mos77-modal-window {
    transform: translateY(0) scale(1);
}
.mos77-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .9);
    color: #333;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: background .15s, transform .15s;
}
.mos77-modal-close:hover {
    background: #fff;
    transform: scale(1.08);
}

/* Содержимое карточки в модальном окне */
.mos77-modal-card__cover {
    height: 84px;
    background: linear-gradient(130deg, #5b9bf8 0%, #2d81e0 45%, #7650f0 100%);
}
.mos77-modal-card__header {
    position: relative;
    padding: 0 22px 18px;
}
.mos77-modal-card__user-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -42px;
    margin-bottom: 12px;
    gap: 12px;
}
.mos77-modal-card__avatar {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.mos77-modal-card__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #f0f2f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.mos77-status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #fff;
}
.mos77-status-indicator--online {
    background: #1aa356;
}
.mos77-modal-card__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 6px;
}
.mos77-modal-card__name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 6px !important;
    color: #1c1c1c;
}
.mos77-modal-card__status-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #656b75;
}
.mos77-status-text.is-online {
    color: #138743;
    font-weight: 600;
}
.mos77-modal-card__bio {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f7f8fa;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #4b515d;
}

/* Статистика в модалке */
.mos77-modal-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px 22px;
    background: #f9fafb;
    border-top: 1px solid #eef1f5;
    border-bottom: 1px solid #eef1f5;
}
.mos77-stat-tile {
    text-align: center;
}
.mos77-stat-tile__value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: #1c1c1c;
}
.mos77-stat-tile__value.is-pos { color: #1aa356; }
.mos77-stat-tile__value.is-neg { color: #d23b3b; }
.mos77-stat-tile__label {
    font-size: 11px;
    color: #7b818d;
    margin-top: 3px;
    text-transform: lowercase;
}

/* Список комментариев в модалке */
.mos77-modal-card__comments {
    padding: 18px 22px 14px;
}
.mos77-modal-card__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.mos77-modal-card__section-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 !important;
    color: #1c1c1c;
}
.mos77-modal-card__all-link {
    font-size: 12px;
    font-weight: 600;
    color: #2d81e0 !important;
    text-decoration: none !important;
}
.mos77-modal-card__all-link:hover { text-decoration: underline !important; }
.mos77-modal-comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mos77-modal-comment-item {
    background: #f8fafc;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 10px 12px;
    transition: background .15s, border-color .15s;
}
.mos77-modal-comment-item:hover {
    background: #f1f5fa;
    border-color: #d8e2f0;
}
.mos77-modal-comment-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 12px;
}
.mos77-modal-comment-item__post-title {
    font-weight: 600;
    color: #1f6fcb !important;
    text-decoration: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mos77-modal-comment-item__post-title:hover {
    text-decoration: underline !important;
}
.mos77-modal-comment-item__cat {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    margin-right: 4px;
    text-transform: uppercase;
}
.mos77-modal-comment-item__time {
    color: #94a3b8;
    white-space: nowrap;
    font-size: 11px;
}
.mos77-modal-comment-item__text {
    font-size: 13px;
    line-height: 1.4;
    color: #334155;
    font-style: italic;
}
.mos77-modal-card__empty {
    padding: 20px;
    text-align: center;
    color: #8c93a0;
    font-size: 13px;
    background: #f9fafb;
    border-radius: 10px;
}

/* Кнопки в футере модалки */
.mos77-modal-card__footer {
    display: flex;
    gap: 10px;
    padding: 14px 22px 20px;
    border-top: 1px solid #f0f2f5;
}
.mos77-modal-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .15s, transform .1s;
    text-align: center;
}
.mos77-modal-btn--primary {
    background: #2d81e0;
    color: #fff !important;
}
.mos77-modal-btn--primary:hover {
    background: #1f6fcb;
}
.mos77-modal-btn--secondary {
    background: #f1f4f8;
    color: #334155 !important;
}
.mos77-modal-btn--secondary:hover {
    background: #e4e9f0;
}
.mos77-modal-btn:active {
    transform: scale(.98);
}

/* Скелетон загрузки */
.mos77-modal-skeleton {
    padding: 40px 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}
.mos77-modal-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(45, 129, 224, .2);
    border-top-color: #2d81e0;
    border-radius: 50%;
    animation: mos77-spin .8s linear infinite;
    margin-bottom: 12px;
}
@keyframes mos77-spin {
    to { transform: rotate(360deg); }
}


/* --- 4. Полная отдельная страница профиля (/user/{id}/) --- */
.mos77-user-profile-page {
    background: #f5f7fa;
    min-height: 100vh;
    padding-bottom: 50px;
}
.mos77-profile-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 16px 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1c1c1c;
}

.mos77-profile-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7b818d;
    margin-bottom: 14px;
}
.mos77-profile-breadcrumbs a {
    color: #7b818d !important;
    text-decoration: none !important;
    transition: color .15s;
}
.mos77-profile-breadcrumbs a:hover {
    color: #2d81e0 !important;
}
.mos77-profile-breadcrumbs .sep {
    color: #cbd5e1;
}
.mos77-profile-breadcrumbs .cur {
    color: #1c1c1c;
    font-weight: 500;
}

/* Главный блок Hero на странице */
.mos77-profile-hero {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    margin-bottom: 18px;
}
.mos77-profile-hero__cover {
    height: 150px;
    background: linear-gradient(120deg, #6aa8f7 0%, #2d81e0 45%, #7b5cf0 100%);
    background-size: 200% 200%;
}
.mos77-profile-hero__body {
    padding: 0 28px 24px;
}
.mos77-profile-hero__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: -50px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.mos77-profile-hero__avatar-box {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}
.mos77-profile-hero__avatar-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.mos77-profile-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}
.mos77-profile-hero__name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.mos77-profile-hero__name {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: #1c1c1c !important;
}
.mos77-profile-hero__status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 14px;
}
.mos77-dot-divider {
    color: #cbd5e1;
}
.mos77-profile-hero__about {
    margin-top: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
    max-width: 720px;
}

/* Статистика на странице */
.mos77-profile-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #edf1f6;
}
.mos77-stat-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #f1f4f9;
}
.mos77-stat-card__icon {
    font-size: 26px;
    line-height: 1;
}
.mos77-stat-card__num {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}
.mos77-stat-card__num.is-pos { color: #16a34a; }
.mos77-stat-card__num.is-neg { color: #dc2626; }
.mos77-stat-card__text {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

/* Секции контента (Комментарии, Статьи) */
.mos77-profile-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    margin-bottom: 18px;
}
.mos77-profile-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.mos77-profile-section__title {
    font-size: 20px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mos77-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4fd;
    color: #2d81e0;
    font-size: 13px;
    font-weight: 700;
}

/* Лента комментариев на странице */
.mos77-profile-comments-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mos77-profile-comment-card {
    background: #fafbfe;
    border: 1px solid #edf1f7;
    border-radius: 14px;
    padding: 16px 20px;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.mos77-profile-comment-card:hover {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}
.mos77-profile-comment-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.mos77-profile-comment-card__post-link {
    font-size: 15px;
    font-weight: 700;
    color: #1e40af !important;
    text-decoration: none !important;
}
.mos77-profile-comment-card__post-link:hover {
    text-decoration: underline !important;
}
.mos77-profile-comment-card__cat {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 6px;
}
.mos77-profile-comment-card__time {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}
.mos77-profile-comment-card__content {
    font-size: 15px;
    line-height: 1.55;
    color: #334155;
    margin-bottom: 12px;
}
.mos77-profile-comment-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}
.mos77-profile-comment-card__rating {
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}
.mos77-profile-comment-card__rating.is-pos { background: #dcfce7; color: #15803d; }
.mos77-profile-comment-card__rating.is-neg { background: #fee2e2; color: #b91c1c; }
.mos77-profile-comment-card__go {
    font-weight: 600;
    color: #2d81e0 !important;
    text-decoration: none !important;
}
.mos77-profile-comment-card__go:hover {
    text-decoration: underline !important;
}

/* Статьи автора на странице */
.mos77-profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.mos77-profile-post-card {
    border: 1px solid #edf1f7;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    gap: 12px;
    padding: 12px;
}
.mos77-profile-post-card__thumb {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.mos77-profile-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mos77-profile-post-card__body {
    flex: 1;
    min-width: 0;
}
.mos77-profile-post-card__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
}
.mos77-profile-post-card__title a {
    color: #1e293b !important;
    text-decoration: none !important;
}
.mos77-profile-post-card__title a:hover {
    color: #2d81e0 !important;
}
.mos77-profile-post-card__meta {
    font-size: 12px;
    color: #94a3b8;
}

/* Пустые состояния */
.mos77-profile-empty {
    text-align: center;
    padding: 36px 16px;
    color: #64748b;
}
.mos77-profile-empty__icon {
    font-size: 40px;
    margin-bottom: 8px;
}
.mos77-profile-empty__title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.mos77-profile-empty__desc {
    font-size: 14px;
    margin: 0;
}

/* --- 5. Элементы интеграции в личном кабинете (/lk/) --- */
.lk-hero__uid-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef4fd;
    color: #2d81e0;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}
.lk-head__uid {
    font-size: 11px;
    font-weight: 600;
    background: #eef4fd;
    color: #2d81e0;
    padding: 1px 6px;
    border-radius: 5px;
    margin-left: 4px;
}
.lk-profile-id-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f7f9fc 100%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.lk-profile-id-banner__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lk-profile-id-banner__label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.lk-profile-id-banner__id {
    font-size: 24px;
    font-weight: 900;
    color: #2563eb;
    letter-spacing: .02em;
}
.lk-profile-id-banner__hint {
    font-size: 13px;
    color: #64748b;
}

/* --- 6. Адаптивность для мобильных устройств --- */
@media (max-width: 768px) {
    .mos77-profile-hero__body {
        padding: 0 16px 20px;
    }
    .mos77-profile-hero__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .mos77-profile-posts-grid {
        grid-template-columns: 1fr;
    }
    .mos77-profile-section {
        padding: 18px 16px;
    }
    .mos77-modal-window {
        max-height: 85vh;
        border-radius: 16px;
    }
    .mos77-modal-card__header,
    .mos77-modal-card__stats,
    .mos77-modal-card__comments,
    .mos77-modal-card__footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .mos77-profile-hero__name {
        font-size: 22px !important;
    }
    .mos77-modal-card__footer {
        flex-direction: column;
    }
}
