.support-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    z-index: 1050;
}

.support-chat-launcher {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 10px 28px rgba(20, 85, 213, .38);
    color: #fff;
    cursor: pointer;
    outline: none;
    transition: transform .2s ease, background .2s ease;
}

.support-chat-launcher:hover {
    background: #0d3b9d;
    transform: translateY(-2px);
}

.support-chat-launcher > i {
    font-size: 23px;
}

.support-chat-launcher-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 11px;
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.support-chat-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    display: flex;
    width: 370px;
    height: min(560px, calc(100vh - 120px));
    overflow: hidden;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px) scale(.98);
    transform-origin: right bottom;
    border: 1px solid #e3e8ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(25, 45, 76, .2);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.support-chat-widget.is-open .support-chat-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #0d3b9d);
    color: #fff;
    line-height: 18px;
}

.support-chat-header strong,
.support-chat-header small {
    display: block;
}

.support-chat-header strong {
    margin-top: 3px;
    font-size: 18px;
}

.support-chat-header small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
}

.support-chat-online {
    color: #d8ffe6;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.support-chat-online i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
    background: #53e58a;
}

.support-chat-widget.is-busy .support-chat-online {
    color: #fff0d6;
}

.support-chat-widget.is-busy .support-chat-online i {
    background: var(--orange);
}

.support-chat-widget.is-offline .support-chat-online {
    color: #e1e7f2;
}

.support-chat-widget.is-offline .support-chat-online i {
    background: #aeb9c8;
}

.support-chat-header button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    outline: none;
}

.support-chat-guest-fields {
    display: flex;
    gap: 8px;
    padding: 11px 13px;
    border-bottom: 1px solid #e8edf3;
    background: #f7f9fc;
}

.support-chat-guest-fields .form-control {
    height: 34px;
    min-width: 0;
    font-size: 12px;
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #fbfcfe;
    scrollbar-color: #666 #eee;
    scrollbar-width: thin;
}

.support-chat-message {
    clear: both;
    max-width: 82%;
    margin-bottom: 15px;
}

.support-chat-message-name {
    display: block;
    margin-bottom: 3px;
    color: #7c899d;
    font-size: 11px;
    font-weight: 700;
}

.support-chat-message-body {
    max-width: 100%;
    margin: 0 0 3px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    border: 1px solid #e5eaf0;
    border-radius: 4px 13px 13px;
    background: #fff;
    color: #3f4c60;
    font-size: 13px;
    line-height: 1.5;
}

.support-chat-message time {
    color: #9ca6b4;
    font-size: 10px;
}

.support-chat-message.is-mine {
    float: right;
    text-align: right;
}

.support-chat-message.is-mine .support-chat-message-body {
    border-color: var(--primary);
    border-radius: 13px 4px 13px 13px;
    background: var(--primary);
    color: #fff;
    text-align: left;
}

.support-chat-link {
    color: #0a62d0;
    text-decoration: underline;
    font-weight: 700;
}

.support-chat-link.is-whatsapp {
    color: #18a957;
}

.support-chat-message.is-mine .support-chat-link {
    color: #fff;
}

.support-chat-video-preview {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    margin-top: 9px;
    border-radius: 8px;
    background: #14233a;
    line-height: 0;
}

.support-chat-video-preview img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 112px;
    object-fit: cover;
    opacity: .86;
    transition: opacity .2s ease, transform .2s ease;
}

.support-chat-video-preview:hover img {
    opacity: 1;
    transform: scale(1.025);
}

.support-chat-video-preview i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff2434;
    font-size: 42px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.support-chat-attachment {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.support-chat-message:not(.is-mine) .support-chat-attachment {
    color: #0a62d0;
}

.support-chat-file-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    object-fit: contain;
}

.support-chat-attachment > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-chat-attachment > i {
    margin-left: auto;
    font-size: 12px;
}

.support-chat-voice-note {
    display: block;
    width: 100%;
    min-width: 220px;
    max-width: 100%;
    margin-top: 8px;
    height: 34px;
}

.support-chat-video-attachment {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 230px;
    margin-top: 8px;
    border-radius: 8px;
    background: #172438;
}

.support-chat-image-preview {
    position: relative;
    display: block;
    overflow: hidden;
    width: min(255px, 100%);
    margin-top: 8px;
    padding: 0;
    border: 1px solid rgba(37, 54, 79, .16);
    border-radius: 8px;
    background: #edf2f8;
    cursor: zoom-in;
}

.support-chat-image-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    transition: transform .2s ease, opacity .2s ease;
}

