/* ============================================
   PRINCE INTERIOR DESIGN - AI Chatbot Styles
   Premium Glassmorphism Design
   ============================================ */

/* ===== CHAT TOGGLE BUTTON ===== */
.chatbot-toggle {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e 0%, #a07c3e 50%, #c9a96e 100%);
    border: none;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 22px rgba(201, 169, 110, 0.4), 0 0 0 0 rgba(201, 169, 110, 0.4);
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    animation: chatbot-pulse 2.5s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 8px 28px rgba(201, 169, 110, 0.55);
}

.chatbot-toggle .chat-icon,
.chatbot-toggle .close-icon {
    position: absolute;
    font-size: 19px;
    color: #1a1a2e;
    transition: all 0.35s ease;
}

.chatbot-toggle .close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.chatbot-toggle.active .chat-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.chatbot-toggle.active .close-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

@keyframes chatbot-pulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(201, 169, 110, 0.4), 0 0 0 0 rgba(201, 169, 110, 0.4); }
    50% { box-shadow: 0 6px 22px rgba(201, 169, 110, 0.4), 0 0 0 12px rgba(201, 169, 110, 0); }
}

/* Badge notification */
.chatbot-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 19px;
    height: 19px;
    background: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    border: 2px solid #1a1a2e;
    animation: badge-bounce 1s ease infinite;
}

.chatbot-toggle.active .chatbot-badge {
    display: none;
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ===== CHAT WINDOW ===== */
.chatbot-window {
    position: fixed;
    bottom: 150px;
    right: 25px;
    width: 350px;
    max-height: 480px;
    background: rgba(18, 18, 34, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(201, 169, 110, 0.22);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(201, 169, 110, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.94);
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ===== CHAT HEADER ===== */
.chatbot-header {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.15), rgba(160, 124, 62, 0.08));
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.12);
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a96e, transparent);
}

.chatbot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e 0%, #a07c3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1a1a2e;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(201, 169, 110, 0.3);
    position: relative;
}

.chatbot-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    background: #2ecc71;
    border-radius: 50%;
    border: 2px solid rgba(22, 22, 40, 0.97);
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-info h4 {
    color: #f5f0e8;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 1px 0;
    letter-spacing: 0.2px;
}

.chatbot-header-info span {
    color: #2ecc71;
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-header-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    animation: online-pulse 2s infinite;
}

@keyframes online-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chatbot-header-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(201, 169, 110, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #c9a96e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chatbot-header-close:hover {
    background: rgba(201, 169, 110, 0.15);
    transform: rotate(90deg);
}

/* ===== CHAT MESSAGES ===== */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 290px;
    min-height: 200px;
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(201, 169, 110, 0.25);
    border-radius: 10px;
}

/* Message Bubbles */
.chat-message {
    display: flex;
    gap: 8px;
    max-width: 90%;
    animation: msg-slide-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

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

.chat-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-message.bot .chat-msg-avatar {
    background: linear-gradient(135deg, #c9a96e, #a07c3e);
    color: #1a1a2e;
}

.chat-message.user .chat-msg-avatar {
    background: rgba(100, 100, 200, 0.25);
    color: #a8a8ff;
}

.chat-msg-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    position: relative;
}

.chat-message.bot .chat-msg-bubble {
    background: rgba(255, 255, 255, 0.06);
    color: #e0d8cc;
    border: 1px solid rgba(201, 169, 110, 0.1);
    border-bottom-left-radius: 4px;
}

.chat-message.user .chat-msg-bubble {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.2), rgba(160, 124, 62, 0.15));
    color: #f5f0e8;
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-bottom-right-radius: 4px;
}

.chat-msg-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 3px;
    display: block;
}

.chat-message.user .chat-msg-time {
    text-align: right;
}

/* Quick Reply Buttons */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-reply-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(201, 169, 110, 0.35);
    background: rgba(201, 169, 110, 0.08);
    color: #c9a96e;
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-weight: 500;
}

