/* Default Styles */
.main-body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #f4f4f4, #e8e8e8);
}    
.input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    flex-grow: 1;
    border-radius: 25px;
    padding: 3px;
  
}

#chat-container {
    width: 360px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 9999; /* Ensures chatbot is above other elements */
}



#chat-header {
    background: #ffffff;
    color: #333;
    padding: 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    justify-content: space-between;
}

#chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

#close-chat {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

#chat-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
}

.message {
    padding: 12px;
    border-radius: 12px;
    max-width: 95%;
    margin: 8px 0;
    font-size: 14px;
}
.user-message {
    background: linear-gradient(135deg, #007bff, #00d4ff, #4c83ff);
    align-self: flex-end;
    color: white;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 95%;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.bot-message {
    background: linear-gradient(135deg, #b9f0f7,#dafc9c,#b9f0f7 );
    align-self: flex-start;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Alternate User Message Style */
.user-message.alt {
    background: linear-gradient(135deg, #ff416c, #ff4b2b, #ff7e5f);
}

/* Alternate Bot Message Style */
.bot-message.alt {
    background: linear-gradient(135deg, #e0eafc, #cfdef3, #b0c4de);
}

/* Additional styles for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message, .bot-message {
    animation: fadeIn 0.3s ease-in-out;
}


#chat-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #ddd;
}
#chat-input {
    flex-grow: 1;
    padding: 10px 45px 10px 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    background: #f1f1f1;
    position: relative;
}

#mic-button {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

#mic-button img {
    width: 25px;
    height: 25px;
}




/* Mic Glow Effect */
@keyframes mic-glow {
    0% { box-shadow: 0 0 5px rgb(255, 221, 0); }
    50% { box-shadow: 0 0 10px skyblue; }
    100% { box-shadow: 0 0 15px mediumaquamarine; }
}

.glowing {
    animation: mic-glow 1s infinite alternate;
    border-radius: 50%;
}

#send-button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 5px;
}

#send-button img {
    width: 32px;
    height: 32px;
}

#toggle-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

#toggle-chat img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ccc;
}

.spotify-player {
    width: 102%;
    margin-top: 10px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.typing-indicator img {
    width: 30px;
    height: 30px;
}



/* 📱 Media Queries for Mobile & Tablets */
/* 📱 Additional Media Query for Tablets (600px - 1024px) */
@media (min-width: 600px) and (max-width: 1024px) {
    #chat-container {
        width: 80%;
        bottom: 15px;
        right: 10%;
        border-radius: 18px;
        z-index: 9999; /* Ensures chatbot is above other elements */
    }

    #chat-header {
        padding: 14px;
        font-size: 15px;
    }

    #chat-header img {
        width: 38px;
        height: 38px;
    }

    .message {
        font-size: 14px;
        padding: 10px;
    }

    #chat-footer {
        padding: 10px;
    }

    #chat-input {
        font-size: 14px;
        padding: 9px;
    }

    #send-button img {
        width: 32px;
        height: 32px;
    }

    #toggle-chat img {
        width: 45px;
        height: 45px;
    }
}


/* For Mobile Devices (480px and below) */
@media (max-width: 480px) {
    #chat-container {
        width: 95%;
        bottom: 5px;
        right: 2.5%;
        border-radius: 10px;
        z-index: 9999; /* Ensures chatbot is above other elements */
    }
    
    #chat-header {
        padding: 10px;
        font-size: 12px;
    }

    #chat-header img {
        width: 35px;
        height: 35px;
    }

    .message {
        font-size: 12px;
        padding: 8px;
    }

    #chat-footer {
        padding: 8px;
    }

    #chat-input {
        font-size: 12px;
        padding: 6px;
    }

    #send-button img {
        width: 32px;
        height: 32px;
    }

    #toggle-chat img {
        width: 40px;
        height: 40px;
    }
}
