.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: var(--text-on-orange);
    font-size: 1.5rem;
    box-shadow: var(--shadow-orange-glow);
    transition: transform var(--duration-fast) var(--ease-standard);
}

.chat-toggle-btn:hover {
    transform: scale(1.06);
}

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 340px;
    max-width: calc(100vw - 48px);
    height: 460px;
    max-height: calc(100vh - 140px);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget.is-open .chat-panel {
    display: flex;
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-glass);
    font-weight: 700;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

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

.chat-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    max-width: 85%;
    line-height: 1.45;
}

.chat-bubble-bot {
    background: rgba(255, 255, 255, 0.08);
    align-self: flex-start;
}

.chat-bubble-user {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: var(--text-on-orange);
    align-self: flex-end;
}

.chat-bubble-typing {
    background: rgba(255, 255, 255, 0.08);
    align-self: flex-start;
    opacity: 0.7;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--border-glass);
}

.chat-input {
    flex-grow: 1;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--orange-500);
}

.chat-send-btn {
    width: 40px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--orange-500);
    color: var(--text-on-orange);
    cursor: pointer;
}

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

    .chat-panel {
        width: calc(100vw - 32px);
    }
}