.quick-reply-btn:hover {
    background: rgba(201, 169, 110, 0.2);
    border-color: rgba(201, 169, 110, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(201, 169, 110, 0.15);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 8px;
    align-self: flex-start;
    max-width: 88%;
    animation: msg-slide-in 0.3s ease;
}

.typing-indicator .chat-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e, #a07c3e);
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(201, 169, 110, 0.1);
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c9a96e;
    animation: typing-bounce 1.4s infinite;
}

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

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

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ===== CHAT INPUT ===== */
.chatbot-input-area {
    padding: 10px 12px;
    border-top: 1px solid rgba(201, 169, 110, 0.1);
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(15, 15, 30, 0.5);
}

.chatbot-input {
    flex: 1;
    padding: 9px 14px;
    border-radius: 20px;
    border: 1px solid rgba(201, 169, 110, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #f5f0e8;
    font-size: 0.84rem;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.chatbot-input:focus {
    border-color: rgba(201, 169, 110, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.1);
}

.chatbot-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e, #a07c3e);
    border: none;
    color: #1a1a2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(201, 169, 110, 0.3);
}

.chatbot-send:active {
    transform: scale(0.95);
}

/* ===== POWERED BY ===== */
.chatbot-powered {
    padding: 5px;
    font-size: 0.68rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    background: rgba(10, 10, 20, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.chatbot-powered i {
    color: #c9a96e;
    margin: 0 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .chatbot-window {
        right: 12px;
        left: 12px;
        bottom: 195px;
        width: auto;
        max-height: 70vh;
        border-radius: 20px;
    }

    .chatbot-toggle {
        bottom: 78px;
        right: 18px;
        width: 46px;
        height: 46px;
    }

    .chatbot-hint {
        bottom: 132px;
        right: 18px;
    }

    .chatbot-toggle .chat-icon,
    .chatbot-toggle .close-icon {
        font-size: 20px;
    }

    .chatbot-messages {
        max-height: calc(70vh - 180px);
        min-height: 180px;
    }

    .chat-message {
        max-width: 92%;
    }

    .chat-msg-bubble {
        font-size: 0.85rem;
    }

    .quick-reply-btn {
        font-size: 0.75rem;
        padding: 7px 13px;
    }
}

/* ===== SPECIAL MESSAGE STYLES ===== */
.chat-msg-bubble strong {
    color: #c9a96e;
    font-weight: 600;
}

.chat-msg-bubble a {
    color: #c9a96e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-msg-bubble a:hover {
    color: #e0c180;
}

.chat-msg-bubble ul {
    margin: 6px 0 2px 0;
    padding-left: 18px;
    list-style: none;
}

.chat-msg-bubble ul li {
    position: relative;
    padding-left: 4px;
    margin-bottom: 3px;
}

.chat-msg-bubble ul li::before {
    content: '✦';
    position: absolute;
    left: -16px;
    color: #c9a96e;
    font-size: 0.7rem;
    top: 2px;
}

/* Card-style message for products/services */
.chat-info-card {
    background: rgba(201, 169, 110, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.chat-info-card h5 {
    color: #c9a96e;
    font-size: 0.88rem;
    margin: 0 0 6px;
}

.chat-info-card p {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Welcome hint animation */
.chatbot-hint {
    position: fixed;
    bottom: 150px;
    right: 25px;
    background: rgba(22, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    color: #f5f0e8;
    padding: 9px 15px;
    border-radius: 12px 12px 4px 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(201, 169, 110, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 9997;
    animation: hint-appear 0.5s ease;
    max-width: 200px;
    line-height: 1.35;
}

.chatbot-hint::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 20px;
    width: 14px;
    height: 14px;
    background: rgba(22, 22, 40, 0.95);
    border-right: 1px solid rgba(201, 169, 110, 0.2);
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
    transform: rotate(45deg);
}

.chatbot-hint .hint-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.3);
    border: none;
    color: #f5f0e8;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-hint .hint-close:hover {
    background: rgba(201, 169, 110, 0.5);
}

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