﻿.header-banner,
.site-footer {
    display: none;
}

.qanda-chat {
    display: flex;
    column-gap: 20px;
    padding: 20px 0;
}

.sidebar {
    flex: 1;
}

.search-bar {
    margin: 20px;
}

#searchMessagesInput {
    border: 1px solid var(--border-color);
}

.qanda-expert-list {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    padding: 0 20px 20px;
}

.qanda-expert-item {
    display: flex;
    align-items: center;
    column-gap: 10px;
    cursor: pointer;
}

.qanda-expert-avatar {
    position: relative;
    width: 50px;
}

.qanda-expert-avatar img:first-child {
    width: 100%;
    height: 50px;
    object-fit: cover;
}

.qanda-expert-avatar img:nth-child(2) {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
}

.qanda-expert-info {
    display: flex;
    flex-direction: column;
    row-gap: 2px;
}

.qanda-expert-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #2D3748;
}

.qanda-expert-level {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
}

.qanda-expert-chat {
    cursor: pointer;
    display: flex;
    padding: 6px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 6px;
    background: #F0F3F8;
}

.qanda-expert-chat img {
    width: 16px;
    height: 16px;
}

.qanda-image {
    flex: 1;
    width: 156px;
}

.qanda-image img {
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.qanda-chat-wrapper {
    flex: 3;
    border-radius: 4px;
    border: 1px solid #E4E4E4;
}

.qanda-chat-header {
    padding: 16px 40px;
    border-bottom: 1px solid #E4E4E4;
}

.qanda-chat-content,
.qanda-chat-right,
.qanda-chat-left {
    display: flex;
    flex-direction: column;
}

.qanda-chat-content {
    /*min-height: max-content;*/
    max-height: 60vh;
    justify-content: flex-start;
    row-gap: 10px;
    padding: 40px;
    overflow-y: auto;
}

.qanda-chat-right,
.qanda-chat-left {
    row-gap: 10px;
}

.qanda-chat-right {
    align-items: flex-end;
    margin-left: 120px;
}

.qanda-chat-left {
    align-items: flex-start;
    margin-right: 120px;
}

.qanda-chat-left-info {
    display: flex;
    column-gap: 10px;
    align-items: center;
}

.qanda-chat-left-info img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.qanda-chat-left-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.qanda-chat-left-time {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.qanda-chat-left-content {
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 20px;
    background-color: #f5f5f5;
}

.qanda-chat-right-content {
    padding: 10px;
    border-radius: 10px;
    background: rgba(232, 174, 14, 0.20);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.qanda-chat-right-time {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.qanda-chat-send {
    display: flex;
    align-items: flex-end;
    padding: 16px 40px;
    column-gap: 10px;
    border-top: 1px solid #E4E4E4;
}

input[type=text] {
    border: none;
}

.qanda-chat-send-input {
    background-color: transparent;
}

.qanda-chat-send-btn {
    display: flex;
    align-items: center;
    column-gap: 4px;
    padding: 12px 16px;
    border: none;
    outline: none;
    border-radius: 6px;
    color: #B60002;
    background: rgba(182, 0, 2, 0.10);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.qanda-chat-send-input {
    height: 43px !important;
}

.qanda-chat-send-btn .img-send {
    width: 20px;
    height: 20px;
}

.qanda-chat-content::-webkit-scrollbar-track {
    background: transparent;
}

.qanda-chat-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    transition: background-color 0.3s;
}

.qanda-chat-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.qanda-chat-content::-webkit-scrollbar {
    width: 4px;
    opacity: 0;
}

.qanda-chat-content:hover::-webkit-scrollbar {
    opacity: 1;
}

.message-actions {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    top: -30px;
    right: 0;
}

.qanda-chat-right:hover .message-actions,
.qanda-chat-left:hover .message-actions {
    display: flex;
    gap: 5px;
}

.message-action-btn {
    padding: 5px 10px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

    .message-action-btn:hover {
        background: #e0e0e0;
    }

.reaction-picker {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1001;
}

.reaction-emoji {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin: 0 2px;
}

    .reaction-emoji:hover {
        transform: scale(1.2);
    }

.qanda-chat-right,
.qanda-chat-left {
    position: relative;
}

.search-messages {
    padding: 10px 40px;
    border-bottom: 1px solid #E4E4E4;
    display: none;
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    display: none;
}

.search-result-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

    .search-result-item:hover {
        background: #f5f5f5;
    }

    .search-result-item.highlight {
        background: #fff3cd;
    }

.close-chat-btn {
    margin-left: auto;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

    .close-chat-btn:hover {
        background: #f0f0f0;
        border-radius: 4px;
    }

.chat-message-recalled .qanda-chat-right-content,
.chat-message-recalled .qanda-chat-left-content {
    color: #718096;
    font-style: italic;
}


@media only screen and (max-width: 768px) {
    .qanda-chat {
        padding-left: 10px;
        padding-right: 10px;
        flex-direction: column;
        row-gap: 20px;
    }

    .qanda-chat-left-time {
        white-space: nowrap;
    }
}