/* My Wiki Community — Stage 26 */
.mywc-community {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    box-sizing: border-box;
    color: #111827;
}

.mywc-community a {
    text-decoration: none;
}

.mywc-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #f8fafc);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
    margin-bottom: 22px;
}

.mywc-kicker {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.mywc-hero h1,
.mywc-thread-head h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.mywc-hero p {
    margin: 0;
    max-width: 680px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.55;
}

.mywc-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
    align-items: stretch;
}

.mywc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    box-sizing: border-box;
}

.mywc-btn-primary {
    background: #111827;
    color: #fff !important;
}

.mywc-btn-secondary {
    background: #fff;
    color: #111827 !important;
    border-color: #d1d5db;
}

.mywc-btn-light {
    background: #f3f4f6;
    color: #111827 !important;
    border-color: #e5e7eb;
}

.mywc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.mywc-preview-note,
.mywc-alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    margin: 14px 0 18px;
    line-height: 1.45;
}

.mywc-alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.mywc-alert-soft {
    border-color: #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
}

.mywc-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0;
}

.mywc-search {
    display: flex;
    gap: 8px;
    width: 100%;
}

.mywc-search input[type="search"] {
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 0 13px;
}

.mywc-tabs,
.mywc-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.mywc-tab,
.mywc-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151 !important;
    font-size: 14px;
    font-weight: 700;
}

.mywc-tab.is-active,
.mywc-chip.is-active {
    background: #111827;
    color: #fff !important;
    border-color: #111827;
}

.mywc-thread-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.mywc-thread-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}

.mywc-thread-card.is-pinned {
    border-color: #c7d2fe;
    background: #fafaff;
}

.mywc-thread-card h2 {
    margin: 6px 0 8px;
    font-size: 22px;
    line-height: 1.22;
}

.mywc-thread-card h2 a {
    color: #111827 !important;
}

.mywc-thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    font-size: 13px;
    color: #6b7280;
}

.mywc-excerpt {
    margin: 0 0 10px;
    color: #4b5563;
    line-height: 1.5;
}

.mywc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mywc-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

.mywc-status-badge.is-expert {
    background: #ecfdf5;
    color: #047857;
}

.mywc-status-badge.is-solved {
    background: #eef2ff;
    color: #3730a3;
}

.mywc-status-badge.is-locked {
    background: #fff7ed;
    color: #9a3412;
}

.mywc-status-badge.is-closed {
    background: #fef2f2;
    color: #991b1b;
}

.mywc-thread-card-side {
    min-width: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #6b7280;
    text-align: center;
}

.mywc-avatar-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}

.mywc-thread-head {
    padding: 20px 0 12px;
}

.mywc-back {
    display: inline-flex;
    margin-bottom: 14px;
    color: #4b5563 !important;
    font-weight: 800;
}

.mywc-locked-topic {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    margin-top: 18px;
}

.mywc-locked-topic h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.mywc-preview-message {
    padding: 16px;
    border-radius: 16px;
    background: #f9fafb;
    margin-bottom: 16px;
}

.mywc-lock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mywc-messages {
    display: grid;
    gap: 14px;
    margin: 18px 0;
}

.mywc-message {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.mywc-message.is-admin {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.mywc-message-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mywc-message-author small {
    display: block;
    color: #6b7280;
    margin-top: 2px;
}

.mywc-message-content {
    line-height: 1.6;
}

.mywc-message-content p {
    margin: 0 0 12px;
}

.mywc-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mywc-attachment-img {
    display: block;
    width: 140px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.mywc-attachment-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mywc-form {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.mywc-form h3 {
    margin: 0;
}

.mywc-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.mywc-form input[type="text"],
.mywc-form input[type="url"],
.mywc-form input[type="number"],
.mywc-form select,
.mywc-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-weight: 400;
}

.mywc-form textarea {
    resize: vertical;
}

.mywc-file-label,
.mywc-check {
    color: #4b5563;
    font-size: 14px;
}

.mywc-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    gap: 8px !important;
    align-items: flex-start;
    font-weight: 600 !important;
}

.mywc-empty {
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    text-align: center;
}

.mywc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.mywc-pagination a,
.mywc-pagination span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151 !important;
    font-weight: 800;
}

.mywc-admin-wrap .mywc-admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 16px 0;
}

.mywc-admin-wrap .mywc-admin-filters select,
.mywc-admin-wrap .mywc-admin-filters input[type="search"] {
    min-height: 34px;
}

.mywc-admin-table .row-actions {
    visibility: visible;
}

.mywc-admin-table tr.is-hidden {
    opacity: .65;
}

