.awifa-chat-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1200;
    font-family: Inter, Arial, sans-serif;
}

.awifa-chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.25);
    cursor: pointer;
    font-weight: 600;
}

.awifa-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(360px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.awifa-chat-panel[hidden] {
    display: none !important;
}

.awifa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: #003366;
    color: #fff;
}

.awifa-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.awifa-chat-messages {
    height: 320px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #f8fafc;
}

.awifa-chat-message {
    max-width: 88%;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.awifa-chat-message.user {
    align-self: flex-end;
    background: #003366;
    color: #fff;
}

.awifa-chat-message.assistant,
.awifa-chat-message.operator,
.awifa-chat-message.system {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.awifa-chat-form {
    padding: 0.85rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.awifa-chat-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 64px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.awifa-chat-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.awifa-chat-operator-btn,
.awifa-chat-send-btn {
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    font-weight: 600;
}

.awifa-chat-operator-btn {
    background: #e2e8f0;
    color: #0f172a;
}

.awifa-chat-send-btn {
    background: #003366;
    color: #fff;
}
