.support-page,
#support-create-sidebar .sidebar-body {
    color: var(--primary-text-color);
    font-family: 'Golos', sans-serif
}

.support-pre-body {
    height: calc(100dvh - 57px) !important;
    overflow-y: auto
}

.support-chat-title h2,
#support-create-sidebar h1 {
    margin: 0;
    font-family: 'Neue', sans-serif;
    font-weight: 400
}

.support-layout {
    display: grid;
    grid-template-columns: minmax(300px, 320px) minmax(0, 1fr);
    height: calc(100dvh - 90px);
    min-height: 760px;
    gap: 10px
}

.support-queue,
.support-chat {
    min-height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--background-color)
}

.support-queue {
    display: flex;
    flex-direction: column;
    padding: 10px
}

.support-create-ticket-button {
    width: 100%;
    min-height: 44px;
    flex: none;
    margin-bottom: 10px
}

.support-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 10px;
    background: var(--frame-color)
}

.support-tabs button {
    min-height: 40px;
    flex: 1;
    border: 0;
    border-radius: 7px;
    padding: 0 10px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font: 14px 'Golos', sans-serif
}

.support-tabs button:hover,
.support-tabs button.active {
    background: var(--inframe-color);
    color: var(--primary-text-color)
}

.support-tabs button span {
    margin-left: 3px;
    color: var(--text-dark-color);
    font-size: 12px
}

.support-ticket-list {
    min-height: 0;
    overflow: auto;
    scrollbar-color: var(--inframe-color) transparent
}

.support-ticket-card {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    border: 0;
    border-radius: 10px;
    padding: 15px;
    background: var(--frame-color);
    color: var(--primary-text-color);
    cursor: pointer;
    font-family: 'Golos', sans-serif;
    text-decoration: none;
    text-align: left;
    transition: background-color .2s
}

.support-ticket-card:hover,
.support-ticket-card.active {
    background: var(--inframe-color)
}

.support-ticket-heading {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 7px
}

.support-ticket-heading span {
    flex: none;
    color: var(--text-dark-color);
    font-size: 13px
}

.support-ticket-heading strong {
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-ticket-card>p {
    overflow: hidden;
    margin: 9px 0 14px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 19px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-ticket-card-client>p {
    margin-bottom: 12px
}

.support-client-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark-color);
    font-size: 12px
}

.support-client-answer.answered {
    color: var(--primary-color)
}

.support-client-answer i {
    font-size: 11px
}

.support-ticket-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px
}

.support-ticket-context span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px
}

.support-ticket-context small {
    color: var(--text-dark-color);
    font-size: 11px
}

.support-ticket-context b {
    overflow: hidden;
    color: var(--primary-text-color);
    font-size: 12px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-ticket-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-dark-color);
    font-size: 11px
}

.support-ticket-meta time {
    flex: none
}

.support-wait {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: var(--text-color);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-wait:before {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #8b9095;
    content: ''
}

.support-wait.yellow:before {
    background: #f2d35d
}

.support-wait.orange:before {
    background: #ff9f43
}

.support-wait.red:before {
    background: #ff5f67
}

.support-empty-list {
    padding: 38px 18px;
    color: var(--text-color);
    font-family: 'Golos', sans-serif;
    text-align: center
}

.support-loader {
    display: grid;
    min-height: 120px;
    place-items: center
}

.support-chat>.support-loader {
    flex: 1
}

.support-loader .navbar-button-loader {
    width: 28px;
    height: 28px
}

.support-chat {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 10px
}

.support-chat-empty {
    display: grid;
    min-height: 100%;
    place-content: center;
    border-radius: 10px;
    padding: 35px;
    background: var(--frame-color);
    color: var(--text-color);
    font-family: 'Golos', sans-serif;
    text-align: center
}

.support-chat-empty i {
    margin-bottom: 14px;
    color: var(--primary-color);
    font-size: 36px
}

.support-chat-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--frame-color)
}

.support-chat-title {
    min-width: 130px;
    flex: 1;
    padding-top: 3px
}

