
.topic-sub {
	padding: 10px;
}




/* ===============================
   КАРТИНКИ В ПОСТАХ + ПОЛНОЭКРАННЫЙ ПРОСМОТР
   =============================== */
.uname {
    background-color: #bad0ff;
    border-radius: 4px;
    padding: 6px 10px;
    display: inline-block;
    text-align: center;
    max-width: 150px;
    word-wrap: break-word;
}

.stars {
    margin-top: 4px;
    font-size: 16px;
}

.star {
    font-size: 16px;
    margin: 0 1px;
}

.filled-star {
    color: #ffd600;
}

.empty-star {
    color: #e0e0e0;
}

.admin-star {
    color: #e53935; 
}

.role-label {
    margin-top: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}


.post-text {
	width: 96%;
    padding: 1px 14px;
    background-color: #6385a840;
    border-radius: 10px;
    margin-left: 20px;
	overflow-wrap: break-word;
    word-break: break-word;
	font-family: math;
    font-size: 16px;
}

/* маленькие превью в чате */
.post-text img {
    display: inline-block;          /* чтобы не растягивались на всю ширину */
    max-width: 250px;               /* размер превью */
    max-height: 250px;
    width: auto !important;         /* переопределяем возможный width:100% от глобальных стилей */
    height: auto !important;
    border-radius: 6px;
    margin: 10px 0;
    cursor: zoom-in;
    transition: 0.2s;
    object-fit: contain;
}
.post-text img:hover {
    opacity: 0.8;
}

/* модалка на весь экран */
#imgModal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}

/* картинка в модалке – почти на весь экран, пропорции сохраняем */
#imgModal img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px black;
    cursor: zoom-out;
}

/* ===============================
   ПРОЧИЕ СТИЛИ
   =============================== */
.battons {
	margin-left: 20px;
}

.reply-quote {
    background:#e8f0ff;
    border-left:4px solid #6a9cff;
    padding:12px;
    border-radius:8px;
    margin-bottom:12px;
    cursor:pointer;
	margin-left: 20px;
	font-style: italic;
}

.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: linear-gradient(135deg, #4da3ff, #1f75ff);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: 0.25s 
ease;
    margin-top: 17px;
}

.reply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, #5bb0ff, #2a82ff);
}

.reply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.20);
}



.post-body {
	width: 100%;
}

.post-time {
    right: 15px;
    bottom: 12px;
    font-size: 13px;
    color: #6b7a8c;
    opacity: 0.75;
	margin-left: 20px;
}


.post-wrapper {
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 25px;
    display: flex;
    border: 1px solid #6a6a6a;
    scroll-margin-top: 120px;
}
.post-wrapper.highlight { animation: flash 2s; }

.reaction-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    margin-left: auto;  /* отправляет блок вправо */
    padding-left: 15px;
}

.reaction-buttons button {
    background: #fff;
    border: 1px solid #bcd0e0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    width: 60px;
}

.reaction-buttons button.active {
    background: #d9edff;
    border-color: #7bbcff;
}


@keyframes flash {
    0% { background:#fff4c2; }
    100% { background:#cae5ff; }
}

#editor {
    height:230px;
    background:white;
    border:1px solid #ccc;
    border-radius:8px;
}

.edit-btn, .delete-btn {
    margin-left:8px;
    padding:6px 10px;
    font-size:14px;
    cursor:pointer;
    border-radius:6px;
    border:1px solid #bbb;
}
.edit-btn { background:#fff7c0; }
.delete-btn { background:#ffd3d3; }





.user-link {
    color: #2769ff;
    font-weight: 600;
    text-decoration: none;
}
.user-link:hover {
    text-decoration: underline;
}



.t-h {
	background-color: #ffffff;
    color: #36495d;
    overflow-wrap: break-word;
    padding: 1px;
    margin: 0 auto;
    border-radius: 4px;
    padding-inline: 24px;
	font-family: system-ui;
    margin-top: 30px;
	box-shadow: 4px 4px 4px -4px rgb(0 0 0);
}



/* Панель редактирования */
#editPanelWrapper {
    display:none;
    overflow:hidden;
    transition: max-height 0.25s ease;
    max-height:0;
}
#editPanelInner {
    background:#ffffff;
    border:1px solid #d0d7e2;
    border-radius:10px;
    padding:15px;
    margin:10px 0 25px 70px;
}
#editEditor {
    height:200px;
    background:#fff;
    border:1px solid #ccc;
    border-radius:8px;
}

.post-user {
	text-align: center;
}

.post-user img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    border-radius: 6px;
    object-fit: cover !important;
    flex-shrink: 0;
}