/* AI Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Work Sans', sans-serif;
}

/* Chat Button */
.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF006E, #8338EC);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FB5607, #FFBE0B);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 0, 110, 0.6);
}

.chat-button:hover::before {
    opacity: 1;
}

.chat-button svg {
    width: 28px;
    height: 28px;
    fill: white;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.chat-button:hover svg {
    transform: scale(1.1);
}

.chat-button.active svg {
    transform: rotate(90deg);
}

/* Notification Badge */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #FF006E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    border: 2px solid #000;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(255, 0, 110, 0);
    }
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 2px solid rgba(255, 0, 110, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-container.active {
    display: flex;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FB5607, #FFBE0B);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #000;
}

.chat-header-text h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}

.chat-header-text p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #FB5607, #FFBE0B);
    color: #000;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 5px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    width: fit-content;
}

.typing-indicator.active {
    display: flex;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8338EC;
    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% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-input:focus {
    border-color: #FF006E;
    background: rgba(255, 255, 255, 0.15);
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF006E, #8338EC);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.5);
}

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

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.welcome-message h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.welcome-message p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 20px;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
        left: 20px;
        right: 20px;
    }
}

/* Error Message */
.error-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
    margin: 10px 20px;
}
