/* Smart Chatbot CSS */
.smart-chat-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-body), sans-serif;
}

.chat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chat-launcher-text {
    position: absolute;
    right: 80px;
    bottom: 20px;
    background: var(--bg-card);
    border: 2px solid var(--primary-yellow);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    animation: bounceText 2s infinite;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-launcher-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent var(--primary-yellow);
}
.wave-icon {
    display: inline-block;
    animation: waveHand 2.5s infinite;
    transform-origin: bottom center;
}

@keyframes waveHand {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}
@keyframes bounceText {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chat-launcher-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e50914; /* Red badge */
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.chat-launcher-btn {
    width: 65px;
    height: 65px;
    background: var(--primary-yellow);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.chat-launcher-btn:hover {
    transform: scale(1.05);
    background: #fff;
}

/* Chat Panel */
.smart-chat-panel {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 140px);
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.smart-chat-panel[hidden] {
    display: block !important;
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    background: var(--primary-yellow);
    color: #000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header button {
    background: none;
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}
.chat-header button:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0,0,0,0.5);
}

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    animation: fadeIn 0.3s ease;
}
.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: var(--bg-card);
    border: 1px solid var(--primary-yellow);
    color: var(--primary-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.user-message .message-avatar {
    background: #333;
    color: #fff;
    border-color: #555;
}

.message-bubble {
    background: var(--bg-card);
    color: #fff;
    padding: 12px 15px;
    border-radius: 12px 12px 12px 0;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--glass-border);
    max-width: 85%;
}
.bot-message-highlight {
    background: var(--primary-yellow);
    color: #000;
    border: none;
}
.user-message .message-bubble {
    border-radius: 12px 12px 0 12px;
    background: #222;
    border-color: #444;
}

.chat-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    align-items: flex-end;
}
.quick-reply-btn {
    background: var(--bg-light);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    text-align: right;
}
.quick-reply-btn:hover {
    background: var(--primary-yellow);
    color: #000;
}

.chat-footer {
    padding: 15px;
    background: var(--bg-card);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-footer input {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}
.chat-footer input::placeholder { color: #888; }
.chat-footer input:focus { border-color: var(--primary-yellow); }

.chat-send-btn {
    background: none;
    border: none;
    color: var(--primary-yellow);
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    padding: 5px;
}
.chat-send-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

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

@media (max-width: 768px) {
    .smart-chat-panel {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .chat-launcher-text { display: none; }
}
