/* Chat Widget Styles */
:root {
    --widget-primary: #208196;
    --widget-primary-hover: #1a6578;
    --widget-bg-light: #f8f9fa;
    --widget-bg-surface: #ffffff;
    --widget-text-primary: #1f2937;
    --widget-text-secondary: #6b7280;
    --widget-border: #e5e7eb;
    --widget-success: #10b981;
}

#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 80px;
    font-family: inherit;
    z-index: 99999;
}

.widget-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--widget-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(32, 129, 150, 0.4);
    transition: all 0.3s ease;
    font-size: 24px;
    position: absolute;
    bottom: 0;
    right: 0;
}

.widget-toggle-btn:hover {
    background: var(--widget-primary-hover);
    box-shadow: 0 6px 16px rgba(32, 129, 150, 0.5);
    transform: scale(1.05);
}

.widget-toggle-btn:active {
    transform: scale(0.95);
}

.chat-window {
    width: 380px;
    height: 500px;
    background: var(--widget-bg-surface);
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 76px;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.chat-window.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chat-header {
    background: linear-gradient(135deg, var(--widget-primary) 0%, var(--widget-primary-hover) 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--widget-bg-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.message {
    display: flex;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.message.user .message-bubble {
    background: var(--widget-primary);
    color: white;
    border-radius: 16px 4px 16px 16px;
}

.message.bot .message-bubble {
    background: #e5e7eb;
    color: var(--widget-text-primary);
    border-radius: 4px 16px 16px 16px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 14px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

.input-area {
    padding: 12px;
    border-top: 1px solid var(--widget-border);
    display: flex;
    gap: 8px;
    background: var(--widget-bg-surface);
    border-radius: 0 0 12px 12px;
}

.input-area input {
    flex: 1;
    border: 1px solid var(--widget-border);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-area input:focus {
    outline: none;
    border-color: var(--widget-primary);
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--widget-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.send-btn:hover:not(:disabled) {
    background: var(--widget-primary-hover);
    transform: scale(1.05);
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--widget-text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        height: 60vh;
        right: 10px;
        bottom: 76px;
    }

            #chat-widget {
                right: 20px;
                bottom: 10px;
            }
}

