/* NEO chat — side panel */

.block-chat-back {
    --chat-bg: #121212;
    --chat-panel: #1a1a1a;
    --chat-soft: #222222;
    --chat-line: #2a2a2a;
    --chat-text: #f2f2f2;
    --chat-muted: #8a8a8a;
    --chat-accent: var(--span, #b6ff2e);
    --chat-accent-text: #0d0d0d;
    background-color: var(--chat-bg);
    padding: 0;
    border-radius: 16px 0 0 16px;
    height: 100%;
    max-height: inherit;
    width: 380px;
    max-width: min(380px, 100vw);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--chat-line);
    border-right: 0;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.modal_okno_chat.settings-open .block-chat-back {
    border-radius: 0;
    border-left-color: var(--chat-line);
}

.chat_header {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    flex-shrink: 0;
    position: relative;
}

.chat_header_btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--chat-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s ease;
    padding: 0;
    z-index: 1;
}

.chat_header_btn svg {
    width: 18px;
    height: 18px;
    fill: var(--chat-muted);
    transition: 0.25s ease;
}

.chat_header_btn.chat_brand_icon {
    border-radius: 12px;
    background: color-mix(in srgb, var(--chat-accent) 16%, #161616);
    cursor: default;
    pointer-events: none;
}

.chat_header_btn.chat_brand_icon svg {
    fill: var(--chat-accent);
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--chat-accent) 55%, transparent));
}

.chat_header_btn:hover {
    background: #2b2b2b;
}

.chat_header_btn.chat_brand_icon:hover {
    background: color-mix(in srgb, var(--chat-accent) 16%, #161616);
}

.chat_header_btn.chat_settings_btn.active {
    background: color-mix(in srgb, var(--chat-accent) 18%, var(--chat-soft));
}

.chat_header_btn.chat_settings_btn.active svg {
    fill: var(--chat-accent);
}

.chat_header_title {
    text-align: center;
    min-width: 0;
}

.chat_header_title h2 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.chat_header_online {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--chat-muted);
    font-size: 12px;
    font-weight: 500;
}

.chat_online_dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--chat-accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--chat-accent) 70%, transparent);
}

.chat_online_bar {
    display: flex;
    align-items: center;
    padding: 0 16px 10px;
    flex-shrink: 0;
}

.chat_peoples_wrap {
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.chat_peoples {
    display: flex;
    gap: 5px;
    min-height: 25px;
    flex-wrap: wrap;
}

.chat_peoples .ava {
    cursor: pointer;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    opacity: 0.7;
    transition: 0.3s;
    object-fit: cover;
}

.chat_peoples .ava:hover {
    opacity: 1;
}

.chat_settings_panel {
    display: none;
    width: 320px;
    min-width: 280px;
    max-width: 340px;
    flex-shrink: 0;
    height: 100%;
    max-height: inherit;
    overflow: auto;
    background: #0b0b0b;
    border: 1px solid #222;
    border-right: 0;
    border-radius: 16px 0 0 16px;
    padding: 0;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.chat_settings_panel.open {
    display: flex;
    flex-direction: column;
}

.chat_settings_dialog {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
    height: 100%;
}

.chat_shell {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: min(920px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    width: max-content;
    max-width: 100vw;
}

.chat_settings_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chat_settings_head h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.chat_settings_close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #9a9a9a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat_settings_close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.chat_settings_close:hover {
    color: #fff;
    background: #1a1a1a;
}

.chat_settings_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.chat_settings_row_text {
    min-width: 0;
}

.chat_settings_label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chat_settings_hint {
    color: #8a8a8a;
    font-size: 12px;
    line-height: 1.35;
}

.chat_settings_block {
    margin-bottom: 18px;
}

.chat_settings_block:last-child {
    margin-bottom: 0;
}

.chat_switch {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex-shrink: 0;
}

.chat_switch .chat_checkbox {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.chat_switch_ui {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #2a2a2a;
    position: relative;
    transition: 0.2s ease;
}

.chat_switch_ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s ease;
}

.chat_switch .chat_checkbox:checked + .chat_switch_ui {
    background: var(--span, #b6ff2e);
}

.chat_switch .chat_checkbox:checked + .chat_switch_ui::after {
    transform: translateX(20px);
}

.chat_seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
    background: #151515;
    border-radius: 10px;
    padding: 4px;
}

.chat_seg_btn {
    border: none;
    background: transparent;
    color: #9a9a9a;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.chat_seg_btn.active {
    background: var(--span, #b6ff2e);
    color: #0d0d0d;
}

.chat_volume_row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.chat_volume_icon {
    width: 18px;
    height: 18px;
    fill: #9a9a9a;
    flex-shrink: 0;
}

#chat_volume_range {
    flex: 1;
    min-width: 0;
    accent-color: var(--span, #b6ff2e);
    cursor: pointer;
}

#chat_volume_value {
    color: #cfcfcf;
    font-size: 12px;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}

.chat_volume_play {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: #1b1b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat_volume_play svg {
    width: 14px;
    height: 14px;
    fill: var(--span, #b6ff2e);
}

.chat_volume_play:hover {
    background: #242424;
}

.block-chat-back.chat-text-sm .chat_message_content,
.block-chat-back.chat-text-sm .chat_nickname {
    font-size: 12px;
}

.block-chat-back.chat-text-md .chat_message_content {
    font-size: 13px;
}

.block-chat-back.chat-text-lg .chat_message_content,
.block-chat-back.chat-text-lg .chat_nickname {
    font-size: 15px;
}

.block-chat-back.chat-density-compact .chat_message,
.block-chat-back.chat-density-compact .chat_message_my {
    margin-bottom: 2px;
}

.block-chat-back.chat-density-compact #chat_main_content {
    gap: 6px;
}

.block-chat-back.chat-density-normal #chat_main_content {
    gap: 12px;
}

.block-chat-back.chat-density-spacious #chat_main_content {
    gap: 18px;
}

