:root {
    --ai-chat-primary: #4f46e5;
    --ai-chat-primary-dark: #4338ca;
    --ai-chat-primary-light: #e0e7ff;
    --ai-chat-secondary: #06b6d4;
    --ai-chat-text: #1e293b;
    --ai-chat-text-light: #64748b;
    --ai-chat-bg: #ffffff;
    --ai-chat-bg-light: #f8fafc;
    --ai-chat-border: #e2e8f0;
    --ai-chat-shadow: rgba(0, 0, 0, 0.1);
    --ai-chat-user-bubble: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --ai-chat-bot-bubble: #f1f5f9;
    --ai-chat-radius: 16px;
    --ai-chat-transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
.ai-chat-widget *,
.ai-chat-launcher * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Launcher Button */
.ai-chat-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--ai-chat-primary);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    align-items: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    justify-content: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    cursor: pointer;
    z-index: 9998;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: ai-chat-pulse 2s infinite;
}

@keyframes ai-chat-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.ai-chat-launcher:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
    animation: none;
}

.ai-chat-launcher-text {
    color: white;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-chat-launcher-icon {
    color: white;
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
}

.ai-chat-launcher:hover .ai-chat-launcher-icon {
    transform: scale(1.1);
}

.ai-chat-launcher-icon svg {
    width: 100%;
    height: 100%;
}

/* Chat Widget */
.ai-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    border-radius: var(--ai-chat-radius);
    background: var(--ai-chat-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    overflow: hidden;
    z-index: 100000;
    border: 1px solid var(--ai-chat-border);
    display: none;
    transform-origin: bottom right;
}

/* Chat Header */
.ai-chat-header {
    background: var(--ai-chat-primary);
    background: linear-gradient(135deg, var(--ai-chat-primary) 0%, var(--ai-chat-primary-dark) 100%);
    color: white;
    padding: 15px 20px;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    -ms-flex-pack: space-between;
    align-items: flex-start;
    -webkit-align-items: flex-start;
    -ms-flex-align: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-header-info {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
}

.ai-chat-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.ai-chat-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    justify-content: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    transition: all 0.3s;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ai-chat-close svg {
    width: 18px;
    height: 18px;
}

/* Chat Body */
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    gap: 5px;
    background: var(--ai-chat-bg-light);
    scrollbar-width: thin;
    scrollbar-color: var(--ai-chat-border) transparent;
}

.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background-color: var(--ai-chat-border);
    border-radius: 6px;
}

.ai-chat-body ol, .ai-chat-body ul {
    padding-left: 12px;
}
.ai-chat-body ul {
    list-style: disc;
}
.ai-chat-body ol{
    list-style: decimal;
}

/* Message Bubbles */
.ai-chat-message {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 8px;
    max-width: 85%;
    animation: ai-chat-fade-in 0.3s ease-out;
}

@keyframes ai-chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-message.bot {
    align-self: flex-start;
}

.ai-chat-message.user {
    align-self: flex-end;
}

.ai-chat-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.ai-chat-message.bot .ai-chat-bubble {
    background: var(--ai-chat-bot-bubble);
    color: var(--ai-chat-text);
    border-bottom-left-radius: 4px;
}

.ai-chat-message.user .ai-chat-bubble {
    background: var(--ai-chat-user-bubble);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-chat-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Chat Footer */
.ai-chat-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--ai-chat-border);
    background: var(--ai-chat-bg);
}

.ai-chat-input-wrapper {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    position: relative;
}

.ai-chat-input {
    flex: 1;
    width: 100%;
    padding: 14px 20px !important;
    border: 1px solid var(--ai-chat-border) !important;
    border-radius: 30px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ai-chat-input:focus {
    border-color: var(--ai-chat-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.ai-chat-send {
    background: var(--ai-chat-primary);
    background: linear-gradient(135deg, var(--ai-chat-primary) 0%, var(--ai-chat-primary-dark) 100%);
    color: white;
    border: none;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    justify-content: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.ai-chat-send:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.ai-chat-send:active {
    transform: scale(0.95);
}

.ai-chat-send svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s;
}

.ai-chat-send:hover svg {
    transform: translateX(3px);
}

.ai-chat-branding {
    text-align: center;
    font-size: 12px;
    color: var(--ai-chat-text-light);
    margin-top: 10px;
}

.ai-chat-branding span {
    color: var(--ai-chat-primary);
    font-weight: 600;
}

/* Typing Indicator */
.ai-chat-typing {
    display: inline-block;
    padding: 10px 15px;
}

.ai-chat-typing span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 2px;
    background-color: var(--ai-chat-primary);
    display: block;
    border-radius: 50%;
    opacity: 0.4;
    animation: ai-chat-typing 1s infinite;
}

.ai-chat-typing span:nth-of-type(1) {
    animation-delay: 0s;
}

.ai-chat-typing span:nth-of-type(2) {
    animation-delay: 0.3s;
}

.ai-chat-typing span:nth-of-type(3) {
    animation-delay: 0.6s;
}

@keyframes ai-chat-typing {
    0% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }
}

/* Animations */
.ai-chat-widget.open {
    animation: ai-chat-zoom-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-widget.close {
    animation: ai-chat-zoom-out 0.3s ease-in-out;
}

@keyframes ai-chat-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ai-chat-zoom-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Responsive Styles */
@media (max-width: 480px) {
    .ai-chat-widget {
        width: calc(100% - 40px);
        height: 70vh;
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
    
    .ai-chat-launcher {
        bottom: 20px;
        right: 20px;
    }
} 