/* SWAPP AI Chat Premium Styles */
:root {
    --swapp-primary: #22c55e;
    --swapp-primary-dark: #16a34a;
    --swapp-bg: #ffffff;
    --swapp-text: #1f2937;
    --swapp-text-muted: #6b7280;
    --swapp-glass: rgba(255, 255, 255, 0.9);
    --swapp-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

#swapp-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Poppins', 'Inter', sans-serif;
}

#swapp-chat-trigger {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--swapp-primary);
    border: none;
    cursor: pointer;
    box-shadow: var(--swapp-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#swapp-chat-trigger:hover {
    transform: scale(1.1);
    background: var(--swapp-primary-dark);
}

#swapp-chat-trigger svg {
    width: 32px;
    height: 32px;
    fill: white;
}

#swapp-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 150px);
    background: var(--swapp-bg);
    border-radius: 20px;
    box-shadow: var(--swapp-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#swapp-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#swapp-chat-header {
    background: var(--swapp-primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#swapp-chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

#swapp-chat-header .status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

#swapp-chat-header .status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}

#swapp-chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9fafb;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-msg.agent {
    align-self: flex-start;
    background: white;
    color: var(--swapp-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-msg.user {
    align-self: flex-end;
    background: var(--swapp-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg h4 {
    margin: 10px 0 5px;
    font-size: 1rem;
    color: var(--swapp-primary-dark);
}

.chat-msg ul {
    margin: 8px 0;
    padding-left: 20px;
}

.chat-msg li {
    margin-bottom: 5px;
}

#swapp-chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
}

#swapp-chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#swapp-chat-input:focus {
    border-color: var(--swapp-primary);
}

#swapp-chat-send {
    background: var(--swapp-primary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#swapp-chat-send:hover {
    background: var(--swapp-primary-dark);
}

#swapp-chat-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.quick-reply-btn {
    background: white;
    border: 1px solid var(--swapp-primary);
    color: var(--swapp-primary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: var(--swapp-primary);
    color: white;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 18px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--swapp-text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #swapp-chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: none;
    }
}
