
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    /*overflow-y: hidden;*/
}
#main-content {
    flex-grow: 1;
    display: flex;
    margin-top: 180px;
    height: auto;
    width: 100%;
}
#sidebar {
    width: 200px;
    border-right: 1px solid #ccc;
    overflow-y: auto;
    max-height: 100vh;
    min-width:200px;
}
#chat-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
#chat-history {
flex-grow: 1;
padding: 10px;
overflow-y: auto; /* Enable vertical scrolling */
max-height: 500px; /* Example fixed height; adjust as needed */
}
#tagFilter{
    height:25px;
}
#message-input-container {
    padding: 10px;
    border-top: 1px solid #ccc;
}
.contact { padding: 10px; cursor: pointer; }
.contact:hover { background-color: #f0f0f0; }
.message { margin-bottom: 10px; padding: 5px; background-color: #e9e9e9; }
.message.me {background-color: #DCF8C6; /* Light green, similar to WhatsApp's styling for sent messages */}
.sender { font-weight: bold; }
.timestamp { font-size: 0.85em; color: #666; }
.contact.unread {background-color: blue; /* Light blue, indicating unread messages */}
.selected {
    background-color: red; /* Light blue background for selected contact */
    color: white; /* White text color for better contrast */
}

.chat-header {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    z-index: 1000;
}

#contactSearch {
    width: 90%;
    padding: 8px 10px;
}

#sidebar, #chat-container {
    /* If necessary, adjust padding/margin to ensure the sidebar and chat container flow below the fixed header */
}

.highlight {
    background-color: purple; /* or any highlight color */
    color:white;
}

/* Add this to a CSS file or a <style> tag in your HTML */
#sidePanel {
    position: fixed;
    right: -450px; /* Start off-screen */
    top: 0;
    width: 450px;
    height: 100%;
    background-color: #f8f9fa;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 20px;
    transition: right 0.3s ease;
}

#sidePanel.show {
    right: 0; /* Slide in */
}

.form-group {
    padding-top: 5px;
  }
  select[multiple] {
    height: auto; /* Adjust height as needed */
  }

.sidepanel-input{
width:100%;
}

/* Styles for the contextual menu */
.context-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-menu ul li {
    padding: 8px 12px;
    cursor: pointer;
}

.context-menu ul li:hover {
    background: #eee;
}

/* Style for context menu */
#context-menu {
    position: absolute;
    display: none;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 10px;
    border-radius: 4px;
}

#context-menu button {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

#context-menu button:hover {
    background-color: #f5f5f5;
}

/* Style for tag selection dropdown */
#tag-selection-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 10px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#tag-selection-dropdown select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Style for the sidebar contacts */
#sidebar .contact {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

#sidebar .contact:hover {
    background-color: #f5f5f5;
}

#sidebar .contact.highlight {
    background-color: #82609f;
}

#sidebar .contact .tags {
    margin-top: 5px;
}

#sidebar .contact .tags .tag {
    background-color: #adadad;
    border-radius: 3px;
    padding: 2px 5px;
    margin-right: 5px;
    display: inline-block;
    font-size: 12px;
    color:black;
}

#sidebar .contact .tags .tag:hover {
    background-color: #d0d0d0;
}

/* Style for filter and search box */
#filter-contacts, #contact-search-box {
    margin: 10px 0;
}

#order-count-header {
    background-color: lightgray; /* Or any color you prefer */
    padding: 10px;
    margin-bottom: 10px;  /* Add some space below the header */
    font-weight: bold;
}

.flex-container {
    display: flex;  /* This makes children align in a row */
    flex-wrap: wrap;  /* Allows wrapping to the next line if space runs out */
    gap: 10px;  /* Optional: Adds spacing between items */
    justify-content: flex-start;  /* Align items at the start of the container */
}


/* General chat message styling */
.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 70%;
    clear: both;
    font-size: 14px;
    line-height: 1.4;
    max-width:80%;
}

/* Messages from the user (right-aligned, light green background) */
.message.me {
    background-color: #DCF8C6; /* Light green */
    margin-left: auto;
    text-align: right;
}

/* Messages from the client (left-aligned, white background) */
.message.client {
    background-color: #FFFFFF; /* White */
    text-align: left;
    margin-right: auto;
    border: 1px solid #ccc;
}

/* Timestamp styling */
.timestamp {
    font-size: 0.85em;
    color: #666;
    display: block;
    margin-top: 5px;
    text-align: right;
}

/* Optional: chat container styling */
#chat-history {
    padding: 10px;
    overflow-y: auto;
    max-height: 500px;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 8px;
}
