

.chat-page {
    min-height: 100vh;
    padding: 2px;
    max-width: 75%;
    margin: 0 auto;
}

.chat-shell {

    margin: 0 auto;
    background: var(--bg);
    border: 1px solid #4a4a4a;

    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: linear-gradient(180deg, #2c2c2c 0%, #232323 100%);
    border-bottom: 1px solid #3f3f3f;
}



.chat-subtitle {
    color: var(--muted);
    margin-top: 5px;
    font-size: 14px;
}



.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 5px;
    padding: 2px;
}

.chat-main-panel,
.chat-sidebar-box {
    background: var(--panel);

    /*border-radius: 16px;*/

}

.chat-main-panel {

}

.chat-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 6px 6px 14px 6px;
}

.chat-board-title,
.chat-sidebar-title {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
}

.chat-board-note {
    color: var(--muted);
    font-size: 13px;
}

.chat-board {
    height: 520px;
    overflow-y: auto;
    padding: 14px;
    /*border-radius: 14px;*/
    background: #303030;
    border: 1px solid #454545;
}

.chat-board::-webkit-scrollbar {
    width: 10px;
}

.chat-board::-webkit-scrollbar-thumb {
    background: #5b5b5b;
    border-radius: 20px;
}

.chat-line {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.04);
    border-radius: 14px;
}

.chat-line-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0px;
    flex-wrap: wrap;
}

.chat-line-time,
.chat-line-system-time {
    color: #9f9f9f;
    font-size: 12px;
}

.chat-line-user {
    color: var(--accent);
    font-weight: bold;
    font-size: 15px;
}

.chat-line-text {
    color: #fff;
    line-height: 1.45;
    word-break: break-word;
}

.chat-line-system {
    padding: 0;
    background: transparent;
    border: 0;
}

.chat-line-system-inner {
    padding: 9px 12px;
    border-left: 3px solid rgba(226,113,64,.65);
    background: rgba(226,113,64,.08);
    color: #f0c6b4;
    border-radius: 10px;
    font-size: 13px;
}

.chat-line-system-text {
    color: #ffd7c6;
}

.chat-form-wrap {
    /*margin-top: 14px;*/
    /*background: #323232;*/
    /*border: 1px solid #464646;*/
    /*border-radius: 14px;*/
    /*padding: 14px;*/
}

.chat-form-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.chat-input {
    flex: 1;
    min-height: 20px;
    resize: vertical;
    background: #4b4b4b;
    border: 1px solid #656565;
    color: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    outline: none;
    font-size: 15px;
}

.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(226,113,64,.14);
}

.chat-input::placeholder {
    color: #c9c9c9;
}

.chat-button {
    min-width: 130px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ea8559 0%, #d76330 100%);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 0 18px;
    box-shadow: 0 6px 18px rgba(226,113,64,.28);
}

.chat-button:hover {
    filter: brightness(1.05);
}

.chat-button:disabled {
    opacity: .7;
    cursor: default;
}

.chat-form-bottom {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.chat-sidebar-box {
    /*padding: 16px;*/
    position: sticky;
    top: 1px;
}

.chat-online-list {
    /*margin-top: 14px;*/
}

.chat-online-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.04);
    margin-bottom: 8px;
}

.chat-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8ad86f;
    box-shadow: 0 0 10px rgba(138,216,111,.5);
    flex: 0 0 10px;
}

.chat-online-name {
    color: #fff;
    font-size: 14px;
    word-break: break-word;
}

.chat-loading,
.chat-empty,
.chat-online-empty {
    color: var(--muted);
    padding: 10px 2px;
}

span.online-dot {
    color:#7cfc00; font-size:10px; position:absolute; right:0; bottom:6px;
}

div.top-users-bar {
    display: none;
}

img.chat_image {
    border:2px solid gray !important;
    border-radius:4px !important;;
    margin:5px !important;;
    max-height: 300px !important;;
    max-width: 90% !important;
    display: block;
}

div.chat-simple-user { border:1px solid orange; border-radius: 5px; display: inline-block; margin:2px; padding:4px 5px 2px 5px;  }

