/* ============================================================
   forum.css — Дополнительные стили для forum.combats2.com
   ============================================================ */

.rating_menu .logo {
    background: url(/assets/img/apple-touch-icon.png) no-repeat;
    width: 85px; height: 85px;
    background-size: contain;
    left: 0; top: -40px;
    position: absolute;
}

.login_panel input {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    font-size: 11px;
}
.login_panel .pbtn {
    width: 100%;
    text-align: center;
    display: block;
}

#sidebar_subs .forum_conf_link {
    font-size: 11px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 240px;
}

.create_btn {
    display: inline-block;
    margin-top: 4px;
}

#sidebar_confs .forum_conf_link.active {
    color: #bc0000 !important;
}

/* ============================================================

   ============================================================ */
.comment_right_col {
    position: absolute;
    right: 10px;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* Дата — абсолютно справа сверху (как в оригинале posts_style_v2) */
.comment_right_col .comment_date {
    display: block;
    position: static !important;
    height: 27px;
    line-height: 27px;
    color: #967133;
    font-weight: 600;
    font-size: 11px;
    font-family: Verdana;
    white-space: nowrap;
}

/* ============================================================

   ============================================================ */

/* Обёртка реакций */
.comment_right_col .comment_reactions.reactions {
    /* Сбрасываем ВСЕ стили из posts_style_v2 */
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    border-radius: 0 !important;
    background: none !important;
    gap: 0 !important;
    width: auto !important;
    transition: none !important;
}

/* Скрываем .total_reactions из posts_style_v2 */
.comment_right_col .comment_reactions.reactions .total_reactions {
    display: none !important;
}

/* Каждая реакция — вертикально (иконка сверху, счётчик снизу) */
.comment_right_col .comment_reactions.reactions .reaction {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    cursor: pointer;
    width: 30px !important;
    margin: 0 !important;
    padding: 2px !important;
    opacity: 1 !important;
    transition: none !important;
}

/* Иконка реакции */
.comment_right_col .comment_reactions.reactions .reaction .reaction_image {
    width: 30px !important;
    height: 30px !important;
    margin: 0 auto !important;
    background-size: 170% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    filter: grayscale(0.4);
    opacity: 0.6;
    transition: filter .2s, opacity .2s, transform .15s;
}

/* При наведении — иконка яркая и чуть крупнее */
.comment_right_col .comment_reactions.reactions .reaction:hover .reaction_image {
    filter: grayscale(0) !important;
    opacity: 1 !important;
    transform: scale(1.15);
}

/* Активная (выбранная) реакция — всегда ярко */
.comment_right_col .comment_reactions.reactions .reaction.reaction_active .reaction_image {
    filter: grayscale(0) !important;
    opacity: 1 !important;
}

/* Счётчик под иконкой */
.comment_right_col .comment_reactions.reactions .reaction .reaction_count {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #7c6d4c !important;
    text-align: center !important;
    width: 30px !important;
    min-height: 13px !important;
    line-height: 13px !important;
    margin-top: 1px !important;
    opacity: 1 !important;
}
.comment_right_col .comment_reactions.reactions .reaction .reaction_count.has_count {
    color: #5c3d00 !important;
}

/* Хедер — нужен position:relative чтобы comment_right_col позиционировалась */
.post_comments .post_comment > .comment_header {
    position: relative !important;
    padding: 5px 200px 5px 10px !important;
    min-height: 60px !important;
}

/* Автор */
.post_comments .post_comment > .comment_header .comment_author {
    display: block;
}

/* ============================================================
   Форма ответа
   ============================================================ */
.smiles_grid {
    max-height: 150px;
    overflow-y: auto;
    padding: 4px;
    background: #fffae8;
    border: 1px solid #dfd3a1;
    border-radius: 4px;
}

.post_comment_form .smiles_field .smiles_cont {
    position: static !important;
    max-height: 160px !important;
    max-width: 100% !important;
    opacity: 1 !important;
    background: #fffae8 !important;
    border: 1px solid #dfd3a1 !important;
    border-radius: 4px !important;
    padding: 4px !important;
    margin-bottom: 0 !important;
}

.send_btn, .cancel_btn {
    cursor: pointer;
    color: #967133;
    font-weight: 600;
    font-size: 11px;
    margin-right: 10px;
    transition: color .3s;
}
.send_btn:hover, .cancel_btn:hover { color: #961206; }
.send_btn {
    padding-left: 16px;
    background: url(/assets/img/send-icon.png) left center no-repeat;
    background-size: 13px;
}

.forum_post_preview .forum_post_header .post_author {
    display: inline-block;
    margin-left: 15px;
    font-size: 11px;
    color: #7c6d4c;
}

.pagination_wrap .search_cont { float: right; }

.page_message {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: red;
}

.smiles_cont img {
    max-height: 25px;
    width: auto;
    cursor: pointer;
    margin: 2px;
    vertical-align: text-bottom;
}

.forum_page_title + .forum_page_title:before {
    content: '';
    background-image: url(/assets/img/icon2.gif);
    background-size: 15px;
    width: 15px; height: 15px;
    margin: 0 5px;
    display: inline-block;
    vertical-align: initial;
}

.forum_post_preview.post_fixed:before {
    position: absolute;
    left: -20px; top: 7px;
    content: '';
    background-image: url(/assets/img/fixed.gif);
    background-size: contain;
    background-repeat: no-repeat;
    width: 14px; height: 17px;
}

#modal_create .table_edit > tbody > tr > td {
    padding: 8px;
    vertical-align: top;
}
#modal_create .table_edit > tbody > tr > td:first-child {
    width: 130px;
    text-align: right;
    font-weight: 700;
    font-size: 12px;
    padding-top: 12px;
}

