.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    font-family: 'Roboto', sans-serif;
}

.chat-widget__toggle {
    background: #03FFA4;
    color: #303038;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(3, 255, 164, 0.25);
}

.chat-widget__panel {
    width: 320px;
    height: 420px;
    background: #303038;
    border: 1px solid #3a3a48;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-top: 12px;
}

.chat-widget--open .chat-widget__panel {
    display: flex;
}

.chat-widget__header {
    padding: 12px 14px;
    background: #27272D;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-weight: 600;
}

.chat-widget__status {
    font-size: 11px;
    color: #9aa0a6;
}

.chat-widget__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.chat-widget__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    color: #fff;
}

.chat-widget__messages {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-widget__message {
    max-width: 80%;
    background: #27272D;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 18px;
    word-break: break-word;
}

.chat-widget__message--self {
    align-self: flex-end;
    background: #03FFA4;
    color: #303038;
}

.chat-widget__message-meta {
    display: block;
    font-size: 11px;
    color: #9aa0a6;
    margin-bottom: 4px;
}

.chat-widget__footer {
    padding: 10px;
    background: #27272D;
    display: flex;
    gap: 8px;
}

.chat-widget__input {
    flex: 1;
    border: 1px solid #3a3a48;
    background: #303038;
    color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.chat-widget__send {
    background: #03FFA4;
    color: #303038;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.chat-widget__name {
    padding: 12px;
    background: #27272D;
    border-top: 1px solid #3a3a48;
    display: none;
    gap: 8px;
}

.chat-widget--need-name .chat-widget__name {
    display: flex;
}

.chat-widget__name input {
    flex: 1;
    border: 1px solid #3a3a48;
    background: #303038;
    color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.chat-widget__name button {
    background: #03FFA4;
    color: #303038;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.chat-widget__system {
    text-align: center;
    font-size: 12px;
    color: #9aa0a6;
}

.chat-widget--page {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
}

.chat-widget--page .chat-widget__panel {
    width: 100%;
    height: 520px;
    margin-top: 0;
}

@media (max-width: 576px) {
    .chat-widget {
        right: 10px;
        bottom: 10px;
    }

    .chat-widget__panel {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
    }

    .chat-widget--page .chat-widget__panel {
        height: calc(100vh - 160px);
    }
}
