.wa-live-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1100;
    font-family: var(--font-b, Arial, sans-serif);
}

.wa-live-chat-toggle {
    border: none;
    border-radius: 999px;
    padding: 11px 16px 11px 12px;
    background: linear-gradient(135deg, #0f766e 0%, #0b5f74 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-live-chat-toggle::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 1px solid rgba(20, 184, 166, 0.38);
    opacity: 0;
    pointer-events: none;
    animation: wa-live-chat-pulse 2s ease-out infinite;
}

.wa-live-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.wa-live-chat-toggle-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.wa-live-chat-toggle-icon svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.wa-live-chat-toggle-text {
    white-space: nowrap;
}

.wa-live-chat-toggle-badge {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #dcfce7;
    color: #166534;
    line-height: 1.2;
}

.wa-live-chat.is-offline .wa-live-chat-toggle {
    background: linear-gradient(135deg, #7c5a38 0%, #8a6541 100%);
}

.wa-live-chat.is-offline .wa-live-chat-toggle::after {
    border-color: rgba(251, 191, 36, 0.42);
}

.wa-live-chat.is-offline .wa-live-chat-toggle-badge {
    background: #fef3c7;
    color: #92400e;
}

.wa-live-chat-panel {
    width: min(360px, calc(100vw - 28px));
    height: 470px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: none;
    flex-direction: column;
    margin-top: 10px;
}

.wa-live-chat.open .wa-live-chat-panel {
    display: flex;
}

.wa-live-chat-profile {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.wa-live-chat-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.wa-step {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 8px;
    background: #e5e7eb;
    color: #4b5563;
}

.wa-step.is-active {
    background: #ccfbf1;
    color: #0f766e;
}

.wa-live-chat-profile input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.88rem;
}

.wa-live-chat-profile button {
    border: none;
    background: #0f766e;
    color: #fff;
    border-radius: 8px;
    min-height: 38px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.wa-live-chat-profile-hint {
    font-size: 0.76rem;
    color: #6b7280;
}

.wa-live-chat.has-profile .wa-live-chat-profile {
    display: none;
}

.wa-live-chat.needs-profile .wa-live-chat-body,
.wa-live-chat.needs-profile .wa-live-chat-form {
    display: none;
}

.wa-live-chat-head {
    background: #0f766e;
    color: #fff;
    padding: 12px 14px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-live-chat-head button {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.1rem;
}

.wa-live-chat-body {
    flex: 1;
    overflow: auto;
    padding: 12px;
    background: #f8fafc;
}

.wa-live-msg {
    margin-bottom: 9px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-live-msg .bubble {
    max-width: 82%;
    padding: 8px 10px;
    border-radius: 10px;
    background: #e5e7eb;
    color: #111827;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.wa-live-msg.me {
    justify-content: flex-end;
    align-items: flex-end;
}

.wa-live-msg.me .bubble {
    background: #d1fae5;
}

.wa-live-time {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0 4px;
}

.wa-live-msg.system {
    justify-content: center;
}

.wa-live-msg.system .bubble {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.82rem;
}

.wa-live-chat-form {
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    display: flex;
    gap: 8px;
    background: #fff;
}

.wa-live-chat-form textarea {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    min-height: 44px;
    max-height: 100px;
    padding: 8px;
    font-size: 0.9rem;
}

.wa-live-chat-form button {
    border: none;
    background: #0f766e;
    color: #fff;
    border-radius: 8px;
    padding: 0 12px;
    font-weight: 600;
}

@keyframes wa-live-chat-pulse {
    0% {
        transform: scale(0.98);
        opacity: 0;
    }
    20% {
        opacity: 0.75;
    }
    100% {
        transform: scale(1.09);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .wa-live-chat {
        right: 12px;
        bottom: 12px;
    }

    .wa-live-chat-toggle-text {
        font-size: 0.92rem;
    }

    .wa-live-chat-toggle-badge {
        display: none;
    }
}