.support-chat-title h2 {
    overflow: hidden;
    margin: 0 0 6px;
    font-size: 21px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-chat-title p {
    overflow: hidden;
    margin: 0;
    color: var(--text-color);
    font-size: 13px;
    line-height: 19px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-service-info {
    display: grid;
    width: 100%;
    flex: 0 0 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: var(--text-color)
}

.support-service-info>i {
    flex: none;
    color: var(--primary-color);
    font-size: 18px
}

.support-service-info>span {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px
}

.support-service-info b {
    overflow: hidden;
    color: var(--primary-text-color);
    font-size: 13px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-service-info em {
    overflow: hidden;
    color: var(--text-dark-color);
    font-size: 11px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-service-info .grey-button {
    display: inline-flex;
    width: max-content;
    flex: none;
    align-items: center;
    gap: 7px;
    text-decoration: none
}

.support-client-chat-actions #SUPPORT_TICKET_SERVICE {
    width: 250px
}

.support-chat-actions {
    display: flex;
    width: auto;
    max-width: 100%;
    flex: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px
}

.support-chat-actions .select {
    width: 190px
}

.support-chat-actions #SUPPORT_TICKET_DEPARTMENT {
    width: 260px
}

.support-chat-actions #SUPPORT_TICKET_AGENT {
    width: 190px
}

.support-chat-actions .select-button {
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap
}

.support-chat-actions .grey-button {
    width: max-content;
    flex: none
}

.support-page .select .option.selected,
#support-create-sidebar .select .option.selected {
    background: var(--frame-color) !important;
    color: var(--primary-color)
}

.support-messages {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 10px;
    padding: 20px;
    background: var(--frame-color);
    scrollbar-color: var(--inframe-color) transparent
}

.support-message {
    width: min(76%, 720px);
    border-radius: 10px;
    padding: 14px 16px;
    background: var(--background-color);
    font-family: 'Golos', sans-serif
}

.support-message.client {
    align-self: flex-end;
    background: var(--inframe-color)
}

.support-message.agent {
    align-self: flex-start
}

.support-message-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    color: var(--text-dark-color);
    font-size: 12px
}

.support-message-head strong {
    color: var(--primary-text-color);
    font-size: 14px;
    font-weight: 500
}

.support-message-body {
    color: var(--primary-text-color);
    font-size: 15px;
    line-height: 22px;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.support-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px
}

.support-attachment {
    display: block;
    overflow: hidden;
    width: 130px;
    height: 90px;
    border-radius: 8px;
    background: var(--frame-color)
}

.support-attachment:hover img {
    transform: scale(1.04)
}

.support-attachment img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s
}

body.support-image-viewer-open {
    overflow: hidden
}

.support-image-viewer[hidden] {
    display: none
}

.support-image-viewer {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    font-family: 'Golos', sans-serif
}

.support-image-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 82%);
    backdrop-filter: blur(5px)
}

.support-image-viewer-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    width: min(96vw, 1500px);
    height: min(92vh, 1000px);
    flex-direction: column;
    gap: 8px
}

.support-image-viewer-toolbar {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    padding: 8px;
    background: var(--frame-color);
    box-shadow: 0 10px 35px rgb(0 0 0 / 25%)
}

.support-image-viewer-zoom,
.support-image-viewer-actions {
    display: flex;
    align-items: center;
    gap: 8px
}

.support-image-viewer-toolbar .grey-button {
    display: inline-flex;
    width: max-content;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none
}

.support-image-viewer-stage {
    display: grid;
    overflow: hidden;
    min-height: 0;
    flex: 1;
    border-radius: 10px;
    background: rgb(10 10 10 / 92%);
    cursor: zoom-in;
    touch-action: none;
    place-items: center
}

.support-image-viewer-stage.zoomed {
    cursor: grab
}

.support-image-viewer-stage.zoomed:active {
    cursor: grabbing
}

.support-image-viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    user-select: none;
    will-change: transform
}

.support-composer {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: var(--frame-color);
    font-family: 'Golos', sans-serif
}

.support-chat-closed {
    display: flex;
    min-height: 62px;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    padding: 15px;
    background: var(--frame-color);
    color: var(--text-color);
    font-size: 14px
}

.support-chat-closed i {
    color: var(--text-dark-color);
    font-size: 17px
}

.support-composer .input textarea {
    min-height: 90px;
    max-height: 200px;
    border: 0;
    border-radius: 10px;
    background: var(--inframe-color);
    font-family: 'Golos', sans-serif;
    font-size: 15px;
    line-height: 22px
}

.support-composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px
}

.support-composer-tools {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px
}

.support-composer-tools button,
.support-composer-actions>button {
    width: max-content
}

.support-composer-actions>button {
    flex: none
}

.support-composer-actions .support-dropzone.compact {
    width: auto;
    min-width: 220px;
    min-height: 46px;
    flex: 1;
    justify-content: center;
    margin: 0
}

.support-composer-actions .support-dropzone span {
    display: none
}

