#webagent-widget {
    position: fixed;
    right: 22px;
    top: 22px;
    z-index: 1500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wa-toggle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.wa-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
    display: block;
    background: #0b1022;
}

.wa-avatar::before,
.wa-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.wa-avatar::before {
    background: radial-gradient(circle at center, rgba(44, 225, 255, 0.32) 0, rgba(44, 225, 255, 0.06) 58%, transparent 75%);
}

.wa-avatar::after {
    border: 2px solid rgba(44, 225, 255, 0.85);
    transform: scale(0.7);
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.12) contrast(1.04);
    position: relative;
    z-index: 1;
}

#webagent-widget.is-busy .wa-avatar::after,
#webagent-widget.is-listening .wa-avatar::after,
.wa-avatar.is-thinking::after,
.wa-avatar.is-talking::after {
    animation: waPulse 1.1s infinite ease-in-out;
}

@keyframes waPulse {
    0% { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.12); opacity: 0; }
}

.wa-panel {
    width: min(360px, calc(100vw - 24px));
    max-height: 70vh;
    background: rgba(7, 12, 26, 0.95);
    border: 1px solid rgba(44, 225, 255, 0.34);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.wa-head {
    padding: 12px 14px;
    font-weight: 700;
    color: #d8f7ff;
    background: linear-gradient(90deg, #0f234a, #0f172a);
    border-bottom: 1px solid rgba(44, 225, 255, 0.24);
}

.wa-head-photo-wrap {
    padding: 0;
    background: #081126;
}

.wa-head-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-bottom: 1px solid rgba(44, 225, 255, 0.25);
}

.wa-log {
    padding: 12px;
    max-height: 44vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wa-msg {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.wa-msg-user {
    background: rgba(37, 99, 235, 0.25);
    color: #dbeafe;
    align-self: flex-end;
}

.wa-msg-bot {
    background: rgba(44, 225, 255, 0.15);
    color: #cffafe;
    align-self: flex-start;
}

.wa-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(44, 225, 255, 0.2);
}

.wa-form input {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(44, 225, 255, 0.3);
    background: #0b1022;
    color: #eef9ff;
}

.wa-btn {
    border: 0;
    padding: 0 12px;
    border-radius: 10px;
    cursor: pointer;
    color: #f8fafc;
    background: #1d4ed8;
}

.wa-btn-mic {
    background: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 0 10px;
}

.wa-btn-mic-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wa-btn-mic-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.wa-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
