/* ai-widget.css */
.ai-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.ai-widget-button {
    height: 60px;
    padding: 0 1.5rem;
    border-radius: 30px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.ai-widget-button:hover {
    transform: scale(1.05);
}

.ai-widget-button svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.ai-widget-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 360px;
    height: 520px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    color: var(--text-main);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.ai-widget-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.ai-chat-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.ai-status-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

.ai-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.ai-close-btn:hover {
    color: white;
}

.ai-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-message {
    max-width: 85%;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.ai-message.bot {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.ai-message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-message a {
    color: var(--accent);
    text-decoration: underline;
}

.ai-chat-input-area {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.ai-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: var(--accent);
}

.ai-send-btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    padding: 0 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
}

.ai-send-btn:hover {
    filter: brightness(1.15);
}

.ai-typing-indicator {
    display: none;
    align-self: flex-start;
    color: #94a3b8;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.ai-typing-indicator.active {
    display: block;
}

.ai-message p { margin: 0 0 0.5rem 0; }
.ai-message p:last-child { margin: 0; }
.ai-message ul { margin: 0; padding-left: 1.5rem; }
