/* =============================================
   ALTA PRIME — AI CONCIERGE CHATBOT
   ============================================= */

/* --- Floating Button --- */
.altaprime-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e, #a68b52);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(201,169,110,0.35);
    transition: transform 0.3s, box-shadow 0.3s;
}

.altaprime-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 32px rgba(201,169,110,0.5);
}

.altaprime-chat-btn svg {
    width: 24px;
    height: 24px;
    fill: #0c0b0a;
}

.altaprime-chat-btn.open svg.icon-chat { display: none; }
.altaprime-chat-btn:not(.open) svg.icon-close { display: none; }

/* --- Pulse animation --- */
.altaprime-chat-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(201,169,110,0.3);
    animation: altaprime-pulse 2.5s ease-in-out infinite;
}

@keyframes altaprime-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
}

.altaprime-chat-btn.open::before {
    display: none;
}

/* --- Chat Window --- */
.altaprime-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 9998;
    width: 380px;
    max-height: 520px;
    background: #0c0b0a;
    border: 1px solid rgba(201,169,110,0.15);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    font-family: 'DM Sans', system-ui, sans-serif;
}

.altaprime-chat-window.open {
    display: flex;
    animation: altaprime-slide-up 0.35s ease-out;
}

@keyframes altaprime-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header --- */
.altaprime-chat-header {
    padding: 16px 20px;
    background: #151413;
    border-bottom: 1px solid rgba(201,169,110,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.altaprime-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e, #a68b52);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: #0c0b0a;
    font-weight: 600;
    flex-shrink: 0;
}

.altaprime-chat-header-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 400;
    color: #f0ebe3;
    margin: 0;
}

.altaprime-chat-header-info span {
    font-size: 11px;
    color: #6b6356;
}

/* --- Messages --- */
.altaprime-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 260px;
    max-height: 340px;
}

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

.altaprime-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(201,169,110,0.15);
    border-radius: 4px;
}

.altaprime-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    animation: altaprime-msg-in 0.3s ease-out;
}

@keyframes altaprime-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.altaprime-msg.bot {
    background: #1e1d1b;
    color: #f0ebe3;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.altaprime-msg.user {
    background: rgba(201,169,110,0.12);
    color: #f0ebe3;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(201,169,110,0.15);
}

.altaprime-msg.typing {
    background: #1e1d1b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 5px;
    padding: 14px 18px;
}

.altaprime-msg.typing .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c9a96e;
    animation: altaprime-typing 1.2s ease-in-out infinite;
}

.altaprime-msg.typing .dot:nth-child(2) { animation-delay: 0.15s; }
.altaprime-msg.typing .dot:nth-child(3) { animation-delay: 0.3s; }

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

/* --- Input --- */
.altaprime-chat-input {
    padding: 14px 16px;
    border-top: 1px solid rgba(201,169,110,0.1);
    display: flex;
    gap: 10px;
    background: #151413;
}

.altaprime-chat-input input {
    flex: 1;
    background: #1e1d1b;
    border: 1px solid rgba(201,169,110,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #f0ebe3;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.altaprime-chat-input input::placeholder {
    color: #6b6356;
}

.altaprime-chat-input input:focus {
    border-color: rgba(201,169,110,0.35);
}

.altaprime-chat-input button {
    background: linear-gradient(135deg, #c9a96e, #a68b52);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.altaprime-chat-input button:hover {
    opacity: 0.85;
}

.altaprime-chat-input button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.altaprime-chat-input button svg {
    width: 18px;
    height: 18px;
    fill: #0c0b0a;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .altaprime-chat-window {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 88px;
        max-height: 70vh;
    }
    .altaprime-chat-btn {
        bottom: 16px;
        right: 16px;
    }
}
