/* ===== Основной контейнер ===== */
#summary, .post-content, .post-gallery, .post-price, .post-mention, .post-like-row, .comments-section, .comment-form, .post-report {
    max-width: 800px;
}

/* ===== Цена вопроса ===== */
.post-price {
    margin-top: 24px;
    padding: 14px 18px;
    background: #f0f9ff;
    border: 1px solid #bae0fd;
    border-radius: 10px;
    display: inline-block;
}
.post-price__label {
    font-size: 14px;
    color: #4b6070;
    margin-right: 6px;
}
.post-price__value {
    font-size: 20px;
    font-weight: 700;
    color: #0b4f7a;
}

/* ===== Заголовок поста ===== */
#summary h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f2933;
}

/* ===== Главное фото (cover) ===== */
#summary .post-main-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ===== Фото в тексте и галерее — натуральные пропорции ===== */
.post-gallery-img,
.post-content img,
.post-embedded-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0;
}

/* ===== Галерея ===== */
.post-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* ===== Параграфы в тексте ===== */
.post-content p { margin: 0 0 12px 0; }
.post-content p:has(img) { margin: 0 0 16px 0; }
.post-content p:has(img):last-child { margin-bottom: 0; }

/* ===== Метаданные ===== */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
}
.post-meta a { color: #0B1F33; text-decoration: none; transition: text-decoration 0.2s ease; }
.post-meta a:hover { text-decoration: underline; }

/* ===== Контент поста ===== */
.post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #1f2933;
    margin-bottom: 32px;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: justify;
}
.post-body-text ol, .post-body-text ul { padding-left: 1.6em; margin: 0.4em 0; }
.post-body-text ol { list-style: decimal; }
.post-body-text ul { list-style: disc; }
.post-body-text li { margin: 0.15em 0; }
.post-content a, .post-body-text a {
    color: #0b2a48;
    text-decoration: underline;
    text-decoration-color: #c8d9ea;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}
.post-content a:hover, .post-body-text a:hover { text-decoration-color: #0b2a48; }

/* ===== Лайк поста ===== */
.post-like-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; margin-bottom: 4px; }

/* ===== Кнопки ===== */
.post-actions { display: flex; gap: 12px; margin-bottom: 24px; }

.btn {
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 14px;
}
.edit-btn { background-color: #6b7280; color: white; text-decoration: none; }
.edit-btn:hover { background-color: #4b5563; transform: translateY(-1px); }
.delete-btn { background-color: rgba(239,68,68,0.85); color: white; }
.delete-btn:hover { background-color: rgba(185,28,28,0.85); transform: translateY(-1px); }

/* ===== Комментарии ===== */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 0;
    color: #1f2933;
}

.comments-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comments-empty { color: #9ca3af; font-size: 14px; }

.comment-deleted { font-size: 13px; color: #9ca3af; font-style: italic; padding: 4px 0; }
.comment-deleted-wrapper { display: flex; align-items: center; justify-content: space-between; }

.comment-item {
    background: #fff; border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.comment-item--reply {
    margin-left: 48px;
    border-left: 3px solid #e5e7eb;
    border-radius: 0 10px 10px 0;
}

.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex-shrink: 0; border: 1px solid #e5e7eb; }
.comment-avatar--placeholder {
    width: 36px; height: 36px; border-radius: 9px;
    background: #0B1F33; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0; text-decoration: none;
}
.comment-meta { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.comment-meta__left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.comment-meta__right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.comment-display_name { font-weight: 600; font-size: 14px; color: #1f2933; text-decoration: none; }
.comment-display_name:hover { text-decoration: underline; }
.comment-author-badge {
    font-size: 11px; font-weight: 600; color: #0B1F33;
    background: #eff6ff; padding: 1px 6px; border-radius: 4px;
}
.comment-time { font-size: 12px; color: #9ca3af; }
.comment-edited { font-size: 11px; color: #9ca3af; font-style: italic; }
.comment-body { font-size: 14px; color: #374151; line-height: 1.6; margin-bottom: 10px; }

.comment-actions { display: flex; align-items: center; gap: 16px; }
.comment-like-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none; cursor: pointer;
    font-size: 13px; color: #6b7280; padding: 0; transition: color 0.15s;
}
.comment-like-btn:hover, .comment-like-btn.liked { color: #0B1F33; }
.comment-like-btn svg { flex-shrink: 0; }
.comment-reply-btn {
    background: none; border: none; cursor: pointer;
    font-size: 13px; color: #6b7280; padding: 0; transition: color 0.15s;
}
.comment-reply-btn:hover { color: #0B1F33; }

.comment-menu { position: relative; }
.comment-menu-btn {
    background: none; border: none; cursor: pointer;
    color: #9ca3af; padding: 0 4px; font-size: 18px; line-height: 1;
}
.comment-menu-btn:hover { color: #374151; }
.comment-menu-dropdown {
    display: none; position: absolute; right: 0; top: 100%;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 130px; z-index: 100; overflow: hidden;
}
.comment-menu-dropdown.open { display: block; }
.comment-menu-item {
    display: block; width: 100%; padding: 9px 14px;
    background: none; border: none; text-align: left;
    font-size: 13px; color: #374151; cursor: pointer;
}
.comment-menu-item:hover { background: #f9fafb; }
.comment-menu-item--danger { color: #dc2626; }
.comment-menu-item--danger:hover { background: #fef2f2; }

.comment-edit-form { display: none; margin-top: 8px; }
.comment-edit-form textarea {
    width: 100%; padding: 8px 10px; border-radius: 6px;
    border: 1px solid #d1d5db; font-size: 14px; font-family: inherit;
    resize: vertical; min-height: 60px;
}
.comment-edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.comment-edit-save {
    padding: 5px 14px; background: #0B1F33; color: #fff;
    border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.comment-edit-cancel {
    padding: 5px 14px; background: #f3f4f6; color: #374151;
    border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; cursor: pointer;
}

.reply-indicator {
    display: flex; align-items: center; gap: 8px;
    background: #eff6ff; padding: 6px 12px; border-radius: 6px;
    font-size: 13px; color: #0B1F33; margin-bottom: 8px;
}
.reply-indicator button {
    background: none; border: none; cursor: pointer;
    color: #6b7280; font-size: 14px; padding: 0; margin-left: auto;
}

.inline-reply-form {
    margin-top: 8px; margin-left: 48px;
    overflow: hidden; max-height: 0; opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.inline-reply-form.open { max-height: 200px; opacity: 1; }
.inline-reply-textarea {
    width: 100%; padding: 8px 10px; border-radius: 6px;
    border: 1px solid #d1d5db; font-size: 14px; font-family: inherit;
    resize: none; min-height: 56px; transition: border-color 0.15s;
}
.inline-reply-textarea:focus {
    outline: none; border-color: #0B1F33;
    box-shadow: 0 0 0 3px rgba(23,90,156,0.1);
}
.inline-reply-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ===== Форма комментария ===== */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.comment-form p { margin: 0; }

.comment-form-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid #e5e7eb;
}
.comment-form-avatar--placeholder {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #0B1F33;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
.comment-form-row textarea {
    flex: 1;
    min-width: 0;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #0B1F33;
    box-shadow: 0 0 0 3px rgba(23,90,156,0.15);
}
.submit-comment-btn {
    align-self: flex-start;
    padding: 8px 20px;
    background-color: #0B1F33;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.submit-comment-btn:hover {
    background-color: #13477a;
    transform: translateY(-1px);
}

/* ===== Модалка удаления ===== */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    justify-content: center; align-items: center; z-index: 9999;
}
.modal-content {
    background: #fff; padding: 28px 28px 24px;
    border-radius: 12px; max-width: 420px; width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex; flex-direction: column; gap: 12px;
}
.modal-content h3 { font-size: 17px; font-weight: 600; margin: 0; color: #111; }
.modal-content p { font-size: 14px; color: #374151; margin: 0; }
.modal-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.modal-buttons .danger {
    background: #dc2626; color: #fff;
    padding: 8px 18px; border-radius: 7px; font-weight: 600; border: none; cursor: pointer; font-size: 14px; transition: background 0.2s;
}
.modal-buttons .danger:hover { background: #b91c1c; }
.modal-buttons .cancel {
    padding: 8px 18px; border: 1px solid #d1d5db; border-radius: 7px;
    background: #f9fafb; font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.modal-buttons .cancel:hover { background: #e5e7eb; }