.mywc-header-badge-anchor {
    position: relative !important;
}

.mywc-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: top;
    margin-left: 5px;
    box-shadow: 0 0 0 2px #fff;
    z-index: 10;
}

.mywc-header-badge.is-floating {
    position: absolute;
    top: -7px;
    right: -9px;
    margin-left: 0;
}

@media (max-width: 760px) {
    .mywc-community {
        padding: 14px 12px 42px;
    }

    .mywc-hero {
        flex-direction: column;
        padding: 20px;
        border-radius: 20px;
    }

    .mywc-hero-actions {
        min-width: 0;
    }

    .mywc-thread-card {
        flex-direction: column;
    }

    .mywc-thread-card-side {
        flex-direction: row;
        justify-content: flex-start;
        min-width: 0;
    }

    .mywc-search {
        flex-direction: column;
    }

    .mywc-attachment-img {
        width: calc(50% - 5px);
        height: 110px;
    }
}

/* Stage 26.1 — quotes, gallery, account and admin detail */
.mywc-message-actions {
    margin-top: 12px;
}

.mywc-reply-quote-btn {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mywc-reply-quote-btn:hover {
    border-color: #111827;
    color: #111827;
}

.mywc-message-quote,
.mywc-reply-preview {
    display: block;
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-left: 4px solid #111827;
    border-radius: 10px;
    background: rgba(255,255,255,.78);
    color: #374151 !important;
}

.mywc-message-quote span,
.mywc-reply-preview strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.mywc-message-quote em,
.mywc-reply-preview p {
    display: block;
    margin: 0;
    color: #4b5563;
    font-style: normal;
    font-size: 14px;
    line-height: 1.4;
}

.mywc-reply-preview button {
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.mywc-attachment-img {
    cursor: zoom-in;
}

.mywc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, .88);
    align-items: center;
    justify-content: center;
    padding: 32px 72px;
    box-sizing: border-box;
}

.mywc-lightbox.is-open {
    display: flex;
}

.mywc-lightbox-stage {
    max-width: min(1100px, 100%);
    max-height: 100%;
    text-align: center;
}

.mywc-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,.4);
    background: #fff;
}

.mywc-lightbox-caption {
    margin-top: 12px;
    color: #e5e7eb;
    font-size: 14px;
}

.mywc-lightbox-close,
.mywc-lightbox-prev,
.mywc-lightbox-next {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
}

.mywc-lightbox-close {
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 30px;
}

.mywc-lightbox-prev,
.mywc-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 70px;
    border-radius: 14px;
    font-size: 52px;
}

.mywc-lightbox-prev { left: 16px; }
.mywc-lightbox-next { right: 16px; }

.mywc-lightbox-open {
    overflow: hidden;
}

.mywc-account-box {
    max-width: 980px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
}

.mywc-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.mywc-account-thread-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.mywc-account-thread {
    display: block;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #111827 !important;
    background: #f9fafb;
}

.mywc-account-thread strong,
.mywc-account-thread span {
    display: block;
}

.mywc-account-thread span {
    margin-top: 4px;
    color: #6b7280;
    font-size: 13px;
}

.mywc-admin-thread-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.mywc-admin-thread-main,
.mywc-admin-thread-side {
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: #fff;
}

.mywc-admin-thread-side label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
}

.mywc-admin-thread-side input[type="text"],
.mywc-admin-thread-side select {
    width: 100%;
    margin-top: 5px;
}

.mywc-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mywc-admin-actions a,
.mywc-admin-message-actions a {
    text-decoration: none;
}

.mywc-admin-message-actions {
    margin-top: 10px;
}

.mywc-message.is-deleted {
    opacity: .72;
    background: #f3f4f6;
}

.mywc-admin-status-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .mywc-lightbox {
        padding: 54px 12px;
    }
    .mywc-lightbox-prev,
    .mywc-lightbox-next {
        width: 42px;
        height: 54px;
        font-size: 38px;
    }
    .mywc-admin-thread-layout {
        grid-template-columns: 1fr;
    }
}


/* Stage 26.2 — мягкая палитра, читаемые цитаты, новые ответы */
.mywc-community {
    color: #172033;
}

.mywc-btn-primary,
.mywc-tab.is-active,
.mywc-chip.is-active,
.mywc-avatar-dot {
    background: #1f3b57;
    border-color: #1f3b57;
    color: #ffffff !important;
}

.mywc-btn-primary:hover,
.mywc-tab.is-active:hover,
.mywc-chip.is-active:hover {
    background: #274866;
    border-color: #274866;
}

