/*
 * PEA-CMS — стена сообщества, страница ленты.
 * Подключать на /wall. Не подключать вместе с wall_detail.css.
 */

.wall-hero,
.wall-create-card,
.wall-login-card,
.wall-feed,
.wall-empty,
.wall-pagination-info {
    --wall-card-bg: #11161d;
    --wall-card-hover: #16202b;
    --wall-input-bg: #0d1219;
    --wall-hero-start: #0d1219;
    --wall-hero-end: #0b0f14;
    --wall-border: #293440;
    --wall-text: #e6edf3;
    --wall-muted: #9aa4b2;
    --wall-accent: #78b5ff;
    --wall-accent-bg: rgba(88, 166, 255, 0.13);
    --wall-success: #3fb950;
    --wall-error: #f85149;
    --wall-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

:root[data-theme="light"] .wall-hero,
:root[data-theme="light"] .wall-create-card,
:root[data-theme="light"] .wall-login-card,
:root[data-theme="light"] .wall-feed,
:root[data-theme="light"] .wall-empty,
:root[data-theme="light"] .wall-pagination-info {
    --wall-card-bg: #ffffff;
    --wall-card-hover: #f7faff;
    --wall-input-bg: #f7faff;
    --wall-hero-start: #ffffff;
    --wall-hero-end: #eaf2fc;
    --wall-border: rgba(15, 23, 42, 0.14);
    --wall-text: #172033;
    --wall-muted: #596a80;
    --wall-accent: #1f63bd;
    --wall-accent-bg: rgba(37, 99, 235, 0.10);
    --wall-success: #17833b;
    --wall-error: #c72e35;
    --wall-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* Шапка */

.wall-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 170px;
    margin: 0 0 1.5rem;
    padding: 1.875rem 2.125rem;
    overflow: hidden;
    color: var(--wall-text);
    background:
        radial-gradient(
            600px 300px at 95% 0%,
            var(--wall-accent-bg),
            transparent 75%
        ),
        linear-gradient(
            135deg,
            var(--wall-hero-start),
            var(--wall-hero-end)
        );
    border: 1px solid var(--wall-border);
    border-radius: 18px;
    box-shadow: var(--wall-shadow);
}

.wall-hero > div:first-child {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 760px;
}

.wall-hero .eyebrow {
    margin: 0 0 0.5rem;
    color: var(--wall-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.wall-hero h1 {
    margin: 0;
    color: var(--wall-text);
    font-size: clamp(1.625rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
}

.wall-hero h1 + p {
    max-width: 68ch;
    margin: 0.75rem 0 0;
    color: var(--wall-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.wall-hero-stats {
    margin-top: 1.125rem;
}

.wall-hero-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--wall-muted);
    background: var(--wall-accent-bg);
    border: 1px solid var(--wall-border);
    border-radius: 10px;
    font-size: 0.8125rem;
}

.wall-hero-stats strong {
    color: var(--wall-text);
    font-size: 0.9375rem;
}

.wall-hero-symbol {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 4.75rem;
    height: 4.75rem;
    color: var(--wall-accent);
    background: var(--wall-accent-bg);
    border: 1px solid var(--wall-border);
    border-radius: 18px;
    font-size: 2.125rem;
    line-height: 1;
    user-select: none;
}

/* Уведомления: классы уже используются в wall.php */

.profile-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.profile-alert > span {
    flex: 0 0 auto;
    font-weight: 800;
}

.profile-alert > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-alert-success {
    color: #7ee787;
    background: rgba(63, 185, 80, 0.10);
    border: 1px solid rgba(63, 185, 80, 0.35);
}

.profile-alert-error {
    color: #ff9b94;
    background: rgba(248, 81, 73, 0.10);
    border: 1px solid rgba(248, 81, 73, 0.35);
}

:root[data-theme="light"] .profile-alert-success {
    color: #176934;
}

:root[data-theme="light"] .profile-alert-error {
    color: #a9272e;
}

/* Карточки страницы */

.wall-create-card,
.wall-login-card,
.wall-empty,
.wall-feed,
.wall-post {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.wall-create-card,
.wall-login-card,
.wall-empty,
.wall-post {
    background: var(--wall-card-bg);
    border: 1px solid var(--wall-border);
    border-radius: 18px;
    box-shadow: var(--wall-shadow);
}

.wall-create-card,
.wall-login-card,
.wall-empty {
    margin: 0 0 1.5rem;
    padding: 1.75rem 2.125rem;
}

/* Композитор */

.wall-composer {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            600px 280px at 0% 0%,
            var(--wall-accent-bg),
            transparent 70%
        ),
        var(--wall-card-bg);
}

.wall-composer::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(
        90deg,
        transparent,
        var(--wall-accent),
        transparent
    );
    opacity: 0.7;
}

.wall-composer-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.wall-create-avatar {
    display: block;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 3.125rem;
    height: 3.125rem;
    object-fit: cover;
    border: 2px solid var(--wall-border);
    border-radius: 50%;
}

.wall-composer-header > div {
    min-width: 0;
}

.wall-composer-header .eyebrow {
    margin: 0 0 0.2rem;
    color: var(--wall-accent);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.wall-composer-header h2 {
    margin: 0;
    color: var(--wall-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.wall-create-form {
    display: grid;
    gap: 0.75rem;
}

.wall-composer-editor {
    min-width: 0;
    overflow: hidden;
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 14px;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.wall-composer-editor:focus-within {
    border-color: var(--wall-accent);
    box-shadow: 0 0 0 3px var(--wall-accent-bg);
}

.wall-composer-editor textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 8rem;
    padding: 0.875rem 1rem 0.625rem;
    color: var(--wall-text);
    background: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.55;
    resize: vertical;
    outline: none;
}

.wall-composer-editor textarea::placeholder,
.wall-link-composer > input::placeholder {
    color: var(--wall-muted);
    opacity: 0.8;
}

.wall-composer-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.875rem 0.625rem;
    color: var(--wall-muted);
    background: var(--wall-card-bg);
    border-top: 1px solid var(--wall-border);
}

.wall-character-counter {
    flex: 0 0 auto;
    color: var(--wall-muted);
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
}

.wall-character-counter.is-limit {
    color: var(--wall-error);
    font-weight: 700;
}

.wall-composer-hint {
    min-width: 0;
    overflow: hidden;
    color: var(--wall-muted);
    font-size: 0.6875rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Добавление ссылки */

.wall-link-composer[hidden] {
    display: none;
}

.wall-link-composer {
    min-width: 0;
    padding: 0.75rem;
    background: var(--wall-accent-bg);
    border: 1px solid var(--wall-border);
    border-radius: 12px;
}

.wall-link-composer-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.625rem;
    align-items: center;
    margin-bottom: 0.625rem;
}

.wall-link-composer-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--wall-accent);
    background: var(--wall-card-bg);
    border: 1px solid var(--wall-border);
    border-radius: 9px;
    font-size: 1rem;
}

.wall-link-composer-top > div {
    display: grid;
    min-width: 0;
    gap: 0.125rem;
}

.wall-link-composer-top strong,
.wall-link-composer-top small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wall-link-composer-top strong {
    color: var(--wall-text);
    font-size: 0.8125rem;
}

.wall-link-composer-top small {
    color: var(--wall-muted);
    font-size: 0.6875rem;
}

.wall-link-remove-button {
    display: grid;
    place-items: center;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    color: var(--wall-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wall-link-remove-button:hover {
    color: var(--wall-error);
    background: rgba(248, 81, 73, 0.10);
    border-color: rgba(248, 81, 73, 0.3);
}

.wall-link-composer > input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 0.625rem 0.75rem;
    color: var(--wall-text);
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 9px;
    font: inherit;
    font-size: 0.8125rem;
    outline: none;
}

.wall-link-composer > input:focus {
    border-color: var(--wall-accent);
    box-shadow: 0 0 0 3px var(--wall-accent-bg);
}

/* Панель композитора */

.wall-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding-top: 0.25rem;
}

.wall-composer-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.wall-composer-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.375rem;
    padding: 0.5rem 0.75rem;
    color: var(--wall-muted);
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease;
}

.wall-composer-tool:hover,
.wall-composer-tool:focus-within {
    color: var(--wall-text);
    background: var(--wall-accent-bg);
    border-color: var(--wall-accent);
}

.wall-composer-tool input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.wall-composer-tool:focus-within {
    outline: 2px solid var(--wall-accent);
    outline-offset: 2px;
}

.wall-publish-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.375rem;
    padding: 0.5rem 1rem;
    color: var(--pea-primary-text);
    background: linear-gradient(135deg, #2f81f7, #1f6feb);
    border: 1px solid #276bd0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        filter 0.12s ease,
        transform 0.12s ease;
}

.wall-publish-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.wall-publish-button:active {
    transform: translateY(0);
}

.wall-composer-rules {
    margin: 0;
    color: var(--wall-muted);
    font-size: 0.6875rem;
    line-height: 1.5;
}

/* Вход и пустое состояние */

.wall-login-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
}

.wall-login-card-icon,
.wall-empty > div {
    color: var(--wall-accent);
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.65;
}

.wall-login-card h2,
.wall-empty h2 {
    margin: 0 0 0.375rem;
    color: var(--wall-text);
    font-size: 1.125rem;
    font-weight: 700;
}

.wall-login-card p,
.wall-empty p {
    margin: 0;
    color: var(--wall-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.wall-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--wall-accent);
    background: var(--wall-accent-bg);
    border: 1px solid var(--wall-border);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.wall-login-button:hover {
    border-color: var(--wall-accent);
}

.wall-empty {
    text-align: center;
}

.wall-empty > div {
    margin-bottom: 0.875rem;
}

/* Лента и карточка публикации */

.wall-feed {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.125rem;
    margin: 0;
    padding: 0;
}

.wall-post {
    margin: 0;
    padding: 1.75rem 2.125rem;
    overflow: hidden;
}

.wall-post.is-pinned {
    background:
        linear-gradient(
            to bottom,
            var(--wall-accent-bg),
            var(--wall-card-bg)
        );
    border-color: var(--wall-accent);
}

.wall-post-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1.125rem;
}

.wall-post-avatar-link {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
}

.wall-post-avatar {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid var(--wall-border);
    border-radius: 50%;
}

.wall-post-author {
    min-width: 0;
}

.wall-post-author-line,
.wall-post-date-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wall-post-author-name {
    color: var(--wall-text);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.wall-post-author-name:hover,
.wall-post-date:hover {
    text-decoration: underline;
}

.wall-post-staff-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    color: var(--wall-accent);
    background: var(--wall-accent-bg);
    border: 1px solid var(--wall-border);
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

.wall-post-author-username {
    display: block;
    width: fit-content;
    margin-top: 0.125rem;
    color: var(--wall-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.wall-post-author-username:hover {
    color: var(--wall-text);
}

.wall-post-date-row {
    margin-top: 0.25rem;
    color: var(--wall-muted);
    font-size: 0.75rem;
}

.wall-post-pinned {
    color: var(--wall-accent);
    font-weight: 700;
}

.wall-post-date {
    color: var(--wall-muted);
    text-decoration: none;
}

.wall-post-edited {
    font-style: italic;
    opacity: 0.85;
}

.wall-post-delete-form,
.wall-reaction-form {
    margin: 0;
}

.wall-post-delete-button {
    display: grid;
    place-items: center;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    color: var(--wall-muted);
    background: transparent;
    border: 1px solid var(--wall-border);
    border-radius: 8px;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wall-post-delete-button:hover {
    color: var(--wall-error);
    background: rgba(248, 81, 73, 0.10);
    border-color: var(--wall-error);
}

.wall-post-body {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 0.875rem;
    padding: 0.75rem 0.875rem;
    color: var(--wall-text);
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: normal;
}

.wall-post-attachments {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin: 0 0 0.875rem;
}

.wall-image-link {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--wall-border);
    border-radius: 12px;
}

.wall-post-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background: var(--wall-input-bg);
}

.wall-post-video,
.wall-post-audio {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--wall-border);
    border-radius: 12px;
}

.wall-post-video {
    background: #000000;
}

.wall-youtube-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 1px solid var(--wall-border);
    border-radius: 12px;
}

.wall-youtube-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Карточки Steam и внешних ссылок */

.wall-steam-card,
.wall-link-card {
    display: grid;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.75rem;
    color: var(--wall-text);
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 12px;
    text-decoration: none;
    transition:
        border-color 0.12s ease,
        transform 0.12s ease;
}

.wall-steam-card:hover,
.wall-link-card:hover {
    border-color: var(--wall-accent);
    transform: translateY(-1px);
}

.wall-steam-card {
    grid-template-columns: 120px minmax(0, 1fr) auto;
}

.wall-steam-card img {
    display: block;
    width: 120px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.wall-steam-card-content,
.wall-link-card-content {
    display: grid;
    min-width: 0;
    gap: 0.25rem;
}

.wall-steam-card-content strong,
.wall-link-card-content strong {
    min-width: 0;
    overflow: hidden;
    color: var(--wall-text);
    font-size: 0.9375rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wall-steam-card-content small,
.wall-link-card-content small,
.wall-link-card-content em {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--wall-muted);
    font-size: 0.75rem;
}

.wall-steam-card-arrow,
.wall-link-card-icon {
    color: var(--wall-accent);
    font-size: 1.25rem;
    line-height: 1;
}

.wall-link-card {
    grid-template-columns: auto minmax(0, 1fr);
}

.wall-link-card-content em {
    font-size: 0.8125rem;
    font-style: normal;
}

/* Реакции и ссылки карточки */

.wall-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--wall-border);
}

