:root {
    --body-bg-color: #7dd8ff;
    --chat-bg-color: #fff;
    --font-size: 16px;
    --font-color: black;
    --font-color-muted: black;
    --standard-padding: 15px 15px;
    --standard-radius: 13px;
}

@media (min-width: 768px) {
    .chat-box {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .chat-box {
        left: 50%;
        transform: translateX(-50%);
    }
}

.support-header {
    display: flex;
    align-items: center;
    justify-content: left;
}

.support-header img {
    width: 40px;
    height: 40px;
    color: transparent;
}

.support-header span {
    font-size: 24px;
    margin-left: 15px;
    font-weight: 600;
}

.chat-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 450px;
    position: fixed;
    z-index: 99999999999;
    background-color: var(--chat-bg-color);
    height: 100%;
    max-height: 650px;
    flex-direction: column;
    border-radius: var(--standard-radius);
    border: 1px solid #00000042;
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
    color: var(--font-color);
    font-family: 'Roboto', sans-serif;
    font-size: var(--font-size);
    bottom: 15px;
}
.chat-box > .chat-box-header {
    width: 100%;
    padding: var(--standard-padding);
    border-bottom: solid 1px #cfcfcf;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-box > .chat-box-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}
#chat_messages {

    width: 100%;
    padding: 0 10px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 400px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

#chat_messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.support-message {
    width: 90%;
    padding: var(--standard-padding);
    margin: 2px 0;
    border-radius: var(--standard-radius);
    transition: height 0.3s ease-in-out;
    font-size: 14px;
}

.message.hide {
    height: 0;
}

.support-profile {
    margin: 2px 0;
    transition: height 0.3s ease-in-out;
}

.support-profile.hide {
    height: 0;
}

.support-profile img {
    display: inline-block;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    border-radius: 50%;
}

.support-my-profile {
    color: var(--font-color-muted);
    align-self: flex-end;
}

.support-other-profile {
    color: var(--font-color-muted);
}

.support__my-message {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: right;
}

.support__support-message {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
}

.support__my-message .support-message {
    color: black;
    background-color: #e2e2e2;
    align-self: flex-end;
    text-align: left;
}

.support__support-message .support-message {
    color: #fff;
    background-color: #000000db;
    text-align: left;
}

#typing {
    color: var(--font-color-muted);
    width: 100%;
    height: 0;
    padding: 0 15px;
    overflow: hidden;
    box-sizing: border-box;
    opacity: 0;
    transition: 0.3s height ease-in-out, 0.3s opacity ease-in-out;
}
#typing.active {
    height: 80px;
    opacity: 1;
}
#typing span:not(.n) {
    background-color: var(--font-color-muted);
    width: 10px;
    height: 10px;
    margin-top: 20px;
    display: inline-block;
    border-radius: 50%;
}

.chat-box > .chat-box-footer {
    width: 100%;
    padding: var(--standard-padding);
    border-top: solid 1px #cfcfcf;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#chat_input {
    color: var(--font-color);
    font-family: 'Raleway', sans-serif;
    font-size: var(--font-size);
    background-color: #d2d2d2;
    width: 100%;
    height: 80px;
    max-height: 120px;
    padding: 10px 15px;
    resize: none;
    border: none;
    border-radius: var(--standard-radius);
    transition: 0.3s background-color;
    overflow: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

#support_link_photo {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;;
}

#support_link_photo svg {
    width: 25px;
    height: 25px;
}

#chat_input::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
#chat_input:focus {
    background-color: #efefef;
    outline: none; /* Убираем стандартный контур, если необходимо */
}

#support_send {
    background: none;
    border: none;
    margin-left: 10px;
    padding: 5px;
    cursor: pointer;
    border-radius: 50%;
}

@keyframes typing {
    0% { transform: translateY(0px); }
    33.3333% { transform: translateY(-5px); }
    66.6667% { transform: translateY(5px); }
    100% { transform: translateY(0px); }
}

.chat_send button::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

.chat_send {
    outline: none;
    border: none;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-family: 'Roboto', 'sans-serif';
    display: flex;
    width: 90%;
    height: 40px;
    border-radius: 10px;
}

.support-date {
    font-size: 14px;
    color: darkkgray;
    margin-top: 2px;
    margin-bottom: 5px;
}

.support__link-photo-wrapper {
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    text-align: center;
    margin-right: 10px;
    height: 100%;
    width: 60px;
    gap: 5px;
    color: #3a393f;
}

@media (min-width: 768px) {
    .support-button {
        z-index: 99999999;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        font-weight: 500;
        font-family: 'Roboto', 'sans-serif';
        font-size: 16px;
        color: white;
        border-radius: 20px;
        background: black none;
        border: none;
        position: fixed;
        right: 15px;
        bottom: 15px;
        width: fit-content;
        height: 50px;
        cursor: pointer;
    }

    .support-button img {
        margin-right: 10px;
    }

    .support-button p {
        display: flex;
    }
}

@media (max-width: 768px) {
    .support-button {
        z-index: 99999999;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        border-radius: 20px;
        background: black none;
        border: none;
        position: fixed;
        right: 15px;
        bottom: 15px;
        width: 50px;
        height: 50px;
        cursor: pointer;
    }

    .support-button p {
        display: none;
    }
}

@media (max-width: 550px) {
    .chat-box {
        width: 95%;
    }
}

.support-message-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-message-img img {
    width: 100%;
    height: 100%;
}

#support_send.send-disabled svg path {
    fill: currentColor;
}

.support-unviewed {
    color: #fff;
    background: #d0303a;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    animation: blink 1s infinite;
    position: absolute;
    top: 80%;
    right: 5%;
    transform: translate(50%, -50%);
}

@media (max-width: 768px) {
    .support-unviewed > span {
        line-height: 20px;
    }
}

@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