.smiles_field .input_tools {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
    margin-bottom: 3px;
}

.post_comments .post_comment_form .input_tools,
.post_comment_form .input_tools,
.post_comments .post_comment_form .smiles_field .input_tools {
    display: flex !important;
    position: static !important;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
    margin-bottom: 3px;
}

.post_comments .post_comment_form .smiles_field .smiles_cont {
    display: none;
    position: static;
}
.post_comments .post_comment_form .smiles_field.active_smiles .smiles_cont {
    display: block !important;
}

.forum_page_edit_cont {
    padding: 5px 10px;
    background: #eadda9;
    margin-top: -5px;
    border-radius: 0 0 5px 5px;
    font-size: 12px;
}
.forum_page_edit_cont a {
    font-weight: 800;
    text-decoration: none;
    margin-right: 15px;
}
.forum_page_edit_cont a img { vertical-align: text-bottom; }

.post_comments .comment_author .obraz {
    position: absolute;
    left: -40px; top: 0;
    width: 28px;
}

.post_comment_form .comment_input_wrap {
    display: block !important;
    padding: 0 27px 0 0 !important;
}
.post_comment_form .comment_input_wrap .smiles_field {
    display: block !important;
    width: 100% !important;
}

/* Убираем анимацию bounce из posts_style_v2 для реакций в комментариях */
.post_comments .post_comment .comment_right_col .reactions .reaction .reaction_image {
    -webkit-animation: none !important;
    animation: none !important;
}


/* ============================================================
   Убираем двойное отображение реакций в comment_footer:
   reaction_1 из posts_style_v2 имеет opacity:1 по умолчанию,
   что дублирует reactions_summary. Скрываем popup до hover.
   ============================================================ */

/* Все реакции в popup скрыты пока нет hover */
.comment_footer .comment_reactions .reactions_popup .reaction {
    opacity: 0 !important;
    pointer-events: none !important;
}
/* При hover — показываем popup, скрываем summary */
.comment_footer .comment_reactions .reactions:hover .reactions_popup .reaction {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.comment_footer .comment_reactions .reactions:hover .reactions_summary {
    opacity: 0 !important;
    pointer-events: none !important;
}
