.ai-concierge-widget {
    position: fixed;
    bottom: 30px;
    right: 100px; /* Offset to avoid overlapping back-to-top */
    z-index: 10000;
    font-family: var(--font-body);
}

.ai-toggle-btn {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-green);
    transition: all 0.3s ease;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.ai-toggle-btn:hover {
    transform: scale(1.1);
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 450px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

.ai-chat-window.d-none {
    display: none !important;
}

.ai-chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--offwhite);
}

.ai-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message.system {
    background: var(--gray-200);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

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

.ai-chat-input {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.ai-chat-input input:focus {
    border-color: var(--primary);
}

.ai-chat-input button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.ai-chat-input button:hover {
    background: var(--primary-dark);
}

@media (max-width: 576px) {
    .ai-concierge-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .ai-chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
    }
}