.mywc-btn-secondary,
.mywc-btn-light,
.mywc-reply-quote-btn {
    color: #1f3b57 !important;
}

.mywc-thread-card h2 a,
.mywc-account-thread,
.mywc-hero h1,
.mywc-thread-head h1 {
    color: #172033 !important;
}

.mywc-thread-card.has-unread {
    border-color: #8ab4f8;
    background: linear-gradient(135deg, #ffffff, #f5f9ff);
}

.mywc-status-badge.is-new,
.mywc-account-thread mark {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1f3b57;
    font-size: 12px;
    font-weight: 900;
}

.mywc-message-quote,
.mywc-reply-preview {
    border-left-color: #2e5f8a;
    background: #f5f9ff;
    color: #334155 !important;
}

.mywc-message-quote span,
.mywc-reply-preview strong {
    color: #1f3b57;
}

.mywc-message-highlight {
    animation: mywc-message-pulse 1.8s ease-out;
}

@keyframes mywc-message-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 95, 138, .45); }
    35% { box-shadow: 0 0 0 7px rgba(46, 95, 138, .18); }
    100% { box-shadow: 0 0 0 0 rgba(46, 95, 138, 0); }
}

.mywc-message.is-admin {
    border-color: #b7e7cc;
    background: #f1fbf5;
}

.mywc-lightbox {
    background: rgba(24, 42, 61, .92);
}

.mywc-lightbox-close,
.mywc-lightbox-prev,
.mywc-lightbox-next {
    background: rgba(255, 255, 255, .18);
}

.mywc-header-badge,
.mywc-badge {
    background: #e5484d;
}

.mywc-admin-actions a.button,
.mywc-admin-message-actions a.button {
    border-color: #8ab4f8;
    color: #1f3b57;
}

/* Stage 26.2.1 — image optimization and admin notifications */
.mywc-lightbox-original {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

.mywc-lightbox-original:hover {
    background: rgba(255, 255, 255, .24);
}

.mywc-admin-table tr.needs-admin td {
    background: #f5f9ff;
}

.mywc-status-badge.is-admin-needed {
    background: #fff4e8;
    color: #9a4f00;
}

.mywc-file-label input[type="file"] {
    margin-top: 6px;
}

/* Stage 26.2.2: цепочка бейджей в WooCommerce аккаунте */
.woocommerce-MyAccount-navigation-link--mywiki-community a,
.woocommerce-MyAccount-navigation a[href*="mywiki-community"] {
    position: relative;
}

.mywc-account-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
    box-sizing: border-box;
}

#mywc-new-answers {
    scroll-margin-top: 130px;
}

/* Stage 26.2.3 — moderation, delete and bans */
.mywc-btn-muted {
    background: #e8eef7;
    color: #334155 !important;
    cursor: default;
}

.mywc-danger-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff7f7;
}

.mywc-danger-box p {
    margin-top: 0;
}

.mywc-danger-box label,
.mywc-ban-form label {
    display: block;
    margin: 10px 0;
    font-weight: 700;
}

.mywc-danger-box input[type="text"],
.mywc-danger-box select,
.mywc-danger-box textarea,
.mywc-ban-form select,
.mywc-ban-form textarea {
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
}

.mywc-inline-delete-form {
    display: inline-block;
    margin: 0 4px;
    vertical-align: middle;
}

.mywc-admin-message-actions .button,
.mywc-admin-message-actions form {
    margin-top: 6px;
}

.mywc-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