.chat-online-list .chat-simple-user {display: none;}
.top-users-bar .user {display:none !important; }

.chat-user-reply {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    cursor: pointer;
}

.chat-user-reply:hover,
.chat-user-reply:focus-visible {
    text-decoration: underline;
}

.chat-user-reply:focus-visible,
.chat-line-whisper:focus-visible {
    outline: 1px solid rgba(226, 113, 64, .75);
    outline-offset: 1px;
}

.chat-line-whisper {
    appearance: none;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0 -3px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: 13px/1 "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
    opacity: .42;
    filter: grayscale(.45);
    cursor: pointer;
    transition: opacity .15s ease, filter .15s ease, transform .15s ease;
}

.chat-line-whisper:hover,
.chat-line-whisper:focus-visible {
    opacity: .9;
    filter: none;
    transform: scale(1.06);
}

@media (max-width:700px) {
    .chat-line-whisper {
        width: 22px;
        height: 22px;
        margin-right: -2px;
        font-size: 15px;
    }
}


.chat-page button.chat-line-whisper,
.chat-page button.chat-user-whisper {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
    line-height: 1 !important;
    text-shadow: none !important;
    cursor: pointer !important;
}

.chat-page button.chat-line-whisper {
    width: 16px !important;
    height: 16px !important;
    margin: 0 0 0 3px !important;
    font: 13px/1 "Segoe UI Emoji", "Apple Color Emoji", sans-serif !important;
    opacity: .5;
    filter: grayscale(.35);
}

.chat-page button.chat-user-whisper {
    width: auto !important;
    height: 18px !important;
    margin: 0 0 0 2px !important;
    gap: 2px !important;
    padding: 0 2px !important;
    white-space: nowrap !important;
    font: 14px/1 "Segoe UI Emoji", "Apple Color Emoji", sans-serif !important;
    opacity: .62;
    filter: grayscale(.25);
    vertical-align: middle !important;
}

.chat-page button.chat-online-whisper {
    position: absolute !important;
    left: 50%;
    bottom: 1px;
    z-index: 4;
    margin: 0 !important;
    transform: translateX(-50%) !important;
}

.chat-user-whisper-label {
    font: 10px/1 Arial, sans-serif;
}

.chat-page button.chat-line-whisper:hover,
.chat-page button.chat-line-whisper:focus-visible,
.chat-page button.chat-user-whisper:hover,
.chat-page button.chat-user-whisper:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 1;
    filter: none;
}

@media (max-width:700px) {
    .chat-page button.chat-line-whisper {
        width: 20px !important;
        height: 20px !important;
        font-size: 15px !important;
    }

    .chat-page button.chat-user-whisper {
        width: auto !important;
        height: 18px !important;
        margin-left: 0 !important;
        gap: 0 !important;
        padding: 0 1px !important;
        font-size: 12px !important;
    }
}

@media (max-width:960px) { div.top-users-bar  {  display: inline-block; }}


@media (max-width:1810px) {.chat-page { max-width: 72%;}}
@media (max-width:1600px) {.chat-page { max-width: 70%;}}
@media (max-width:1520px) {.chat-page { max-width: 62%;}}
@media (max-width:1239px) {.chat-page { max-width: 100%;}}


@media (max-width: 960px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar-box {
        display:none;
    }
}

@media (max-width: 700px) {
    .chat-page {
        padding: 2px;
    }

    .chat-topbar,
    .chat-layout {

    }

    /*.chat-topbar,*/
    /*.chat-form-row,*/
    /*.chat-form-bottom,*/
    /*.chat-board-head {*/
    /*    display: block;*/
    /*}*/

    /*.chat-userbox,*/
    /*.chat-board-note,*/
    /*.chat-button {*/
    /*    margin-top: 10px;*/
    /*}*/

    /*.chat-button {*/
    /*    width: 100%;*/
    /*    min-height: 48px;*/
    /*}*/

    .chat-board {
        height: 420px;
    }
}