.block-chat-back.chat-density-spacious .chat_message_content {
    line-height: 1.55;
}

.chat_pinned {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 16px 14px;
    border-bottom: 1px solid var(--chat-line);
    flex-shrink: 0;
    position: relative;
}

.chat_pinned_icon {
    width: 14px;
    height: 14px;
    fill: var(--chat-accent);
    flex-shrink: 0;
    margin-top: 3px;
}

.chat_pinned.is-pinned .chat_pinned_icon {
    fill: #f0c14b;
}

.chat_pinned_body {
    min-width: 0;
    flex: 1;
}

.chat_pinned_author {
    color: var(--chat-accent);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat_pinned_author[hidden],
.chat_unpin_btn[hidden] {
    display: none !important;
}

.chat_pinned_text {
    color: var(--chat-text);
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.chat_unpin_btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--chat-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-top: -2px;
}

.chat_unpin_btn:hover {
    color: #ff5b5b;
    background: rgba(255, 91, 91, 0.12);
}

#chat_main_content {
    display: flex;
    width: 100%;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: auto;
    background-color: transparent;
    border-radius: 0;
    flex-direction: column;
}

#chat_main_content::-webkit-scrollbar {
    width: 4px;
}

#chat_main_content::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 10px;
}

.chat_message,
.chat_message_my {
    display: block;
    background: #1a1a1a;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.chat_message:hover,
.chat_message_my:hover {
    background: #242424;
}

.chat_message .padding,
.chat_message_my .padding {
    padding: 10px 12px;
    background: transparent;
    border-radius: 0;
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.chat_msg_avatar {
    flex-shrink: 0;
}

.chat_message .chat_msg_avatar img,
.chat_message_my .chat_msg_avatar img {
    width: 34px;
    height: 34px;
    cursor: pointer;
    border-radius: 8px;
    opacity: 1;
    transition: 0.3s;
    object-fit: cover;
    float: none;
}

.chat_msg_body {
    min-width: 0;
    flex: 1;
}

.chat_message .chat_info,
.chat_message_my .chat_info {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: baseline;
    margin: 0;
}

.chat_info_user {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.chat_info_right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.chat_msg_menu {
    position: relative;
}

.chat_msg_menu_btn {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--chat-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.55;
}

.chat_message:hover .chat_msg_menu_btn,
.chat_msg_menu.is-open .chat_msg_menu_btn {
    opacity: 1;
}

.chat_msg_menu_btn:hover {
    color: var(--chat-text);
    background: rgba(255, 255, 255, 0.06);
}

.chat_msg_menu_dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    padding: 6px;
    border-radius: 10px;
    background: #1e1e1e;
    border: 1px solid var(--chat-line);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    z-index: 40;
}

.chat_msg_menu.is-open .chat_msg_menu_dropdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat_msg_menu_item {
    border: 0;
    background: transparent;
    color: var(--chat-text);
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.chat_msg_menu_item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.chat_msg_menu_item.chat_ban_user:hover {
    color: #ff5b5b;
    background: rgba(255, 91, 91, 0.12);
}

.chat_ban_modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.chat_ban_modal[hidden] {
    display: none !important;
}

.chat_ban_dialog {
    width: 100%;
    max-width: 360px;
    background: #1a1a1a;
    border: 1px solid var(--chat-line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.chat_ban_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.chat_ban_head h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.chat_ban_close {
    border: 0;
    background: transparent;
    color: var(--chat-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.chat_ban_target {
    margin: 0 0 12px;
    color: var(--chat-muted);
    font-size: 13px;
}

.chat_ban_target strong {
    color: #fff;
}

.chat_ban_label {
    display: block;
    color: var(--chat-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

#chat_ban_reason,
#chat_ban_amount,
#chat_ban_unit {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 10px;
    background: var(--chat-soft, #242424);
    color: var(--chat-text);
    padding: 10px 12px;
    margin-bottom: 12px;
    outline: 0;
    font-size: 13px;
}

.chat_ban_duration {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.chat_ban_duration #chat_ban_amount {
    width: 40%;
    margin-bottom: 0;
}

.chat_ban_duration #chat_ban_unit {
    width: 60%;
    margin-bottom: 0;
}

.chat_ban_actions {
    display: flex;
    gap: 8px;
}

.chat_ban_cancel,
.chat_ban_confirm {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.chat_ban_cancel {
    background: rgba(255, 255, 255, 0.06);
    color: var(--chat-text);
}

.chat_ban_confirm {
    background: #c44;
    color: #fff;
}

.chat_ban_confirm:hover {
    background: #d55;
}

.chat_badges_row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.chat_nickname {
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    transition: 0.25s;
    white-space: nowrap;
}

.chat_nickname:hover {
    color: var(--chat-accent);
}

.chat_role {
    font-size: 9px;
    background-color: var(--chat-soft);
    border-radius: 4px;
    padding: 2px 7px;
}

.chat_badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border-radius: 4px;
    padding: 3px 7px;
    white-space: nowrap;
}

.chat_badge_dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat_badge_vip {
    color: #f5c542;
    background: rgba(245, 197, 66, 0.12);
    border: 1px solid rgba(245, 197, 66, 0.35);
}

.chat_badge_vip .chat_badge_dot {
    background: #f5c542;
}

.chat_badge_site {
    border: 1px solid transparent;
}

.chat_badge_admin {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--span, #b6ff2e);
    fill: currentColor;
}

.chat_msg_time {
    color: var(--chat-muted);
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.chat_message div > .chat_message_content,
.chat_message_my div > .chat_message_content {
    padding: 4px 0 0;
    margin: 0;
    font-size: 13px;
    min-width: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    text-align: left;
    color: #d8d8d8;
    line-height: 1.4;
}

.chat_message_content a[id_steam] {
    color: var(--chat-accent);
    font-weight: 600;
}

.chat_message_content a[id_steam]::before {
    content: "↩ ";
    font-size: 11px;
}

.chat_message a:hover,
.chat_message_my a:hover {
    color: var(--chat-accent);
}

.chat_message .chat_message_date,
.chat_message_my .chat_message_date {
    display: flex;
    gap: 10px;
    font-size: 11px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 4px;
    justify-content: space-between;
}

.chat_message_date:empty {
    display: none;
}

.chat_message_date > .mention_chat,
.chat_message_date > .del_chat {
    color: var(--chat-accent);
    cursor: pointer;
    transition: 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    text-decoration: none;
}

.chat_action_icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
    pointer-events: none;
}

.chat_reply_btn span {
    font-size: 11px;
}

.chat_delete_btn {
    width: 22px;
    height: 22px;
    justify-content: center;
    border-radius: 6px;
    color: var(--chat-muted) !important;
}

.chat_message_date > .mention_chat:hover {
    color: #fff;
}

.chat_message_date > .del_chat:hover {
    color: #ff5b5b !important;
    background: rgba(255, 91, 91, 0.12);
}

.chat_footer_send {
    display: flex;
    background-color: transparent;
    padding: 12px 16px 16px;
    gap: 10px;
    border-radius: 0;
    position: relative;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid var(--chat-line);
    flex-wrap: wrap;
}

.chat_composer {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    position: relative;
}

.chat_mute_banner {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 91, 91, 0.1);
    border: 1px solid rgba(255, 91, 91, 0.28);
}

.chat_mute_banner[hidden],
.chat_composer[hidden] {
    display: none !important;
}

.chat_mute_banner_title {
    color: #ff7b7b;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat_mute_banner_text {
    color: var(--chat-text);
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.chat_mute_banner_left {
    margin-top: 8px;
    color: var(--chat-muted);
    font-size: 12px;
}

.chat_mute_banner_left span {
    color: #fff;
    font-weight: 600;
}

.chat_footer_send > form,
.chat_composer > form {
    width: 100%;
    min-width: 0;
}

#chat_send_message > textarea {
    outline: 0;
    resize: none;
    float: none;
    min-height: 46px;
    max-height: 100px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 12px;
    line-height: 1.4;
    padding: 12px 48px 12px 14px;
    word-wrap: break-word;
    box-sizing: border-box;
    background-color: var(--chat-soft);
    border: 0;
    color: var(--chat-text);
}

#chat_send_message > textarea::placeholder {
    color: var(--chat-muted);
}

.chat_smile_btn {
    cursor: pointer;
    position: absolute;
    display: flex;
    right: 60px;
    height: 46px;
    transition: 0.25s;
    align-items: center;
    user-select: none;
}

.chat_smile_btn svg {
    fill: var(--chat-muted);
    transition: 0.25s;
    width: 18px;
    height: 18px;
    user-select: none;
    z-index: 1;
}

.chat_smile_btn:hover svg {
    fill: var(--chat-accent);
}

.chat_menu_smile {
    opacity: 0;
    pointer-events: none;
    bottom: 0;
    right: 0;
    display: flex;
    position: absolute;
    width: min(290px, calc(100% - 8px));
    flex-wrap: wrap;
    border-radius: 12px;
    padding: 10px;
    user-select: none;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.55);
    background-color: var(--chat-panel);
    border: 1px solid var(--chat-line);
    transition: opacity 0.3s, bottom 0.3s;
    z-index: 5;
}

.chat_menu_smile.active {
    opacity: 1;
    pointer-events: auto;
    bottom: 56px;
}

.chat_menu_smile .smiley_js {
    cursor: pointer;
    width: 30px;
    height: 30px;
    font-size: 20px;
    opacity: 0.55;
    transition: 0.25s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat_menu_smile .smiley_js:hover {
    opacity: 1;
}

.chat_send_btn,
.chat_footer_send > button {
    cursor: pointer;
    height: 46px;
    width: 46px;
    min-width: 46px;
    border-radius: 12px;
    transition: 0.25s;
    background-color: var(--chat-soft);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
}

.chat_send_btn svg,
.chat_footer_send > button > svg {
    transition: 0.25s;
    fill: #fff;
    width: 16px;
    height: 16px;
}

.chat_send_btn:hover,
.chat_footer_send > button:hover {
    background-color: var(--chat-accent);
}

.chat_send_btn:hover svg,
.chat_footer_send > button:hover svg {
    fill: var(--chat-accent-text);
}

.chat_login_prompt {
    flex: 1;
    min-height: 46px;
    border-radius: 12px;
    background: var(--chat-soft);
    color: var(--chat-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.25s;
}

.chat_login_prompt:hover {
    color: #fff;
    background: #2b2b2b;
}

.chat_checkbox {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.chat_checkbox:disabled + .toggle-track {
    cursor: not-allowed;
    opacity: 0.7;
}

.toggle-track {
    background-color: #111;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    height: 20px;
    position: relative;
    width: 40px;
    align-items: center;
}

.toggle-indicator {
    color: #111;
    background-color: var(--chat-accent);
    border-radius: 6px;
    display: flex;
    position: absolute;
    transition: 0.25s;
}

.checkMark {
    fill: #111;
    height: 20px;
    width: 20px;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.chat_checkbox:checked + .toggle-track .toggle-indicator {
    transform: translateX(20px);
}

.chat_checkbox:checked + .toggle-track .toggle-indicator .checkMark {
    opacity: 1;
}

label[for="chat_checkbox_call"] {
    display: flex;
    gap: 15px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    align-items: center;
    color: var(--chat-muted);
}

.modal_okno_chat {
    position: fixed;
    transform: translate(100%, -50%);
    z-index: 9999;
    padding: 0;
    transition: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    right: 2px;
    top: 50%;
    max-height: 100%;
    width: auto;
    max-width: min(100vw, 740px);
    pointer-events: none;
    overflow: visible;
}

.chat_collapse_tab {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    z-index: 3;
    width: 18px;
    height: 48px;
    padding: 0;
    margin: 0;
    border: 1px solid #2a2a2a;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #121212;
    color: #9a9a9a;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: -6px 0 16px rgba(0, 0, 0, 0.35);
    transition: color 0.2s ease, background 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.modal_okno_chat.show .chat_collapse_tab {
    display: inline-flex;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.chat_collapse_tab svg {
    width: 12px;
    height: 12px;
    display: block;
}

.chat_collapse_tab:hover {
    color: #fff;
    background: #1a1a1a;
}

.modal_okno_chat.show {
    transform: translate(0%, -50%);
    pointer-events: auto;
}

.modal_okno_chat.settings-open {
    max-width: min(100vw, 740px);
}

.chat_background.show {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    background-color: transparent;
    backdrop-filter: none;
    opacity: 1;
    pointer-events: none;
}

.chat_background {
    transition: 0.5s all;
    opacity: 0;
    position: fixed;
    pointer-events: none;
}

.chat_open {
    background-color: #2a2a2a;
    color: #fff;
    outline: none;
    border: none;
    cursor: pointer;
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1000;
    width: 44px;
    min-height: 110px;
    padding: 14px 8px;
    border-radius: 12px 0 0 12px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.35);
    transition: background 0.25s ease, transform 0.25s ease;
}

.chat_open:hover {
    background-color: #333;
}

.chat_open svg {
    fill: #fff;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chat_open_label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    line-height: 1;
}

.chat_open span#chat_count,
.chat_open > span:not(.chat_open_label) {
    position: absolute;
    top: -8px;
    left: -8px;
    right: auto;
    font-weight: 700;
    width: 22px;
    height: 22px;
    display: flex;
    border-radius: 50%;
    color: var(--chat-accent-text, #0d0d0d);
    border: none;
    font-size: 11px;
    background-color: var(--span, #b6ff2e);
    justify-content: center;
    align-items: center;
    writing-mode: horizontal-tb;
    transform: none;
}

.reload-mess,
.chat_no_msg {
    display: flex;
    height: 100%;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    color: var(--chat-muted);
    font-size: 13px;
}

.chat_message_content emoji {
    font-size: 18px;
}

@media (max-width: 768px) {
    .modal_okno_chat,
    .modal_okno_chat.show {
        max-width: 100%;
        top: 0;
        right: 0;
        left: 0;
        transform: translateX(100%);
        height: calc(100% - 4rem - env(safe-area-inset-bottom, 0px));
        max-height: calc(100% - 4rem - env(safe-area-inset-bottom, 0px));
        padding: 0;
        width: 100%;
    }

    .modal_okno_chat.show {
        transform: translateX(0);
    }

    .chat_collapse_tab {
        left: 0;
        transform: translateY(-50%);
        border-radius: 0 10px 10px 0;
        border: 1px solid #2a2a2a;
        border-left: 0;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.25);
    }

    .modal_okno_chat.show .chat_collapse_tab {
        display: inline-flex;
    }

    .modal_okno_chat.settings-open {
        max-width: 100%;
    }

    .chat_shell {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        flex-direction: column;
    }

    .chat_settings_panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        max-height: 42%;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid #222;
        box-shadow: none;
    }

    .block-chat-back {
        width: 100%;
        max-width: 100%;
        height: auto;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .modal_okno_chat.settings-open .block-chat-back {
        border-radius: 0;
    }

    .chat_footer_send {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--chat-bg, #121212);
        z-index: 2;
    }

    #chat_main_content {
        padding-bottom: 8px;
    }

    .chat_open {
        top: auto;
        bottom: calc(4rem + 12px + env(safe-area-inset-bottom, 0px));
        right: 0;
        transform: none;
        z-index: 1001;
    }
}
