.va-chat {
    width: 100%;
    max-width: 420px;
    height: 620px;
    max-height: 80vh;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--va-background-color, #ffffff);
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    font-family: var(--va-font-family, Arial, sans-serif);
    color: var(--va-text-color, #111827);
    z-index: 999999;
}

.va-chat-global {
    position: fixed;
}

.va-position-bottom-right {
    right: 24px;
    bottom: 24px;
}

.va-position-bottom-left {
    left: 24px;
    bottom: 24px;
}

.va-position-top-right {
    right: 24px;
    top: 24px;
}

.va-position-top-left {
    left: 24px;
    top: 24px;
}

.va-chat-inline {
    position: relative;
}

.va-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: var(--va-primary-color, #2563eb);
    color: #ffffff;
    cursor: default;
}

.va-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.va-chat-header img {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    background: #ffffff;
}

.va-minimize-toggle {
    border: 1px solid rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    line-height: 1;
    cursor: pointer;
    font-size: 20px;
}

.va-toggle-closed {
    display: none;
}

.va-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.va-chat.va-minimized {
    height: auto;
    max-height: none;
}

.va-chat.va-minimized .va-chat-body {
    display: none;
}

.va-chat.va-minimized .va-toggle-open {
    display: none;
}

.va-chat.va-minimized .va-toggle-closed {
    display: inline;
}

.va-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.va-message {
    padding: 10px 12px;
    border-radius: 14px;
    max-width: 88%;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.va-message-bot {
    align-self: flex-start;
    background: rgba(243, 244, 246, 0.94);
    color: var(--va-bot-text-color, #111827);
    border-bottom-left-radius: 4px;
}

.va-message-user {
    align-self: flex-end;
    background: var(--va-primary-color, #2563eb);
    color: var(--va-user-text-color, #ffffff);
    border-bottom-right-radius: 4px;
}

.va-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(229, 231, 235, 0.9);
}

.va-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 13px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.va-chat-input:focus {
    border-color: var(--va-primary-color, #2563eb);
}

.va-chat-send {
    border: none;
    border-radius: 999px;
    background: var(--va-send-button-color, #2563eb);
    color: #ffffff;
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--va-send-button-font-family, Arial, sans-serif);
    font-size: 14px;
}

.va-appointment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(249, 250, 251, 0.96);
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.va-appointment-form input,
.va-appointment-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    padding: 9px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}

.va-appointment-form button {
    border: none;
    padding: 10px;
    border-radius: 8px;
    background: var(--va-send-button-color, #2563eb);
    color: #ffffff;
    cursor: pointer;
    font-family: var(--va-send-button-font-family, Arial, sans-serif);
}

.va-privacy {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.4;
}

.va-privacy input {
    width: auto;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .va-chat-global {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        top: auto !important;
        width: auto;
        max-width: none;
    }

    .va-chat {
        height: 560px;
    }

    .va-chat.va-minimized {
        height: auto;
    }

    .va-chat-form {
        flex-direction: column;
    }

    .va-chat-send {
        width: 100%;
    }
}