.wall-reactions,
.wall-post-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wall-reaction-button,
.wall-comments-link,
.wall-post-open-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2rem;
    padding: 0.375rem 0.625rem;
    color: var(--wall-text);
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 999px;
    font: inherit;
    font-size: 0.8125rem;
    text-decoration: none;
}

.wall-reaction-button {
    cursor: pointer;
}

.wall-reaction-button:hover:not(:disabled),
.wall-comments-link:hover,
.wall-post-open-link:hover {
    background: var(--wall-accent-bg);
    border-color: var(--wall-accent);
}

.wall-reaction-button.is-active {
    color: var(--wall-accent);
    background: var(--wall-accent-bg);
    border-color: var(--wall-accent);
}

.wall-reaction-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wall-comments-link span:last-child,
.wall-post-open-link span:last-child {
    color: var(--wall-accent);
    font-weight: 700;
}

/* Пагинация */

.wall-pagination-info {
    padding: 1rem 0 0.75rem;
    color: var(--wall-muted);
    font-size: 0.8125rem;
}

/* Адаптивность */

@media (max-width: 768px) {
    .wall-login-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wall-login-card-icon {
        justify-self: center;
    }

    .wall-login-button {
        justify-self: center;
    }
}

@media (max-width: 700px) {
    .wall-hero {
        align-items: flex-start;
        min-height: 0;
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }

    .wall-hero-symbol {
        width: 3.375rem;
        height: 3.375rem;
        border-radius: 14px;
        font-size: 1.5rem;
    }

    .wall-create-card,
    .wall-login-card,
    .wall-empty,
    .wall-post {
        padding: 1.375rem 1.25rem;
        border-radius: 14px;
    }

    .wall-feed {
        gap: 0.875rem;
    }

    .wall-post-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .wall-post-delete-form {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .wall-composer-editor textarea {
        min-height: 7rem;
        padding: 0.75rem;
    }

    .wall-composer-editor-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
    }

    .wall-composer-hint {
        width: 100%;
        text-align: left;
        white-space: normal;
    }

    .wall-composer-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .wall-composer-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wall-publish-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wall-hero-symbol {
        display: none;
    }

    .wall-steam-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wall-steam-card img {
        grid-column: 1 / -1;
        width: 100%;
        height: auto;
        max-height: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wall-publish-button,
    .wall-steam-card,
    .wall-link-card {
        transition: none;
    }
}

/* =========================================================
   Стена: пикер эмодзи, комментарии, репост, «поделиться»
   ========================================================= */

/* Кнопки «Поделиться» / «Скопировать» в футере поста */
.wall-post-share-button,
.wall-post-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: var(--text-soft, #4b5563);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.wall-post-share-button:hover,
.wall-post-copy-button:hover {
    border-color: var(--primary, #2563eb);
    background: var(--bg-soft, #eef1f5);
    color: var(--primary, #2563eb);
}

.wall-post-copy-button.is-copied {
    border-color: var(--success-border, #a7f3d0);
    background: var(--success-bg, #ecfdf5);
    color: var(--success-text, #047857);
}

/* Пикер эмодзи (поповер) */
.wall-emoji-popover {
    position: fixed;
    z-index: 3000;
    width: 306px;
    box-sizing: border-box;
    max-height: 320px;
    padding: 8px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 12px;
    background: var(--surface, #fff);
    box-shadow: 0 16px 40px rgb(15 23 42 / 16%);
    overflow-y: auto;
}

.wall-emoji-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 8px;
    background: var(--bg-soft, #eef1f5);
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.82rem;
    outline: none;
}

.wall-emoji-search:focus {
    border-color: var(--primary, #2563eb);
}

.wall-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
}

.wall-emoji-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wall-emoji-cell:hover {
    background: var(--bg-soft, #eef1f5);
}

/* Блок комментариев на карточке поста */
.wall-post-comments {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border, #d9e0ea);
}

.wall-comments-list {
    display: grid;
    gap: 10px;
}

.wall-comment {
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.wall-comment-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft, #eef1f5);
}

.wall-comment-main {
    min-width: 0;
    flex: 1 1 auto;
}

.wall-comment-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.wall-comment-author {
    color: var(--text, #1f2933);
    font-size: 0.84rem;
    font-weight: 800;
}

.wall-comment-date {
    color: var(--text-faint, #6b7280);
    font-size: 0.72rem;
}

.wall-comment-body {
    margin-top: 2px;
    color: var(--text-soft, #4b5563);
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.wall-comments-more {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 12px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 9px;
    background: var(--bg-soft, #eef1f5);
    color: var(--primary, #2563eb);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.wall-comments-more:hover {
    border-color: var(--primary, #2563eb);
}

/* Быстрая форма комментария */
.wall-comment-quick {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.wall-comment-quick-input {
    flex: 1 1 auto;
    min-height: 38px;
    max-height: 120px;
    padding: 9px 12px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 10px;
    background: var(--surface, #fff);
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.87rem;
    line-height: 1.4;
    resize: vertical;
    outline: none;
}

.wall-comment-quick-input:focus {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 14%);
}

.wall-comment-emoji-btn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 10px;
    background: var(--surface, #fff);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.wall-comment-emoji-btn:hover {
    background: var(--bg-soft, #eef1f5);
}

.wall-comment-quick-submit {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--primary, #2563eb);
    border-radius: 10px;
    background: var(--primary, #2563eb);
    color: var(--primary-text, #fff);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

/* Репост: вложенный оригинал */
.wall-post-repost {
    margin-top: 10px;
}

.wall-post-repost-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--text-soft, #4b5563);
    font-size: 0.8rem;
    font-weight: 700;
}

.wall-post-repost-comment {
    margin-bottom: 10px;
}

.wall-repost-embed {
    padding: 12px 14px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 12px;
    background: var(--bg-soft, #eef1f5);
}

.wall-repost-embed-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.wall-repost-embed-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.wall-repost-embed-author {
    color: var(--text, #1f2933);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.wall-repost-embed-author:hover {
    color: var(--primary, #2563eb);
}

.wall-repost-embed-body {
    color: var(--text, #1f2933);
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.wall-repost-embed-image {
    display: block;
    width: 100%;
    max-height: 260px;
    margin-top: 8px;
    border-radius: 10px;
    object-fit: cover;
}

.wall-repost-missing {
    padding: 10px 12px;
    border: 1px dashed var(--border, #d9e0ea);
    border-radius: 10px;
    color: var(--text-faint, #6b7280);
    font-size: 0.82rem;
}

/* Форма репоста */
.wall-repost-form {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 12px;
    background: var(--bg-soft, #eef1f5);
    display: grid;
    gap: 8px;
}

.wall-repost-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 10px;
    background: var(--surface, #fff);
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.86rem;
    resize: vertical;
    outline: none;
}

.wall-repost-input:focus {
    border-color: var(--primary, #2563eb);
}

.wall-repost-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.wall-repost-cancel {
    padding: 7px 12px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: var(--text-soft, #4b5563);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.wall-repost-submit {
    padding: 7px 14px;
    border: 1px solid var(--primary, #2563eb);
    border-radius: 9px;
    background: var(--primary, #2563eb);
    color: var(--primary-text, #fff);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 560px) {
    .wall-emoji-popover {
        width: min(306px, calc(100vw - 24px));
    }

    .wall-comment-quick {
        flex-wrap: wrap;
    }
}

/* =========================================================
   Правки Блока 2: медиа-сетка, лайтбокс, скролл комментариев,
   инлайн-иконки, превью, меню поста, VK-вид.
   ========================================================= */

/* Медиа-сетка поста */
.wall-post-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.wall-post-attachments > .wall-image-link,
.wall-post-attachments > .wall-media-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-soft, #eef1f5);
    cursor: zoom-in;
}

.wall-post-attachments .wall-post-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.wall-post-attachments > :only-child .wall-post-image {
    aspect-ratio: auto;
    max-height: 480px;
    height: auto;
    object-fit: contain;
}

/* Лайтбокс */
.wall-lb-open {
    overflow: hidden;
}

.wall-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(8 12 20 / 88%);
}

.wall-lightbox__img {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgb(0 0 0 / 50%);
}

.wall-lightbox__close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 14%);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.wall-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 14%);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.wall-lightbox__prev { left: 18px; }
.wall-lightbox__next { right: 18px; }

.wall-lightbox__close:hover,
.wall-lightbox__nav:hover {
    background: rgb(255 255 255 / 26%);
}

/* Скролл комментариев */
.wall-comments-scroll.is-limited {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
}

/* Картинки в комментарии */
.wall-comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wall-comment-image-thumb {
    width: 84px;
    height: 84px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-soft, #eef1f5);
    cursor: zoom-in;
}

.wall-comment-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Быстрая форма комментария: аватар + поле с иконками внутри */
.wall-comment-quick {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.wall-comment-quick-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft, #eef1f5);
}

.wall-comment-quick-field {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 12px;
    background: var(--surface, #fff);
}

.wall-comment-quick-field:focus-within {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 14%);
}

.wall-comment-quick-input {
    flex: 1 1 auto;
    min-height: 28px;
    max-height: 120px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.4;
    resize: vertical;
    outline: none;
}

.wall-comment-quick-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.wall-comment-attach,
.wall-comment-emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft, #4b5563);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.wall-comment-attach:hover,
.wall-comment-emoji-btn:hover {
    background: var(--bg-soft, #eef1f5);
}

.wall-comment-quick-submit {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--primary, #2563eb);
    color: var(--primary-text, #fff);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}

/* Превью выбранных изображений */
.wall-upload-preview,
.wall-comment-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.wall-upload-thumb {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-soft, #eef1f5);
}

.wall-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wall-upload-thumb-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgb(0 0 0 / 55%);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* Меню действий поста (•••) */
.wall-post-menu {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
}

.wall-post-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-soft, #4b5563);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

.wall-post-menu-toggle::-webkit-details-marker { display: none; }

.wall-post-menu-toggle:hover { background: var(--bg-soft, #eef1f5); }

.wall-post-menu[open] .wall-post-menu-toggle { background: var(--bg-soft, #eef1f5); }

.wall-post-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 10px;
    background: var(--surface, #fff);
    box-shadow: 0 14px 34px rgb(15 23 42 / 16%);
    display: grid;
    gap: 2px;
}

.wall-post-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.wall-post-menu-item:hover { background: var(--bg-soft, #eef1f5); }

.wall-post-menu-item--danger { color: var(--danger-text, #b91c1c); }

.wall-post-menu-delete { margin: 0; }

/* VK-вид: шапка и футер карточки */
.wall-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wall-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.wall-post-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border, #d9e0ea);
}

.wall-post-footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Бесконечный скролл ленты */
.wall-infinite-loading {
    padding: 18px;
    text-align: center;
    color: var(--text-soft, #4b5563);
}

@media (max-width: 560px) {
    .wall-post-attachments {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .wall-comment-image-thumb { width: 68px; height: 68px; }
}

/* ===== Блок 2.1: компактный композер, иконки, reply, мобилка ===== */

/* Компактный композер (свернутый) */
.wall-composer-collapsed {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 14px;
    background: var(--surface, #fff);
    color: var(--text-soft, #4b5563);
    font: inherit;
    text-align: left;
    cursor: text;
}

.wall-composer-collapsed .wall-create-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.wall-composer-placeholder {
    flex: 1 1 auto;
    font-size: 0.92rem;
    color: var(--text-faint, #6b7280);
}

.wall-composer-quick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.wall-composer-body {
    display: none;
}

.wall-composer.is-expanded .wall-composer-collapsed {
    display: none;
}

.wall-composer.is-expanded .wall-composer-body {
    display: block;
    animation: wallFadeIn .16s ease;
}

@keyframes wallFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Футер: иконки слева, компактно */
.wall-post-footer {
    gap: 10px;
}

.wall-post-footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
}

.wall-comments-link,
.wall-post-share-button,
.wall-post-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    min-width: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-soft, #4b5563);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wall-comments-link:hover,
.wall-post-share-button:hover,
.wall-post-copy-button:hover {
    background: var(--bg-soft, #eef1f5);
    color: var(--primary, #2563eb);
}

.wall-ic { display: inline-block; vertical-align: middle; }

/* Кнопка «Ответить» у комментария */
.wall-comment-reply {
    margin-top: 4px;
    padding: 2px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-faint, #6b7280);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.wall-comment-reply:hover { color: var(--primary, #2563eb); }

.wall-comment-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
}

/* Репост-блок: левая акцентная полоса */
.wall-post-repost {
    border-left: 3px solid var(--primary, #2563eb);
    padding-left: 12px;
    margin-left: 2px;
}

/* Мобильная адаптация */
@media (max-width: 560px) {
    .wall-post-header { gap: 8px; }
    .wall-post-avatar { width: 40px; height: 40px; }
    .wall-composer-collapsed { padding: 7px 9px; }
    .wall-comments-link,
    .wall-post-share-button,
    .wall-post-copy-button,
    .wall-comment-emoji-btn,
    .wall-comment-quick-submit,
    .wall-comment-attach {
        min-width: 36px;
        min-height: 36px;
    }
    .wall-post-footer-links { flex-wrap: wrap; }
}

/* ===== Блок 2.2: сворачивание длинного текста ===== */
.wall-collapsible {
    position: relative;
}

.wall-collapsible.is-collapsed {
    max-height: 9.8em;
    overflow: hidden;
}

.wall-collapsible.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.6em;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--surface, #fff));
    pointer-events: none;
}

html[data-theme="dark"] .wall-collapsible.is-collapsed::after {
    background: linear-gradient(rgba(29, 41, 61, 0), var(--surface, #1d293d));
}

.wall-collapsible--comment.is-collapsed {
    max-height: 6.6em;
}

.wall-collapsible-toggle {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--primary, #2563eb);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.wall-collapsible-toggle:hover {
    text-decoration: underline;
}

/* Скрытие/показ комментариев по клику на иконку */
.wall-post-comments.is-hidden {
    display: none;
}

/* Подписи кнопок футера: на десктопе — текст, на мобильном — только иконки */
.wall-btn-label { display: inline; }
@media (max-width: 560px) {
    .wall-btn-label { display: none; }
}

/* Лайтбокс: hidden должен реально скрывать (display:flex его перекрывал) */
.wall-lightbox[hidden] { display: none !important; }
.wall-emoji-popover[hidden] { display: none !important; }

/* Жалоба в меню поста */
.wall-post-report > summary { cursor: pointer; list-style: none; }
.wall-post-report > summary::-webkit-details-marker { display: none; }
.wall-report-form { display: grid; gap: 6px; padding: 8px; }
.wall-report-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text, #1f2933);
    font: inherit;
    font-size: 0.82rem;
    resize: vertical;
}

/* Видео/аудио/iframe/ссылки в ленте — на всю ширину сетки, а не в колонке */
.wall-post-attachments > .wall-post-video,
.wall-post-attachments > .wall-post-audio,
.wall-post-attachments > .wall-youtube-wrap,
.wall-post-attachments > .wall-link-card,
.wall-post-attachments > .wall-steam-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
}

.wall-post-attachments > .wall-post-video {
    border-radius: 12px;
    max-height: 520px;
    background: #000;
}

.wall-post-attachments > .wall-post-audio {
    background: var(--bg-soft, #eef1f5);
}

/* Форма комментария (детальная): кнопки медиа/эмодзи/отправка справа, компактно */
.wall-comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wall-comment-actions .wall-comment-note {
    flex: 1 1 auto;
    min-width: 0;
}

.wall-comment-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
}

.wall-comment-actions .wall-comment-attach,
.wall-comment-actions .wall-comment-emoji-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.wall-comment-actions .wall-comment-attach:hover,
.wall-comment-actions .wall-comment-emoji-btn:hover {
    border-color: var(--border, #d9e0ea);
    background: var(--bg-soft, #eef1f5);
}

.wall-comment-actions .wall-comment-submit {
    min-height: 32px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--primary, #2563eb);
    border-radius: 8px;
    background: var(--primary, #2563eb);
    color: var(--primary-text, #fff);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.wall-comment-actions .wall-comment-submit:hover {
    background: var(--primary-hover, #1d4ed8);
    border-color: var(--primary-hover, #1d4ed8);
}

/* Форма комментария (лента): иконки и отправка — аккуратной строкой справа */
.wall-comment-quick-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wall-comment-quick-submit {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 0.9rem;
}

@media (max-width: 560px) {
    .wall-comment-actions-right {
        margin-left: 0;
    }
}

/* Компактная кнопка отправки комментария (перекрывает wall_detail.css) */
.wall-comment-actions .wall-comment-submit {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: 8px;
    background: var(--primary, #2563eb);
    border: 1px solid var(--primary, #2563eb);
}

.wall-comment-actions .wall-comment-submit--icon {
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1;
}

/* «← На стену» в шапке поста (справа, напротив автора) */
.wall-detail-post-header .wall-detail-back-link {
    justify-self: end;
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: var(--text-soft, #4b5563);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    grid-column: 3;
    grid-row: 1;
}

.wall-detail-post-header .wall-detail-back-link:hover {
    border-color: var(--primary, #2563eb);
    background: var(--bg-soft, #eef1f5);
    color: var(--primary, #2563eb);
}

@media (max-width: 700px) {
    .wall-detail-post-header .wall-detail-back-link {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-self: end;
        margin-top: 2px;
    }

    .wall-detail-post-header .wall-detail-back-link .wall-detail-back-label {
        display: none;
    }

    .wall-detail-post-header .wall-detail-back-link {
        padding: 0 10px;
        min-height: 32px;
    }
}

/* Инфо-строка пагинации: аккуратный центрированный контейнер */
.wall-pagination-info {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 1.25rem auto 0.75rem;
    padding: 0.7rem 1.15rem;
    text-align: center;
    color: var(--wall-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
    background: var(--wall-input-bg);
    border: 1px solid var(--wall-border);
    border-radius: 12px;
    box-shadow: var(--wall-shadow);
}

html[data-theme="dark"] .wall-pagination-info {
    background: var(--wall-input-bg);
}

@media (max-width: 560px) {
    .wall-pagination-info {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ===== Компактные блоки ленты /wall (уменьшение внутренних отступов) ===== */
.wall-create-card,
.wall-login-card,
.wall-empty {
    margin-bottom: 1rem;
    padding: 1.05rem 1.15rem;
}

.wall-post {
    padding: 1.05rem 1.15rem;
}

.wall-feed {
    gap: 0.8rem;
}

.wall-post-header {
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.wall-post-body {
    margin: 0 0 0.6rem;
    padding: 0.55rem 0.7rem;
}

.wall-post-footer {
    gap: 0.6rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
}

.wall-post-attachments {
    margin-top: 8px;
    gap: 5px;
}

.wall-post-avatar {
    width: 40px !important;
    height: 40px !important;
}

@media (max-width: 560px) {
    .wall-post,
    .wall-create-card,
    .wall-login-card,
    .wall-empty {
        padding: 0.85rem 0.85rem;
        border-radius: 14px;
    }
}

/* ===== Эстетическая доводка ленты /wall (после компактности) ===== */

/* Аватар: заполняет контейнер 44px, без сбитого размера */
.wall-post-avatar {
    width: 100% !important;
    height: 100% !important;
}

.wall-post-header {
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

/* Текст поста: комфортные внутренние отступы «пузыря» */
.wall-post-body {
    padding: 0.7rem 0.9rem;
    margin: 0 0 0.8rem;
    line-height: 1.65;
}

/* Медиа: адаптивная сетка — 1 картинка на всю ширину, несколько равномерно */
.wall-post-attachments {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    margin: 0 0 0.8rem;
}

.wall-post-attachments > .wall-post-video,
.wall-post-attachments > .wall-post-audio,
.wall-post-attachments > .wall-youtube-wrap,
.wall-post-attachments > .wall-link-card,
.wall-post-attachments > .wall-steam-card {
    grid-column: 1 / -1;
}

.wall-post-attachments .wall-post-image {
    max-height: 480px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.wall-post-attachments > :only-child .wall-post-image {
    aspect-ratio: auto;
    max-height: 520px;
    height: auto;
    object-fit: contain;
}

/* Футер: ровный воздух, разделитель */
.wall-post-footer {
    gap: 0.75rem;
    margin-top: 0;
    padding-top: 0.7rem;
}

.wall-reactions,
.wall-post-footer-links {
    gap: 0.5rem;
}

/* Шапка детальной: правая группа действий (меню ••• + На стену) */
.wall-detail-post-header .wall-detail-post-actions {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

/* Внутри группы кнопка «На стену» не должна занимать свою grid-ячейку */
.wall-detail-post-header .wall-detail-post-actions .wall-detail-back-link {
    grid-column: auto;
    grid-row: auto;
}

.wall-detail-post-menu {
    position: relative;
}

@media (max-width: 700px) {
    .wall-detail-post-header .wall-detail-post-actions {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-self: end;
    }
}

/* «На стену» в нижней панели поста — справа, напротив реакций */
.wall-detail-post-footer .wall-detail-back-link--footer {
    margin-left: auto;
    align-self: center;
    white-space: nowrap;
}

/* Модалка подтверждения удаления */
.wall-confirm-open { overflow: hidden; }
.wall-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(15 23 42 / 55%);
}
.wall-confirm-dialog {
    width: min(380px, 100%);
    padding: 20px;
    border-radius: 16px;
    background: var(--surface, #fff);
    box-shadow: 0 20px 50px rgb(15 23 42 / 30%);
}
.wall-confirm-text {
    margin: 0 0 18px;
    color: var(--text, #172033);
    font-size: 0.95rem;
    line-height: 1.5;
}
.wall-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.wall-confirm-cancel,
.wall-confirm-ok {
    min-height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.wall-confirm-cancel {
    border: 1px solid var(--border, #d9e0ea);
    background: var(--surface, #fff);
    color: var(--text-soft, #4b5563);
}
.wall-confirm-ok {
    border: 1px solid #dc2626;
    background: #dc2626;
    color: #fff;
}
.wall-confirm-ok:hover { background: #b91c1c; border-color: #b91c1c; }

/* ===== Страница редактирования публикации/комментария ===== */
.wall-edit-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 4px 0 30px;
}

.wall-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.wall-edit-head h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
}

.wall-edit-form {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--wall-border, #d9e0ea);
    border-radius: 16px;
    background: var(--wall-card-bg, #fff);
    box-shadow: var(--wall-shadow, 0 8px 24px rgba(15, 23, 42, .08));
}

.wall-edit-field {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--wall-text, #172033);
}

.wall-edit-field textarea,
.wall-edit-field input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--wall-border, #cbd5e1);
    border-radius: 9px;
    background: var(--wall-input-bg, #fff);
    color: var(--wall-text, #172033);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    resize: vertical;
}

.wall-edit-field textarea:focus,
.wall-edit-field input[type="file"]:focus {
    outline: none;
    border-color: var(--wall-accent, #2563eb);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 15%);
}

.wall-edit-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wall-edit-attachment {
    display: grid;
    gap: 4px;
    width: 128px;
    padding: 8px;
    border: 1px solid var(--wall-border, #d9e0ea);
    border-radius: 10px;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
}

.wall-edit-attachment img {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: 7px;
}

.wall-edit-attachment-name {
    color: var(--wall-muted, #64748b);
}

.wall-edit-remove-label {
    color: #dc2626;
    font-weight: 700;
}

.wall-edit-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.wall-edit-save {
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--wall-accent, #2563eb);
    border-radius: 9px;
    background: var(--wall-accent, #2563eb);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.wall-edit-cancel {
    color: var(--wall-muted, #64748b);
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
}

.wall-edit-cancel:hover { color: var(--wall-accent, #2563eb); }

/* Тема стены на страницах редактирования (согласованность с модулем) */
.wall-edit-page {
    --wall-card-bg: #11161d;
    --wall-card-hover: #16202b;
    --wall-input-bg: #0d1219;
    --wall-border: #293440;
    --wall-text: #e6edf3;
    --wall-muted: #9aa4b2;
    --wall-accent: #78b5ff;
    --wall-accent-bg: rgba(88, 166, 255, 0.13);
    --wall-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    max-width: 900px;
}

:root[data-theme="light"] .wall-edit-page {
    --wall-card-bg: #ffffff;
    --wall-card-hover: #f7faff;
    --wall-input-bg: #f7faff;
    --wall-border: rgba(15, 23, 42, 0.14);
    --wall-text: #172033;
    --wall-muted: #596a80;
    --wall-accent: #1f63bd;
    --wall-accent-bg: rgba(37, 99, 235, 0.10);
    --wall-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

.wall-edit-head h1 {
    color: var(--wall-text);
}

/* ===== Модальный редактор (посты/комментарии) ===== */
.wall-editor-open { overflow: hidden; }
.wall-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(15 23 42 / 60%);

    --we-card: #11161d;
    --we-input: #0d1219;
    --we-border: #293440;
    --we-text: #e6edf3;
    --we-muted: #9aa4b2;
    --we-accent: #78b5ff;
}
:root[data-theme="light"] .wall-editor-overlay {
    --we-card: #ffffff;
    --we-input: #f7faff;
    --we-border: rgba(15, 23, 42, 0.14);
    --we-text: #172033;
    --we-muted: #596a80;
    --we-accent: #1f63bd;
}

.wall-editor-dialog {
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--we-border);
    border-radius: 18px;
    background: var(--we-card);
    color: var(--we-text);
    box-shadow: 0 24px 60px rgb(15 23 42 / 35%);
    overflow: hidden;
}

.wall-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--we-border);
}
.wall-editor-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
.wall-editor-close {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--we-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.wall-editor-close:hover { background: var(--we-input); color: var(--we-text); }

.wall-editor-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: grid;
    gap: 14px;
}

.wall-editor-label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--we-muted);
}

.wall-editor-link {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--we-border);
    border-radius: 12px;
    background: var(--we-input);
    color: var(--we-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
}
.wall-editor-link:focus {
    outline: none;
    border-color: var(--we-accent);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 18%);
}
.wall-editor-link::placeholder {
    color: var(--we-muted);
}

.wall-editor-text {
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid var(--we-border);
    border-radius: 12px;
    background: var(--we-input);
    color: var(--we-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}
.wall-editor-text:focus {
    outline: none;
    border-color: var(--we-accent);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 18%);
}

.wall-editor-attach-title { font-size: 12px; font-weight: 700; color: var(--we-muted); margin-bottom: 8px; }
.wall-editor-attachments { display: flex; flex-wrap: wrap; gap: 10px; }

.wall-editor-attachment {
    position: relative;
    display: grid;
    gap: 6px;
    width: 118px;
    padding: 8px;
    border: 1px solid var(--we-border);
    border-radius: 10px;
    background: var(--we-input);
    cursor: pointer;
}
.wall-editor-attachment img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    border-radius: 7px;
}
.wall-editor-att-filename { font-size: 11px; color: var(--we-muted); overflow-wrap: anywhere; }
.wall-editor-att-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid rgb(220 38 38 / 40%);
    border-radius: 7px;
    background: transparent;
    color: #e5695f;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.wall-editor-att-remove:hover {
    background: rgb(220 38 38 / 12%);
}
.wall-editor-att-remove:focus-visible {
    outline: 2px solid var(--we-accent);
    outline-offset: 2px;
}
.wall-editor-attachment.is-removing {
    border-color: #dc2626;
    background: rgb(220 38 38 / 8%);
    opacity: .72;
}
.wall-editor-attachment.is-removing .wall-editor-att-remove {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.wall-editor-attachment.is-removing img,
.wall-editor-attachment.is-removing video,
.wall-editor-attachment.is-removing .wall-editor-att-card {
    filter: grayscale(0.7);
}
.wall-editor-attachment input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.wall-editor-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.wall-editor-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px dashed var(--we-border);
    border-radius: 10px;
    background: var(--we-input);
    color: var(--we-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.wall-editor-file-btn:hover { border-color: var(--we-accent); color: var(--we-accent); }
.wall-editor-file-names { font-size: 12px; color: var(--we-muted); overflow-wrap: anywhere; }

.wall-editor-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(220 38 38 / 12%);
    border: 1px solid rgb(220 38 38 / 35%);
    color: #e5695f;
    font-size: 13px;
}

.wall-editor-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--we-border);
}
.wall-editor-cancel,
.wall-editor-save {
    min-height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.wall-editor-cancel {
    border: 1px solid var(--we-border);
    background: transparent;
    color: var(--we-text);
}
.wall-editor-cancel:hover { background: var(--we-input); }
.wall-editor-save {
    border: 1px solid var(--we-accent);
    background: var(--we-accent);
    color: #fff;
}
.wall-editor-save:hover { filter: brightness(1.06); }
.wall-editor-save:disabled { opacity: .65; cursor: default; }

@media (max-width: 560px) {
    .wall-editor-dialog { width: 100%; max-height: calc(100vh - 20px); }
    .wall-editor-attachment { width: calc(50% - 5px); }
}

/* hidden должен реально скрывать модалку (display:flex его перекрывал) */
.wall-editor-overlay[hidden] { display: none !important; }

/* Этап 1: вложения в редакторе — видео/аудио/документ/ссылка */
.wall-editor-attachment.wide,
.wall-editor-attachment:has(video),
.wall-editor-attachment:has(audio),
.wall-editor-attachment:has(.wall-editor-att-card) {
    width: 100%;
    cursor: default;
}

.wall-editor-attachment video,
.wall-editor-attachment audio {
    display: block;
    width: 100%;
    border-radius: 8px;
    background: #000;
}

.wall-editor-attachment video {
    max-height: 180px;
    object-fit: contain;
}

.wall-editor-att-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--we-border);
    border-radius: 9px;
    background: var(--we-input);
}

.wall-editor-att-ic {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
}

.wall-editor-att-meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.wall-editor-att-size {
    font-size: 11px;
    color: var(--we-muted);
    overflow-wrap: anywhere;
}

.wall-editor-att-link {
    font-size: 11px;
    color: var(--we-accent);
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.wall-editor-att-link:hover { text-decoration: underline; }

/* Этап 3: кастомный аудиоплеер в редакторе */
.wall-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--we-border);
    border-radius: 10px;
    background: var(--we-input);
    color: var(--we-text);
}

.wall-audio-play {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--we-accent);
    border-radius: 50%;
    background: var(--we-accent);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.wall-audio-play:hover { background: var(--we-accent); filter: brightness(1.08); }
.wall-audio-play:focus-visible { outline: 2px solid var(--we-accent); outline-offset: 2px; }
.wall-audio-play-icon { line-height: 1; }

.wall-audio-seek {
    flex: 1 1 auto;
    min-width: 60px;
    height: 6px;
    accent-color: var(--we-accent);
    cursor: pointer;
}
.wall-audio-seek:disabled { opacity: .45; cursor: default; }
.wall-audio-seek:focus-visible { outline: 2px solid var(--we-accent); outline-offset: 2px; }

.wall-audio-time {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--we-muted);
    min-width: 34px;
    text-align: center;
}
.wall-audio-dur { min-width: 40px; }

.wall-audio-status {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--we-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wall-audio.is-error .wall-audio-status { color: #e5695f; }
.wall-audio.is-error { border-color: rgb(220 38 38 / 45%); }

@media (max-width: 560px) {
    .wall-audio { flex-wrap: wrap; gap: 8px; }
    .wall-audio-seek { order: 2; flex: 1 1 100%; }
    .wall-audio-time { min-width: auto; }
    .wall-audio-status { flex: 1 1 100%; max-width: none; }
}

/* ===== Этап 4: единый UI-слой (focus/hover/disabled/loading/радиусы) ===== */

/* 1. Единый focus-ring для интерактивных элементов стены */
.wall-composer-tool,
.wall-publish-button,
.wall-reaction-button,
.wall-post-share-button,
.wall-post-copy-button,
.wall-comment-quick-submit,
.wall-comment-submit,
.wall-repost-submit,
.wall-repost-cancel,
.wall-link-remove-button,
.wall-confirm-cancel,
.wall-confirm-ok,
.wall-editor-cancel,
.wall-editor-save,
.wall-editor-close,
.wall-composer-editor textarea,
.wall-comment-quick-input,
.wall-editor-text,
.wall-edit-field textarea,
.wall-edit-field input[type="file"] {
    outline: none;
}
.wall-composer-tool:focus-visible,
.wall-publish-button:focus-visible,
.wall-reaction-button:focus-visible,
.wall-post-share-button:focus-visible,
.wall-post-copy-button:focus-visible,
.wall-comment-quick-submit:focus-visible,
.wall-comment-submit:focus-visible,
.wall-repost-submit:focus-visible,
.wall-repost-cancel:focus-visible,
.wall-link-remove-button:focus-visible,
.wall-confirm-cancel:focus-visible,
.wall-confirm-ok:focus-visible,
.wall-editor-cancel:focus-visible,
.wall-editor-save:focus-visible,
.wall-editor-close:focus-visible,
.wall-composer-editor textarea:focus-visible,
.wall-comment-quick-input:focus-visible,
.wall-editor-text:focus-visible,
.wall-edit-field textarea:focus-visible,
.wall-edit-field input[type="file"]:focus-visible {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}

/* 2. Единые высоты/радиусы action-кнопок */
.wall-publish-button,
.wall-comment-submit,
.wall-repost-submit,
.wall-editor-cancel,
.wall-editor-save,
.wall-confirm-cancel,
.wall-confirm-ok {
    min-height: 40px;
    border-radius: 10px;
}

/* 3. hover-отклик там, где его нет */
.wall-composer-tool:hover { background: var(--bg-soft, #eef1f5); border-color: var(--primary, #2563eb); }
.wall-comment-quick-submit:hover { background: var(--primary, #2563eb); filter: brightness(1.08); }
.wall-repost-cancel:hover { background: var(--bg-soft, #eef1f5); }
.wall-repost-submit:hover { filter: brightness(1.08); }
.wall-link-remove-button:hover { color: var(--danger-text, #dc2626); border-color: var(--danger-text, #dc2626); }

/* 4. disabled/loading для action-кнопок и полей */
.wall-publish-button:disabled,
.wall-comment-submit:disabled,
.wall-repost-submit:disabled,
.wall-editor-save:disabled,
.wall-confirm-ok:disabled {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

.wall-publish-button.is-loading,
.wall-comment-submit.is-loading,
.wall-repost-submit.is-loading,
.wall-editor-save.is-loading {
    opacity: .65;
    cursor: progress;
    pointer-events: none;
}

.wall-composer-editor textarea:disabled,
.wall-comment-quick-input:disabled,
.wall-editor-text:disabled,
.wall-edit-field textarea:disabled,
.wall-edit-field input[type="file"]:disabled {
    opacity: .6;
    cursor: not-allowed;
    background: var(--bg-soft, #eef1f5);
}

/* 5. Перенос длинных URL и имён файлов */
.wall-editor-att-link,
.wall-editor-att-filename,
.wall-editor-att-size,
.wall-editor-att-filename,
.wall-upload-thumb-name {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Публичный аудиоплеер (лента/детальная) — единый компонент */
.wall-audio-public .wall-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--wall-border);
    border-radius: 12px;
    background: var(--wall-input-bg);
    color: var(--wall-text);
}

.wall-audio-public .wall-audio-play {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--wall-accent);
    border-radius: 50%;
    background: var(--wall-accent);
    color: var(--wall-card-bg);
    font-size: 12px;
    cursor: pointer;
    transition: filter .15s ease;
}
.wall-audio-public .wall-audio-play:hover { filter: brightness(1.08); }
.wall-audio-public .wall-audio-play:focus-visible { outline: 2px solid var(--wall-accent); outline-offset: 2px; }
.wall-audio-public .wall-audio-play-icon { line-height: 1; }

.wall-audio-public .wall-audio-seek {
    flex: 1 1 auto;
    min-width: 60px;
    height: 6px;
    accent-color: var(--wall-accent);
    cursor: pointer;
}
.wall-audio-public .wall-audio-seek:disabled { opacity: .45; cursor: default; }
.wall-audio-public .wall-audio-seek:focus-visible { outline: 2px solid var(--wall-accent); outline-offset: 2px; }

.wall-audio-public .wall-audio-time {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--wall-muted);
    min-width: 34px;
    text-align: center;
}
.wall-audio-public .wall-audio-dur { min-width: 40px; }

.wall-audio-public .wall-audio-status {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--wall-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wall-audio-public .wall-audio.is-error { border-color: rgb(220 38 38 / 45%); }
.wall-audio-public .wall-audio.is-error .wall-audio-status { color: #e5695f; }

@media (max-width: 560px) {
    .wall-audio-public .wall-audio { flex-wrap: wrap; gap: 8px; }
    .wall-audio-public .wall-audio-seek { order: 2; flex: 1 1 100%; }
    .wall-audio-public .wall-audio-time { min-width: auto; }
    .wall-audio-public .wall-audio-status { flex: 1 1 100%; max-width: none; }
}

/* Модальное окно загрузки видео */
.wall-upload-open { overflow: hidden; }
.wall-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 4600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(15 23 42 / 60%);
    --wu-card: var(--wall-card-bg, #11161d);
    --wu-border: var(--wall-border, #293440);
    --wu-text: var(--wall-text, #e6edf3);
    --wu-muted: var(--wall-muted, #9aa4b2);
    --wu-accent: var(--wall-accent, #78b5ff);
}
:root[data-theme="light"] .wall-upload-overlay {
    --wu-card: #ffffff;
    --wu-border: rgba(15, 23, 42, 0.14);
    --wu-text: #172033;
    --wu-muted: #596a80;
    --wu-accent: #1f63bd;
}
.wall-upload-overlay[hidden] { display: none !important; }

.wall-upload-dialog {
    width: min(400px, 100%);
    border: 1px solid var(--wu-border);
    border-radius: 16px;
    background: var(--wu-card);
    color: var(--wu-text);
    box-shadow: 0 24px 60px rgb(15 23 42 / 35%);
    overflow: hidden;
}
.wall-upload-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--wu-border);
}
.wall-upload-title { font-size: 0.95rem; font-weight: 800; }
.wall-upload-body { display: grid; gap: 12px; padding: 16px 18px; }
.wall-upload-filename {
    font-size: 0.8rem;
    color: var(--wu-muted);
    overflow-wrap: anywhere;
}
.wall-upload-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--wall-input-bg, #0d1219);
    overflow: hidden;
}
.wall-upload-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--wu-accent);
    transition: width .15s ease;
}
.wall-upload-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--wu-muted);
    font-variant-numeric: tabular-nums;
}
.wall-upload-status {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--wu-muted);
}
.wall-upload-status.is-error { color: #e5695f; }
.wall-upload-dialog.is-error { border-color: rgb(220 38 38 / 45%); }

@media (max-width: 560px) {
    .wall-upload-dialog { width: 100%; }
    .wall-upload-body { padding: 14px 14px; }
}

/* Гостевое сообщение в комментариях (вместо пустой полоски) */
.wall-comment-guest {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--wall-border);
    border-radius: 12px;
    background: var(--wall-input-bg);
    color: var(--wall-text);
    font-size: 0.85rem;
    line-height: 1.5;
}
.wall-comment-guest p {
    margin: 0 0 8px;
    color: var(--wall-muted);
}
.wall-comment-guest-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}
.wall-comment-guest-links a {
    color: var(--wall-accent);
    text-decoration: none;
}
.wall-comment-guest-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wall-comment-guest-links a:focus-visible {
    outline: 2px solid var(--wall-accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.wall-comment-guest-links span { color: var(--wall-muted); }
