:root {
    --sidebar-background: #FFFFFF;
    --content-background: #F6F7FB;
    --hover-background: #F8F8F8;
    --title-black: #1B1E25;
    --text-black: #222327;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --main: #6255F4;
    --black: #0b1224;
    --border: #EBEBEB;

}

#sergey-workspace-form {
    margin: 0px auto;
    max-width: 960px;
    padding: 0 20px;
}

.sergey-chat-container {
    max-width: 960px;
    min-height: 360px;
    max-height: 62vh;
    margin: 16px auto 12px;
    overflow-y: auto;
    padding: 24px;
    border-radius: 24px;
}

.sergey-wrapper {
    height: 100%;
    display: flex;
    background-color: var(--content-background);
    font-family: "Manrope", sans-serif;
    color: var(--title-black);
    height: 76vh;
    border: 1px solid var(--border);
    border-width: 1px 0;
}

.sergey-sidebar {
    background: var(--sidebar-background);
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
}

.sergey-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 90px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sergey-header {
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
}

.sergey-header-info {
    display: flex;
    align-items: center;
    gap: 16px
}

.sergey-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #DDDEFF;
}
.sergey-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--main);
}

.sergey-header-title {
    font-weight: 500;
    font-size: 20px;
}

.sergey-chat-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;

    width: 75%;
    height: 48px;
    background-color: rgba(56, 65, 229, 0.05);
    font-weight: 600;
    font-size: 14px;
    line-height: 120%;
    border: 1px solid #DDDEFF;
    border-radius: 50px;
}

.sergey-chats-list {
    width: 100%;
    padding: 0 8px;
}

.sergey-chats-element {
    display: flex;
    cursor: pointer;
    padding: 16px 20px;
    transition: all .12s ease;
}

.sergey-chats-element svg {
    fill: rgba(34, 35, 39, 1);
    transition: all .12s ease;
}

.sergey-chats-element svg:hover {
    fill: var(--main);
}

.sergey-chats-element:hover {
    background-color: var(--hover-background);
    border-radius: 1px;
}

.sergey-chat-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sergey-content {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.sergey-chat-container {
    max-width: 860px;
    min-height: 360px;
    max-height: 62vh;
    margin: 16px auto 12px;
    overflow-y: auto;
    padding: 24px;
    border-radius: 24px;
    width: 100%;
}

.sergey-chat-container::-webkit-scrollbar {
    width: 5px;
}

.sergey-chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.sergey-chat-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.sergey-message {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    opacity: 0;
    transform: translateY(8px) scale(.98);
}

.sergey-message.enter {
    animation: msg-enter .45s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes msg-enter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sergey-message.user {
    justify-content: flex-end;
}

.sergey-message.ai {
    justify-content: flex-start;
    align-items: center;
}

.sergey-avatar {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    background: #0b1224;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    border: 1px solid var(--card-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.sergey-avatar.user {
    color: #86efac;
}

.sergey-bubble {
    position: relative;
    padding: 12px 16px;
    line-height: 1.5;
    font-size: 15px;
    background-color: white;
    transition: all .1s ease-in;
}

.sergey-streaming-text {
    transition: all .1s ease-in;
}

.sergey-bubble.user {
    border-radius: 16px
}

.sergey-bubble.ai {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.sergey-bubble.ai {
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;

    background: var(--main);
    color: #FFF;
}

.sergey-bubble.reveal {
    width: fit-content;
    max-width: 600px;
    min-width: min-content;
    word-break: break-word;
}

.sergey-message.ai a {
    text-decoration: none;
}

.sergey-typing {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.sergey-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: .6;
    animation: jump 1.2s ease-in-out infinite;
}

.sergey-dot:nth-child(2) {
    animation-delay: .15s;
}

.sergey-dot:nth-child(3) {
    animation-delay: .3s;
}

@keyframes jump {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
}

.sergey-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 24px;
    transition: all .12s ease;
    margin-bottom: 10px;
}


.sergey-input {
    overflow: hidden;
    min-height: 20px;
    max-height: 320px;
    height: auto;
    resize: none;
    outline: none;
    font-size: 15px !important;
    font-family: "Manrope", sans-serif !important;
    box-shadow: none !important;
    width: 100%;
    padding: 0px !important;
    border: 0px !important;
}

.sergey-input::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sergey-input::-webkit-scrollbar-track {
    background: transparent;
}

.sergey-input::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.sergey-input::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.35);
}

