:root {
    --chat-primary: #6366f1;
    --chat-secondary: #4f46e5;
    --chat-bg: rgba(255, 255, 255, 0.95);
    --chat-text: #1f2937;
    --chat-radius: 20px;
    --chat-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.chat-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating Button */
.chat-trigger {
    width: 60px;
    height: 60px;
    background: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--chat-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-trigger:hover {
    transform: scale(1.1);
    background: var(--chat-secondary);
}

.chat-trigger svg {
    width: 28px;
    height: 28px;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 600px;
    height: 80vh;
    background: var(--chat-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--chat-radius);
    box-shadow: var(--chat-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.chat-header {
    background: var(--chat-primary);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Content Area */
.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Initial Form */
.chat-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-form input, .chat-form textarea {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-form input:focus, .chat-form textarea:focus {
    border-color: var(--chat-primary);
}

.chat-form button {
    background: var(--chat-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

/* Messages */
.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

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

.message.agent {
    align-self: flex-start;
    background: #f3f4f6;
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
}

.message .agent-name {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
    color: var(--chat-secondary);
}

.btn-outline {
    border: 1px solid var(--chat-primary);
    background: none;
    color: var(--chat-primary);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--chat-primary);
    color: white;
}

/* Footer Input */
.chat-footer {
    padding: 15px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 0.95rem;
    outline: none;
}

.chat-footer button {
    background: none;
    border: none;
    color: var(--chat-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Hide elements */
.hidden {
    display: none !important;
}
