/* AI Assistant Floating Button */
.ai-assistant-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.ai-assistant-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E42032 0%, #FFB41D 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(228, 32, 50, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
    overflow: hidden;
}

.ai-assistant-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(228, 32, 50, 0.5);
}

.ai-assistant-btn i {
    font-size: 28px;
    color: white;
}

.ai-assistant-tooltip {
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    color: #131922;
    max-width: 200px;
    text-align: right;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    font-family: 'Inter Tight', sans-serif;
}

.ai-assistant-float:hover .ai-assistant-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(228, 32, 50, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(228, 32, 50, 0.6);
    }
}

/* AI Assistant Modal */
.ai-assistant-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 25, 34, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.ai-assistant-modal.active {
    display: flex;
}

.ai-assistant-container {
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(19, 25, 34, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.ai-assistant-header {
    background: linear-gradient(135deg, #E42032 0%, #FFB41D 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
}

.ai-assistant-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-assistant-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter Tight', sans-serif;
    position: relative;
    z-index: 1;
}

.ai-assistant-header h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    }
}

.ai-assistant-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}

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

.ai-assistant-chat {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #F7F7F5;
    font-family: 'Roboto', sans-serif;
}

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

.ai-assistant-chat::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ai-assistant-chat::-webkit-scrollbar-thumb {
    background: #E42032;
    border-radius: 3px;
}

.ai-assistant-chat::-webkit-scrollbar-thumb:hover {
    background: #c41a2a;
}

.ai-message {
    max-width: 85%;
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    animation: messageSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Roboto', sans-serif;
}

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

.ai-message.assistant {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #131922;
}

.ai-message.user {
    background: linear-gradient(135deg, #E42032 0%, #FFB41D 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 8px rgba(228, 32, 50, 0.3);
}

.ai-message.typing {
    background: white;
    padding: 15px 20px;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.ai-message.typing .typing-dots {
    display: flex;
    gap: 5px;
}

.ai-message.typing .typing-dots span {
    width: 8px;
    height: 8px;
    background: #E42032;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-message.typing .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-message.typing .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.ai-assistant-input {
    padding: 20px 25px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.ai-assistant-input textarea {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    resize: none;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    min-height: 120px;
}

.ai-assistant-input textarea:focus {
    border-color: #E42032;
    box-shadow: 0 0 0 4px rgba(228, 32, 50, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-assistant-input textarea {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-assistant-input textarea:disabled {
    background: #F7F7F5;
    cursor: not-allowed;
}

.ai-assistant-send {
    align-self: flex-end;
    padding: 12px 28px;
    border-radius: 25px;
    background: linear-gradient(135deg, #E42032 0%, #FFB41D 100%);
    border: none;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Inter Tight', sans-serif;
}

.ai-assistant-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 32, 50, 0.3);
}

.ai-assistant-send:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Responsive */
@media (max-width: 768px) {
    .ai-assistant-float {
        bottom: 80px;
        right: 20px;
    }

    .ai-assistant-btn {
        width: 60px;
        height: 60px;
    }

    .ai-assistant-btn i {
        font-size: 24px;
    }

    .ai-assistant-container {
        max-height: 90vh;
        border-radius: 15px;
    }

    .ai-assistant-tooltip {
        display: none;
    }
}