.sergey-input::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.sergey-input {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

.sergey-input::placeholder {
    color: var(--muted);
}

.sergey-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.sergey-input-wrapper.expanded .sergey-tools {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: 50%;
    border: none;
    padding: 0 14px 0 12px;
    background: transparent;
    cursor: pointer;
    user-select: none;
}

.icon-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.icon-btn:active {
    transform: translateY(1px);
}

.send-btn {
    background: var(--main);
    color: #FFFFFF;
    border: none;
    transition: .2s;
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;

}

.icon-btn .ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    inset: 0;
    opacity: 0;
}

.icon-btn.rippling::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    transform: scale(1);
    animation: ripple .6s ease-out;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: .7;
    }
    to {
        transform: scale(18);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sergey-message {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .icon-btn.rippling::after {
        animation: none;
    }
}

.sergey-author {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
    margin-left: 4px;
}

.sergey-msg-footer {
    max-width: 600px;
    font-size: 12px;
    color: #9aa4b2;
    margin-top: 4px;
}

.sergey-footer-container {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}

.sergey-feedback-input-wrapper {
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content:space-between;
    gap: 12px;
    padding: 6px 8px 6px 12px;
    background: white;
    border-radius: 24px;
    border: 1px solid #E8E8E8;
    transition: all .12s ease;
    margin-bottom: 10px;
}
.sergey-feedback-input {
    outline: none;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    box-shadow: none;
    width: 100%;
    padding: 0;
    border: 0;
}

.icon-feedback {
    height: 32px;
    padding: 0 10px 0 7px;
}


.sergey-message-feedback {
    display: flex;
    gap: 12px;
}

.sergey-message-reaction {
    fill: #686868;
}

.sergey-message-reaction:hover {
    border-radius: 4px;
    background: var(--hover-background);
}

.sergey-msg-time {
    color: #94a3b8;
}

.sergey-spinner-message .sergey-content {
    gap: 8px;
}

.sergey-message > .sergey-avatar {
    margin-right: 8px;
}

.sergey-message.user > .sergey-content {
    margin-left: 8px;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.sergey-message.user.enter .sergey-msg-footer {
    justify-content: end;
    padding-right: 8px;
}

.sergey-welcome {
    padding: 36px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.sergey-welcome-inner {
    max-width: 920px;
    text-align: center;
}

.sergey-welcome-title {
    font-family: "Manrope", sans-serif;
    margin: 0 0 12px 0;
    font-size: 44px;
    line-height: 1.20;
    font-weight: 500;
    color: #0B1224;
    letter-spacing: -1px;
}

.sergey-welcome-title span {
    color: var(--main);
}

.sergey-welcome-sub {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #494D57;
    font-weight: 300;
    line-height: 1.4;
}

.sergey-welcome-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 40px;
    justify-content: center;
}

.sergey-welcome-actions .sergey-suggestion {
    background: transparent;
    color: var(--main);
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--main);
    cursor: pointer;
    transition: transform .08s ease, opacity .12s ease;
}

.sergey-welcome-actions .sergey-suggestion:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.sergey-feedback-input.success {
    border-color: #28C33A;
}
.sergey-feedback-input.error {
    border-color: #E62D2D
}

@media (max-width: 1280px) {
    .sergey-welcome {
        padding: 36px 0px;
    }
    .sergey-wrapper {
        flex-direction:column;
        max-height: 100%;
        height: unset;
    }
    .sergey-sidebar {
        width: auto;
    }
    .sergey-sidebar-header {
        justify-content: flex-start;
        gap: 20px;
    }
    .sergey-welcome-title {
        font-size: 28px;
    }

    .sergey-welcome-sub {
        font-size: 16px;
    }

    .sergey-welcome-inner {
        padding: 0 6px;
    }
}