@media (max-width: 900px) {
    .mywc-admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Stage 26.2.4 — reports, email, maintenance */
.mywc-report-details {
    display: inline-block;
    position: relative;
    margin-left: 6px;
}

.mywc-report-details summary {
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.mywc-report-details summary::-webkit-details-marker {
    display: none;
}

.mywc-report-form {
    position: absolute;
    right: 0;
    top: 28px;
    z-index: 40;
    width: min(340px, 88vw);
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
}

.mywc-report-form label {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.mywc-report-form select,
.mywc-report-form textarea {
    width: 100%;
    margin-top: 5px;
}

.mywc-admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.mywc-admin-summary-card {
    padding: 16px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #f8fbff;
}

.mywc-admin-summary-card strong {
    display: block;
    color: #1f3a5f;
    font-size: 24px;
    line-height: 1.1;
}

.mywc-admin-summary-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-weight: 700;
}

.mywc-log-list {
    display: grid;
    gap: 8px;
}

.mywc-log-item {
    padding: 10px;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #ffffff;
}

.mywc-log-item strong {
    color: #1f3a5f;
}

.mywc-log-item small {
    color: #64748b;
}

@media (max-width: 900px) {
    .mywc-admin-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mywc-report-form {
        right: auto;
        left: 0;
    }
}

@media (max-width: 560px) {
    .mywc-admin-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* Stage 2.7.0 — profile avatar foundation */
.mywc-avatar-dot.has-image {
    background: #fff;
    color: transparent;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .08);
}

.mywc-avatar-dot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mywc-profile-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    margin: 14px 0 18px;
}

.mywc-profile-avatar-preview {
    flex: 0 0 auto;
}

.mywc-profile-fields {
    flex: 1 1 260px;
    display: grid;
    gap: 10px;
}

.mywc-profile-fields label {
    display: grid;
    gap: 5px;
    font-weight: 800;
}

.mywc-profile-fields input[type="text"],
.mywc-profile-fields input[type="file"] {
    width: 100%;
    max-width: 100%;
}

.mywc-profile-fields small {
    color: #6b7280;
}

.mywc-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Stage 26.2.9 — site chat UI links, previews and compact messages */
.mywc-messages {
    gap: 10px;
    margin: 14px 0;
}

.mywc-message {
    max-width: 880px;
    padding: 13px 14px;
    border-radius: 18px;
}

.mywc-message-author {
    gap: 8px;
    margin-bottom: 8px;
}

.mywc-message-author .mywc-avatar-dot,
.mywc-message-author img {
    flex: 0 0 auto;
}

.mywc-message-author strong {
    font-size: 15px;
    line-height: 1.15;
}

.mywc-message-author small {
    font-size: 12px;
    line-height: 1.25;
}

.mywc-message-body::after {
    content: "";
    display: block;
    clear: both;
}

.mywc-message-content {
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.mywc-message-content p {
    margin: 0 0 8px;
}

.mywc-message-content p:last-child {
    margin-bottom: 0;
}

.mywc-message-link {
    color: #2563eb !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    word-break: break-word;
}

.mywc-link-previews {
    clear: both;
    display: grid;
    gap: 8px;
    max-width: 620px;
    margin-top: 8px;
}

.mywc-link-preview {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    padding: 8px;
    border: 1px solid rgba(31, 59, 87, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: #172033 !important;
    overflow: hidden;
}

.mywc-link-preview:hover {
    border-color: rgba(31, 59, 87, .32);
    background: rgba(255, 255, 255, .94);
}

.mywc-link-preview-image {
    display: block;
    width: 76px;
    height: 60px;
    overflow: hidden;
    border-radius: 10px;
    background: #e8eef7;
}

.mywc-link-preview-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mywc-link-preview-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mywc-link-preview-text strong,
.mywc-link-preview-text em,
.mywc-link-preview-text small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.mywc-link-preview-text strong {
    color: #172033;
    font-size: 15px;
    font-style: normal;
    line-height: 1.22;
    white-space: nowrap;
}

.mywc-link-preview-text em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
    line-height: 1.28;
}

.mywc-link-preview-text small {
    color: #73808f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
}

.mywc-link-preview.is-external {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 10px 12px;
}

.mywc-link-preview.is-external .mywc-link-preview-text strong {
    white-space: normal;
}

.mywc-attachments.is-inline {
    float: left;
    max-width: min(322px, 100%);
    margin: 2px 12px 8px 0;
}

.mywc-attachments.is-inline .mywc-attachment-img {
    width: 98px;
    height: 74px;
    border-radius: 10px;
}

.mywc-attachments.is-inline.has-multiple {
    max-width: 322px;
}

.mywc-message-actions {
    clear: both;
    margin-top: 8px;
}

.mywc-reply-quote-btn {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
}

.mywc-report-details summary {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
}

.mywc-form.mywc-reply-form {
    max-width: 880px;
    padding: 15px;
    gap: 10px;
}

.mywc-form.mywc-reply-form h3 {
    font-size: 24px;
    line-height: 1.15;
}

@media (max-width: 760px) {
    .mywc-community {
        padding: 10px 8px 38px;
    }

    .mywc-thread-head {
        padding: 12px 0 8px;
    }

    .mywc-thread-head h1 {
        font-size: 30px;
        line-height: 1.08;
    }

    .mywc-thread-meta {
        gap: 4px 8px;
        font-size: 12px;
    }

    .mywc-messages {
        gap: 8px;
        margin: 10px 0;
    }

    .mywc-message {
        padding: 10px 11px;
        border-radius: 16px;
    }

    .mywc-message-author {
        gap: 7px;
        margin-bottom: 6px;
    }

    .mywc-message-author strong {
        font-size: 14px;
    }

    .mywc-message-author small {
        font-size: 11px;
    }

    .mywc-message-content {
        line-height: 1.42;
    }

    .mywc-message-content p {
        margin-bottom: 6px;
    }

    .mywc-attachments.is-inline {
        max-width: 104px;
        margin: 1px 9px 6px 0;
    }

    .mywc-attachments.is-inline.has-multiple {
        float: none;
        max-width: 100%;
        margin: 0 0 8px;
    }

    .mywc-attachments.is-inline .mywc-attachment-img {
        width: 88px;
        height: 66px;
        border-radius: 9px;
    }

    .mywc-attachments.is-inline.has-multiple .mywc-attachment-img {
        width: calc(33.333% - 7px);
        height: 78px;
    }

    .mywc-link-previews {
        gap: 7px;
        margin-top: 7px;
    }

    .mywc-link-preview {
        grid-template-columns: 62px minmax(0, 1fr);
        min-height: 64px;
        padding: 7px;
        gap: 8px;
        border-radius: 12px;
    }

    .mywc-link-preview-image {
        width: 62px;
        height: 52px;
        border-radius: 9px;
    }

    .mywc-link-preview-text strong {
        font-size: 14px;
    }

    .mywc-link-preview-text em {
        font-size: 12px;
    }

    .mywc-message-actions {
        margin-top: 7px;
    }

    .mywc-form.mywc-reply-form {
        padding: 12px;
        border-radius: 16px;
    }

    .mywc-form.mywc-reply-form h3 {
        font-size: 21px;
    }
}

/* Stage 26.2.10: preview selected images before submit + soft live refresh */
.mywc-file-preview-grid {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
}

.mywc-file-preview-grid.is-visible {
    display: flex;
}

.mywc-file-preview-item {
    width: 86px;
    min-width: 86px;
}

.mywc-file-preview-thumb {
    width: 86px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #5f6f39;
    border: 1px solid rgba(25, 45, 71, 0.12);
}

.mywc-file-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mywc-file-preview-name {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: #5c6470;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mywc-file-preview-note {
    align-self: center;
    font-size: 12px;
    color: #8a3d1f;
    background: #fff3e2;
    border: 1px solid rgba(138, 61, 31, 0.2);
    border-radius: 999px;
    padding: 5px 9px;
}

.mywc-messages-updated .mywc-message:last-child {
    animation: mywcMessageFadeIn 0.45s ease-out;
}

@keyframes mywcMessageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .mywc-file-preview-grid {
        gap: 6px;
        margin: 6px 0 8px;
    }

    .mywc-file-preview-item {
        width: 72px;
        min-width: 72px;
    }

    .mywc-file-preview-thumb {
        width: 72px;
        height: 56px;
        border-radius: 10px;
    }

    .mywc-file-preview-name {
        font-size: 10px;
    }
}

/* Stage 26.2.11 — file preview delete, multi-select polish and AJAX reply state */
.mywc-file-preview-item {
    position: relative;
}

.mywc-file-preview-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
}