.support-chat-image-preview:hover img {
    transform: scale(1.025);
    opacity: .88;
}

.support-chat-image-preview > span {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(25, 39, 58, .75);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.support-chat-image-name {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-chat-message:not(.is-mine) .support-chat-image-name {
    color: #0a62d0 !important;
}

.support-chat-image-dialog {
    position: fixed;
    z-index: 1500;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 28, 43, .78);
    cursor: zoom-out;
}

.support-chat-image-dialog-content {
    position: relative;
    display: flex;
    overflow: hidden;
    width: min(760px, 100%);
    max-height: 100%;
    flex-direction: column;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 22px 65px rgba(0, 0, 0, .35);
    cursor: default;
}

.support-chat-image-dialog-content > img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    background: #172438;
}

.support-chat-image-dialog-content > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    color: #3d4e65;
    font-size: 12px;
    font-weight: 700;
}

.support-chat-image-dialog-content > div span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-chat-image-dialog-content > div a {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 11px;
}

.support-chat-image-dialog-close {
    position: absolute;
    z-index: 1;
    top: 9px;
    right: 9px;
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 31, 47, .76);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
}

.support-chat-image-dialog-close:hover {
    background: #dc3545;
}

.support-chat-error {
    color: var(--danger);
    font-size: 12px;
}

.support-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 11px 12px;
    border-top: 1px solid #e3eaf2;
    background: linear-gradient(180deg, #fff 0%, #f6f9fd 100%);
}

.support-chat-composer-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: center;
    gap: 1px;
    padding: 3px;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(36, 61, 93, .05);
}

.support-chat-tool {
    display: inline-flex;
    width: 27px;
    height: 29px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667993;
    cursor: pointer;
    font-size: 15px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.support-chat-tool:hover, .support-chat-tool:focus {
    background: #eaf2ff;
    color: var(--primary);
    outline: none;
    transform: translateY(-1px);
}

.support-chat-tool.is-recording {
    background: #dc3545;
    color: #fff;
    animation: support-chat-recording 1.1s infinite;
}

.support-chat-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    /*overflow: hidden;*/
    border: 1px solid #cfdceb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(36, 61, 93, .05);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.support-chat-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 85, 213, .1);
}

.support-chat-composer textarea {
    display: block;
    width: 100%;
    min-height: 45px;
    max-height: 90px;
    padding: 13px 12px;
    resize: none;
    border: 0;
    border-radius: 10px;
    outline: none;
    background: transparent;
    color: #273a56;
    font-size: 13px;
    line-height: 1.4;
}

.support-chat-composer textarea:focus {
    border: 0;
    box-shadow: none;
}

.support-chat-composer textarea::placeholder {
    color: #8b9aae;
}

.support-chat-composer .support-chat-send {
    display: inline-flex;
    width: 46px;
    height: 45px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #1c7eff, var(--primary));
    box-shadow: 0 6px 14px rgba(20, 85, 213, .24);
    font-size: 17px;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.support-chat-composer .support-chat-send:hover:not(:disabled), .support-chat-composer .support-chat-send:focus:not(:disabled) {
    background: #1047b4;
    box-shadow: 0 8px 17px rgba(20, 85, 213, .3);
    outline: none;
    transform: translateY(-1px);
}

.support-chat-composer .support-chat-send:disabled {
    background: #b8c5d7;
    box-shadow: none;
    opacity: 1;
}

.support-chat-emoji-picker {
    position: absolute;
    z-index: 4;
    bottom: calc(100% + 8px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    width: 250px;
    padding: 8px;
    border: 1px solid #e0e6ee;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(32, 50, 77, .18);
}

.support-chat-emoji-picker button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.support-chat-emoji-picker button:hover {
    background: #edf3fc;
}

.support-chat-attachment-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: -3px 7px 7px;
    padding: 5px 7px;
    border: 1px solid #d7e6fb;
    border-radius: 6px;
    background: #f1f6fd;
    color: #526178;
    font-size: 11px;
}

.support-chat-attachment-preview > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-chat-remove-attachment {
    width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7789;
    cursor: pointer;
}

.support-chat-remove-attachment:hover {
    background: #dfe7f1;
    color: #28374d;
}

@keyframes support-chat-recording {
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, .12);
    }
}

@media (max-width: 480px) {
    .support-chat-widget {
        right: 15px;
        bottom: 15px;
    }

    .support-chat-panel {
        position: fixed;
        right: 10px;
        bottom: 85px;
        left: 10px;
        width: auto;
        height: calc(100vh - 105px);
    }
}
