/* AI ASSISTANT WIDGET & GOLD DUST EFFECT */

.ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-body);
}

.ai-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-black);
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.ai-button:hover {
    transform: scale(1.05);
    background-color: var(--color-gold);
    color: var(--color-white);
}

.ai-button svg {
    width: 28px;
    height: 28px;
}

.ai-chat-window {
    position: fixed;
    bottom: 130px;
    right: 30px;
    width: 370px;
    height: 500px;
    background: var(--color-white);
    border-radius: 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--transition-smooth);
    border: 1px solid var(--color-beige);
    z-index: 10003;
}

.ai-chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

@media (max-width: 480px) {
    .ai-chat-window {
        position: fixed;
        bottom: 0px !important;
        right: 0px !important;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .ai-widget {
        bottom: 20px;
        right: 20px;
    }
}

.ai-chat-header {
    background: var(--color-white);
    color: var(--color-black);
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-beige);
}

.ai-header-info {
    display: flex;
    flex-direction: column;
}

.ai-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

.ai-status {
    font-size: 0.65rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.2rem;
}

.ai-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #25D366;
    border-radius: 50%;
}

.ai-close-btn {
    background: none;
    border: none;
    color: var(--color-black);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.ai-close-btn:hover {
    color: var(--color-gold);
}

.ai-chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--color-white);
}

.ai-message {
    display: flex;
    max-width: 85%;
}

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

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

.ai-msg-content {
    padding: 1rem 1.2rem;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.ai-message.bot .ai-msg-content {
    background: var(--color-light-beige);
    color: var(--color-black);
    border: 1px solid transparent;
}

.ai-message.user .ai-msg-content {
    background: var(--color-dark);
    color: var(--color-white);
}

.ai-chat-input {
    padding: 1rem 1.5rem;
    background: var(--color-white);
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--color-beige);
    align-items: center;
    min-height: 62px;
    flex-shrink: 0;
}

.ai-chat-input input {
    flex: 1;
    padding: 0.8rem 0;
    border: none;
    border-bottom: 1px solid var(--color-beige);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s;
    background: transparent;
    font-weight: 300;
    min-width: 0; /* Prevents input from overflowing */
}

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

.ai-chat-input button {
    background: var(--color-black);
    color: var(--color-white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.ai-chat-input button:hover {
    background: var(--color-gold);
    transform: scale(1.08);
}

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

/* Typing indicator */
.typing-indicator .ai-msg-content {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 1rem 1.2rem;
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    background-color: var(--color-black);
    border-radius: 0;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* EFECTO POLVO DE ORO (GOLD DUST) */
.gold-dust-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    mix-blend-mode: screen;
}

.gold-particle {
    position: absolute;
    bottom: -10px;
    background-color: var(--color-gold);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--color-gold), 0 0 10px rgba(212,175,55,0.6);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) translateX(50px);
        opacity: 0;
    }
}