.mywc-file-preview-status {
    font-size: 12px;
    line-height: 1.25;
    color: #64748b;
    margin: -4px 0 8px;
}

.mywc-form.is-sending {
    opacity: .86;
}

.mywc-form.is-sending textarea,
.mywc-form.is-sending input,
.mywc-form.is-sending select {
    pointer-events: none;
}

.mywc-form-ajax-error {
    margin: 0 0 8px;
}

@media (max-width: 760px) {
    .mywc-file-preview-remove {
        width: 22px;
        height: 22px;
        top: -6px;
        right: -6px;
    }
}

/* Stage 26.2.13 — community filter count */
.mywc-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}

/* Stage 26.2.14 — убрать лишний заголовок/крошки темы на странице сообщества.
   Стили подключаются только на странице с [mywiki_community], поэтому не затрагивают остальные страницы. */
body.mywc-community-page .breadcrumb,
body.mywc-community-page .breadcrumbs,
body.mywc-community-page .site-breadcrumbs,
body.mywc-community-page .woocommerce-breadcrumb,
body.mywc-community-page .page-header,
body.mywc-community-page .entry-header,
body.mywc-community-page .page-title,
body.mywc-community-page h1.entry-title {
    display: none !important;
}

body.mywc-community-page .site-main,
body.mywc-community-page .content-area,
body.mywc-community-page .main-content,
body.mywc-community-page .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.mywc-community-page .mywc-community {
    padding-top: 10px;
}

@media (max-width: 768px) {
    body.mywc-community-page .mywc-community {
        padding-top: 8px;
    }
}