.support-file-note,
.support-form-status {
    margin: 8px 0 0;
    color: var(--text-dark-color);
    font-family: 'Golos', sans-serif;
    font-size: 13px
}

.support-form-status.error,
.support-file-note.error {
    color: #ff6b6b
}

.support-ai-loading {
    pointer-events: none
}

.support-dropzone {
    display: flex;
    min-height: 100px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    padding: 15px;
    background: var(--inframe-color);
    color: var(--text-color);
    cursor: pointer;
    font-family: 'Golos', sans-serif;
    text-align: left;
    transition: opacity .2s
}

.support-dropzone:hover,
.support-dropzone:focus,
.support-dropzone.drag-active {
    outline: 0;
    opacity: 0.7;
}

.support-dropzone i {
    color: var(--primary-color);
    font-size: 25px
}

.support-dropzone strong {
    display: block;
    margin-bottom: 3px;
    color: var(--primary-text-color);
    font: 15px 'Neue', sans-serif
}

.support-dropzone span {
    font-size: 12px;
    line-height: 17px
}

.support-dropzone.compact {
    min-height: 62px;
    justify-content: flex-start;
    margin-top: 9px;
    padding: 10px 13px;
    background: var(--inframe-color)
}

.support-dropzone.compact:hover,
.support-dropzone.compact:focus,
.support-dropzone.compact.drag-active {
    background: var(--background-color)
}

.support-dropzone.compact i {
    font-size: 20px
}

.support-dropzone.compact strong {
    display: inline;
    margin: 0 5px 0 0;
    font-size: 14px
}

.support-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.support-upload-item {
    position: relative;
    width: 82px;
    height: 62px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--inframe-color)
}

.support-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.support-upload-item button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 23px !important;
    height: 23px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    padding: 0 !important;
    background: #101112e6;
    color: #fff;
    cursor: pointer;
    font-size: 13px
}

.support-upload-item button:hover {
    background: #ff5f67
}

.support-upload-count {
    align-self: center;
    color: var(--text-dark-color);
    font-size: 12px
}

.support-create-form {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.support-create-form .select {
    width: 100%
}

.support-create-form .base-button {
    width: 100%
}

.support-sidebar-note {
    margin: 0 0 20px;
    color: var(--text-color);
    font-size: 15px;
    line-height: 22px
}

#support-create-sidebar .sidebar-body {
    max-width: 500px;
    padding: 28px
}

#support-create-sidebar .sidebar-body h1 {
    margin: 0 0 10px;
    font-size: 26px
}

#support-create-sidebar .input input,
#support-create-sidebar .input textarea {
    font-family: 'Golos', sans-serif
}

#support-create-sidebar .select-button,
#support-create-sidebar .option,
#support-create-sidebar .base-button,
#support-create-sidebar .grey-button {
    font-family: 'Neue', sans-serif
}

.support-button-loading {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: max-content;
    pointer-events: none
}

.support-button-loading:disabled {
    opacity: .8
}

.support-button-loading .navbar-button-loader {
    position: static;
    width: 18px;
    height: 18px;
    flex: none
}

@media(max-width:1250px) {
    .support-chat-head {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .support-chat-actions {
        width: 100%;
        justify-content: flex-start
    }

    .support-chat-actions #SUPPORT_TICKET_DEPARTMENT {
        width: 230px
    }

    .support-chat-actions #SUPPORT_TICKET_AGENT {
        width: 190px
    }
}

@media(max-width:1100px) {
    .support-layout {
        grid-template-columns: minmax(280px, 320px) minmax(0, 1fr)
    }
}

@media(max-width:900px) {
    .support-layout {
        grid-template-columns: 1fr
    }

    .support-layout.chat-open {
        height: auto;
        min-height: calc(100dvh - 74px)
    }

    .support-chat {
        display: none
    }

    .support-layout.chat-open .support-queue {
        display: none
    }

    .support-layout.chat-open .support-chat {
        display: flex;
        overflow: visible
    }

    .support-mobile-back {
        display: inline-flex !important
    }

    .support-message {
        width: 90%
    }
}

@media(min-width:901px) {
    .support-mobile-back {
        display: none !important
    }
}

.support-mobile-back {
    width: 40px !important;
    height: 40px;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0
}

