* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
}


.chat-container {
    width: 480px;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: #ffffff;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #745C97;
    color: #ffffff;
    font-size: 18px;
}

.app-title {
    font-weight: bold;
}

.cart-icon {
    display: flex;
    align-items: center;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #ff8c00;
    color: #fff;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 12px;
}

.chat-box {
    padding: 15px;
    min-height: 500px;
    overflow-y: auto;
    max-height: 500px;
    /* background-color: #fafafa; */
}

.message-container {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    max-width: 80%;
    border-color: #745C97 !important;
}

.message {
    padding: 10px;
    border-radius: 10px;

}

.user-message .message {
    background-color: #e6e6fa;
    align-self: flex-end;
    text-align: right;
}

.bot-message .message {
    background-color: #4b0082;
    color: #fff;
}

.timestamp {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.search-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    font-weight: bold;
    color: #4b0082;
    background-color: #e0d6ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
    position: absolute;
    bottom: 0px;
    position: relative;
}

#chatInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
}

#sendBtn {
    background-color: #6e4ba0;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}
#voiceBtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 8px;
}

#voiceBtn img {
    width: 24px;
    height: 24px;
}

.message-container {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    max-width: 80%;
}

/* Additional styles for bot message container to position the avatar */
.bot-message .message-container {
    display: flex;
    align-items: flex-start;
}

/* Message Container */
.message-container {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    max-width: 100%;
}

/* Bot Message with Avatar on the Left */
.bot-message-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
  
}

/* Avatar styling */
.bot-avatar {
    width: 30px;
    height: 30px;
    margin-right: 50px; 
    border-radius: 50%;
   
}

/* Message Styling */
.message {
    padding: 10px;
    border-radius: 10px;
    max-width: calc(100% - 42px); /* Ensures message text fits within container */
}

.user-message .message {
    background-color: #e6e6fa;
    align-self: flex-end;
    text-align: right;
}

.bot-message .message {
    color: #fff;
    text-align: left;
    margin-left: 30px;
    margin-top: -20px;
}

/* Timestamp Styling */
.timestamp {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    margin-left: 30px;
}
.user-message .timestamp {
    text-align: left;
    text-align: right !important;
    margin-left: 230px;
}
.user-message .timestamp {
    text-align: left;  /* Left-aligned for user message */
}

.bot-message .timestamp {
    text-align: right; /* Right-aligned for bot message */
}


/* Position message text and timestamp next to the avatar */
.message {
    padding: 10px;
    border-radius: 10px;
}

.user-message .message {
    background-color: #e6e6fa;
    align-self: flex-end;
    text-align: right;
}



.timestamp {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    text-align: left !important;
}


#cover-spin {
    position:fixed;
    width:100%;
    left:0;right:0;top:0;bottom:0;
    background-color: rgba(255,255,255,0.7);
    z-index:9999;
    display:none;
}

@-webkit-keyframes spin {
	from {-webkit-transform:rotate(0deg);}
	to {-webkit-transform:rotate(360deg);}
}

@keyframes spin {
	from {transform:rotate(0deg);}
	to {transform:rotate(360deg);}
}

#cover-spin::after {
    content:'';
    display:block;
    position:absolute;
    left:48%;top:40%;
    width:40px;height:40px;
    border-style:solid;
    border-color:black;
    border-top-color:transparent;
    border-width: 4px;
    border-radius:50%;
    -webkit-animation: spin .8s linear infinite;
    animation: spin .8s linear infinite;
}