@media(max-width:900px) {
    .support-chat-head {
        gap: 10px
    }

    .support-chat-title {
        min-width: 110px
    }

    .support-chat-actions {
        width: 100%;
        justify-content: flex-start
    }

    .support-chat-actions #SUPPORT_TICKET_DEPARTMENT {
        width: 210px
    }

    .support-chat-actions #SUPPORT_TICKET_AGENT {
        width: 160px
    }

    .support-composer {
        padding: 12px
    }

    .support-composer .input textarea {
        min-height: 82px;
        max-height: 180px;
        font-size: 14px;
        line-height: 20px
    }

    .support-composer-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 7px
    }

    .support-composer-tools {
        flex: 1;
        flex-wrap: wrap;
        gap: 7px
    }

    .support-composer-actions .support-dropzone.compact {
        order: 0;
        width: 46px;
        min-width: 46px;
        min-height: 44px;
        flex: 0 0 46px;
        justify-content: center;
        padding: 0
    }

    .support-composer-actions .support-dropzone.compact>div {
        display: none
    }

    .support-messages {
        height: max(520px, 68dvh);
        min-height: 520px;
        flex: none;
        padding: 14px
    }

    .support-message-body {
        font-size: 14px;
        line-height: 20px
    }
}

@media(max-width:560px) {
    .support-page,
    #support-create-sidebar .sidebar-body {
        font-size: 13px
    }

    .support-page button,
    .support-page .select-button,
    .support-page .option,
    .support-page input,
    .support-page textarea {
        font-size: 13px
    }

    .support-tabs button {
        padding: 0 5px;
        font-size: 12px
    }

    .support-ticket-card {
        padding: 12px
    }

    .support-ticket-heading strong {
        font-size: 14px
    }

    .support-ticket-heading span,
    .support-ticket-card>p {
        font-size: 12px
    }

    .support-chat-title h2 {
        font-size: 15px
    }

    .support-chat-title p {
        font-size: 10px;
        line-height: 14px
    }

    .support-chat-actions .select-button,
    .support-chat-actions .grey-button,
    .support-composer-actions button {
        font-size: 12px
    }

    .support-image-viewer {
        padding: 8px
    }

    .support-image-viewer-panel {
        width: 100%;
        height: 100%
    }

    .support-image-viewer-toolbar {
        align-items: stretch;
        flex-wrap: wrap
    }

    .support-image-viewer-zoom,
    .support-image-viewer-actions {
        justify-content: space-between
    }

    .support-image-viewer-actions {
        flex: 1
    }

    .support-image-viewer-actions a {
        flex: 1
    }

    .support-queue,
    .support-chat {
        padding: 8px
    }

    .support-tabs {
        margin-bottom: 8px
    }

    .support-ticket-card {
        margin-bottom: 8px
    }

    .support-agent-chat-actions {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 6px
    }

    .support-chat-actions .select {
        width: 100%
    }

    .support-chat-actions #SUPPORT_TICKET_DEPARTMENT,
    .support-chat-actions #SUPPORT_TICKET_AGENT {
        width: 100%
    }

    .support-chat-head {
        padding: 10px
    }

    .support-messages {
        height: max(540px, 70dvh);
        min-height: 540px;
        gap: 8px;
        padding: 10px
    }

    .support-message {
        width: 96%;
        padding: 11px 12px
    }

    .support-message-head {
        margin-bottom: 6px;
        font-size: 10px
    }

    .support-message-head strong {
        font-size: 12px
    }

    .support-message-body {
        font-size: 13px;
        line-height: 19px
    }

    .support-composer .input textarea {
        font-size: 13px;
        line-height: 19px
    }

    .support-composer {
        padding: 9px
    }

    .support-composer-actions {
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        gap: 5px
    }

    .support-composer-tools {
        display: contents
    }

    .support-composer-tools button {
        width: auto;
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px
    }

    .support-composer-actions .support-dropzone.compact {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
        flex: 0 0 40px
    }

    .support-composer-actions>button {
        min-width: 0
    }

    .support-composer-actions .support-send-button {
        width: 40px;
        flex: 0 0 40px;
        justify-content: center;
        padding: 0
    }

    .support-send-label {
        display: none
    }

    #support-create-dropzone {
        min-height: 54px;
        justify-content: flex-start;
        padding: 12px
    }

    #support-create-dropzone>div {
        display: none
    }

    #support-create-dropzone::after {
        color: var(--primary-text-color);
        content: 'Добавить фото';
        font: 13px 'Golos', sans-serif
    }

    #support-create-sidebar h1 {
        font-size: 20px
    }

    #support-create-sidebar input,
    #support-create-sidebar textarea,
    #support-create-sidebar button,
    #support-create-sidebar .select-button {
        font-size: 13px
    }

    #support-create-sidebar .sidebar-body {
        padding: 20px
    }
}
