/* General styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    height: 100vh;
}



/* FORDWARD  */
/* Forward Modal Styles */
.forward-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .forward-modal-content {
    background: #2c2c2c;
    color: #f1f1f1;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
  }
  
  .forward-modal-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #333;
    color: #f1f1f1;
  }
  
  .forward-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .forward-modal-content ul li {
    padding: 10px;
    border-bottom: 1px solid #555;
    cursor: pointer;
  }
  
  .forward-modal-content ul li:hover {
    background: #444;
  }
  
  .close-forward {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #f1f1f1;
  }
  
  /* Forward Button next to message box */
  /* Message wrapper containing bubble + forward button */
.message-wrapper {
    display: flex;
    align-items: center;
    max-width: 80%;
    /* margin: 8px 0; */
    gap: 8px;
}


.message-wrapper.sent {
    margin-left: auto;
    flex-direction: row-reverse; 
}


.message-wrapper.received {
    margin-right: auto;
}

/* Forward button styling */
.forward-btn {
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    padding: 4px;
    transition: all 0.2s ease;
    
}

/* Show forward button on hover */
.message-wrapper:hover .forward-btn {
    visibility: visible;
    opacity: 1;
}

/* Remove max-width from message bubbles */
.message {
    max-width: unset;
    width: fit-content;
}
  

/* Dark mode styles */
body.dark-mode {
    background: #181818;
    color: #ffffff;
}

body.dark-mode .container {
    background: #242424;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .sidebar {
    background: #242424;
    border-right: 1px solid #444;
}

body.dark-mode .platform-selector {
    background: #1e1e1e;
}

body.dark-mode .platform-btn {
    background: #333;
    color: #ffffff;
    border: 1px solid #444;
}

body.dark-mode .platform-btn.active {
    background: #444;
    color: #ffffff;
    border-color: #666;
}

body.dark-mode .conversation.unread {
    background: linear-gradient(90deg, #44475a, #6272a4); /* Subtle gradient for unread messages */
    color: #f8f8f2; /* Bright text for better contrast */
    border-left: 4px solid #ffb86c; /* Orange accent for unread */
    border-radius: 5px; /* Rounded edges */
    box-shadow: 0 4px 8px rgba(255, 184, 108, 0.3); /* Orange glow to make it stand out */
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

/* For read conversations */
body.dark-mode .conversation {
    background: #3a3a3a; /* Dark grey for read messages */
    border-bottom: 1px solid #5c5c5c; /* Subtle lighter border for separation */
    color: #bbb; /* Slightly muted text color */
    transition: background 0.3s, color 0.3s; /* Smooth hover effect */
}

/* Hover effect for both read and unread */
body.dark-mode .conversation:hover {
    background: #444; /* Slightly lighter shade on hover */
    color: #fff; /* Brighten text on hover */
}


body.dark-mode .messages-container {
    background: #1e1e1e;
    border-top: 1px solid #444;
}

body.dark-mode .input-container {
    background: #242424;
    border-top: 1px solid #444;
}

body.dark-mode textarea {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

body.dark-mode .send-btn {
    background: #444;
    color: #fff;
}

.dark-mode-switch {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 20px;
    margin-right: 10px;
}

.dark-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Align dark mode toggle with text */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto; /* Push to the left */
}

.dark-mode-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.dark-mode-switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.dark-mode-switch input:checked + .slider {
    background-color: #0084ff;
}

.dark-mode-switch input:checked + .slider:before {
    transform: translateX(20px);
}



.container {
    display: flex;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar styling */
.sidebar {
    width: 300px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.platform-selector {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
}

.platform-btn {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.platform-btn.active {
    background: #0084ff;
    color: white;
    border-color: #0084ff;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.conversation {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
    position: relative;
    margin-bottom: 10px; /* Add this for spacing */
}
.conversation:last-child {
    margin-bottom: 0; /* Ensure no extra space after the last conversation */
}


.conversation:hover {
    background: #f0f8ff;
    transform: translateY(-2px);
}

.conversation.unread {
    font-weight: bold;
    background: #c5ddf4; /* Light blue background for unread */
}

.new-badge {
    background: #ff4500;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Platform-specific styles */
span[data-platform="messenger"] {
    background: #0084ff;
    color: white;
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: bold;
}

span[data-platform="instagram"] {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
    color: white;
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: bold;
}

/* Chat container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

/* Ensure the header content aligns properly */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background: #f4f4f4;
}

.client-info {
    font-size: 1rem;
}


/* IMAGE */
.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
}
.message-video {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
}

.message-audio {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    /* background: #f0f2f5; */
    margin-top: 5px;
    /* max-width: 300px; */
    cursor: pointer;
}


/* The Modal (background) */
.image-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

/* Modal Content (the image) */
.modal-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* display: flex; */
    justify-content: center;
    align-items: center;
}

/* Wrapper for content */
.modal-content-wrapper {
    position: relative;
    /* background: #ffffff; */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Properly sized modal image */
.modal-content {
    max-width: 80vw; /* Responsive width */
    max-height: 80vh; /* Responsive height */
    object-fit: contain; /* Prevent stretching */
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

/* Ensure close button is visible */
.image-modal .close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Button to download image */
.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: #0084ff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
    cursor: pointer; /* Ensures click cursor on hover */
}

.download-btn:hover {
    background: #0056b3;
}






  .messages-container {
    display: flex; 
    flex-direction: column;
    /* Remove the following line so content isn’t forced to the bottom */
    /* justify-content: flex-end; */
    overflow-y: auto;
    height: 100vh; /* Adjust as needed */
    padding: 10px;
  }
  
  
  

.input-container {
    display: flex !important;
    padding: 10px !important;
    border-top: 1px solid #ddd !important;
    background: #ffffff !important;
    position: sticky !important; /* Sticky instead of fixed */
    bottom: 0 !important;
    z-index: 1000 !important;
}

body.dark-mode .input-container {
    background: #242424 !important;
    border-top: 1px solid #444 !important;
}


/* Message bubbles */
/* .message {
    max-width: 50%;
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    word-break: break-word; 
} */



/* MESSAGE */

.message {
    /* max-width: 30%; */
    margin: 8px 0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 14px;
    /* line-height: 1.4; */
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
}

.message.sent {
    background: #0084ff;
    color: white;
    margin-left: auto;
    text-align: left;
}




.message img,
.message video{
  max-width: 100%;
  height: auto;
  display: block;
}






.message.sent.image-message {
    max-width: 70%; /* Increase this percentage as needed */
  }



.message.received {
    background: #e4e6eb;
    color: black;
    margin-right: auto;
    text-align: left;
}

.message.messenger {
    border: 1px solid #0084ff;
}

.message.instagram {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
    color: white;
}

.message p {
    font-weight: bold;
    margin-bottom: 5px;
}

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

/* Input container */
.input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: #ffffff;
}

textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 15px;
    resize: none;
    height: 40px;
    font-size: 14px;
}

textarea:focus {
    outline: none;
    border-color: #0084ff;
}

.send-btn {
    padding: 0 20px;
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s;
}

.send-btn:hover {
    background: #0056b3;
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.message.sent.failed {
    background: #ffc0cb; /* Light red for failed messages */
    color: black;
    border: 1px solid red;
    position: relative;
}

.message.sent.failed::after {
    content: "Failed";
    color: red;
    font-size: 12px;
    position: absolute;
    bottom: -15px;
    right: 10px;
    font-weight: bold;
    cursor: pointer;
}


.page-info {
    display: inline-block; /* Allows adding padding and rounded corners */
    font-size: 12px; /* Slightly smaller font size */
    font-weight: bold; /* Highlight the text */
    color: #333; /* Dark text color */
    background: #f0f2f5; /* Subtle light background */
    padding: 5px 10px; /* Padding for rounded effect */
    border-radius: 15px; /* Soft rounded corners */
    text-transform: capitalize; /* Capitalize the first letter */
    border: 1px solid #ddd; /* Subtle border */
   
    transition: transform 0.3s, box-shadow 0.3s; /* Add hover effects */
}

.page-info:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Add shadow for hover */
    background: #eaeaea; /* Change background color on hover */
}


/* Page info styles for dark mode */
body.dark-mode .page-info {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    color: #f8f8f2; /* Bright text for contrast */
    background: #44475a; /* Subtle dark background for contrast */
    padding: 5px 10px;
    border-radius: 15px;
    text-transform: capitalize;
    border: 1px solid #6272a4; /* Softer accent border for dark mode */

    transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

/* Hover effect for page info in dark mode */
body.dark-mode .page-info:hover {
    transform: scale(1.05); /* Slight hover enlarge effect */
    box-shadow: 0 2px 8px rgba(80, 250, 123, 0.2); /* Add subtle green glow shadow */
    background: #6272a4; /* Softer background highlight */
    border-color: #50fa7b; /* Green border highlight for hover */
    color: #ffffff; /* Slightly brighter text on hover */
}


body.dark-mode .conversation.selected {
    background: #6272a4; /* Softer background highlight */
    color: #ffffff; /* Brighter text for readability */
    box-shadow: 0 4px 12px rgba(80, 250, 123, 0.4); /* Green glow shadow */
    border: 1px solid #50fa7b; /* Green border to match the glow */
    border-radius: 8px; /* Rounded corners for a smooth effect */
   /* transform: scale(1.05);  Slight enlargement to draw attention */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}


body.dark-mode .chat-header {
    background: #242424; /* Dark background */
    border-bottom: 1px solid #444; /* Dark border */
    color: #ffffff; /* Light text */
}


.search-filter-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    align-items: center;
}

#searchInput {
    flex: 2; /* Make the search bar wider */
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#pageFilter {
    flex: 1; /* Make the dropdown smaller */
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}


.date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888; /* Subtle color */
    font-size: 12px;
    margin: 10px 0; /* Spacing above and below */
}

.date-divider::before,
.date-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #ddd; /* Light line for divider */
    margin: 0 10px; /* Space around the date */
}

body.dark-mode .date-divider {
    color: #bbb; /* Light text for dark mode */
}

body.dark-mode .date-divider::before,
body.dark-mode .date-divider::after {
    border-top: 1px solid #444; /* Dark mode line */
}





/* Media Query for Responsive */
/* General styling for mobile responsiveness */
@media (max-width: 768px) {


    .message.sent {
        background: #0084ff;
        color: white;
        /* Removed margin-left: auto; so it stays left-aligned */
        text-align: left !important;
    }
    
    /* For sent audio messages, reverse the flex direction so controls appear from left-to-right */
    .message.sent.audio-message {
        display: flex;
        flex-direction: row-reverse; /* Reverse order of child elements */
        justify-content: flex-start;
       
        margin-left: 100px;
    }
    
    /* Ensure the audio element scales properly */
    .message-audio {
        display: flex;
        align-items: center;
        padding: 10px;
        border-radius: 10px;
        margin-top: 5px;
        max-width: 150px;
        cursor: pointer;
        text-align: left !important;
    }
    
    
    


    .message-image,
    .message-video {
        max-width: 100% !important;
        height: auto !important;
    }






    /* IMAGE */
.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
}
.message-video {
    max-width: 400px;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
}



/* TIME */
.message {
    position: relative;
    transition: transform 0.3s ease; /* Smooth upward animation */
    max-width: 80% !important;
} 

.message .timestamp {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: -22px; /* Positioned below the message box */
    left: 0;
    font-size: 12px;
    color: #888; /* Subtle color */
    background-color: #f0f0f0; /* Background to make it stand out */
    /* padding: 2px 5px; */
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

body.dark-mode .message .timestamp {
    color: #bbb; /* Light color for dark mode */
    background-color: #333; /* Dark background for dark mode */
}

.message.show-timestamp {
    transform: translateY(-5px); /* Push the message slightly upward */
}

.message.show-timestamp .timestamp {
    display: inline-block; /* Reveal the timestamp */
}


.date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888; /* Subtle color */
    font-size: 12px;
    margin: 10px 0; /* Spacing above and below */
}

.date-divider::before,
.date-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #ddd; /* Light line for divider */
    margin: 0 10px; /* Space around the date */
}

body.dark-mode .date-divider {
    color: #bbb; /* Light text for dark mode */
}

body.dark-mode .date-divider::before,
body.dark-mode .date-divider::after {
    border-top: 1px solid #444; /* Dark mode line */
}



    .messages-container {
        flex: 1;
        overflow-y: auto;
        background: #f0f2f5;
        border-top: 1px solid #ddd;
        padding-bottom: 60px !important; /* Ensure space above the text area */
        position: relative;
    }

    .input-container {
        display: flex !important;
        padding: 8px !important;
        border-top: 1px solid #ddd !important;
        background: #ffffff !important;
        position: fixed !important; /* Make it fixed to the bottom */
        bottom: 0 !important; /* Stick to the bottom */

        z-index: 1000 !important;
    }


    body.dark-mode .input-container {
        background: #242424 !important;
        border-top: 1px solid #444 !important;
    }


    textarea {
        font-size: 12px !important; /* Smaller font size */
        min-height: 35px !important; /* Smaller minimum height */
    }

    .send-btn {
        padding: 0 15px !important; /* Smaller button */
        font-size: 12px !important;
    }


    .header-content {
        padding: 5px !important; /* Reduce padding */
    }

    .dark-mode-toggle {
        font-size: 12px !important; /* Smaller font size for dark mode toggle */
        gap: 5px !important; /* Reduce gap between elements */
    }

    .dark-mode-switch {
        width: 30px !important; /* Smaller switch size */
        height: 15px !important;
    }

    .dark-mode-switch .slider {
        border-radius: 15px !important;
        background-color: #ccc !important;
    }

    .dark-mode-switch .slider:before {
        width: 12px !important; /* Smaller slider button */
        height: 12px !important;
        bottom: 1.5px !important;
        left: 1.5px !important;
    }

    .dark-mode-switch input:checked + .slider:before {
        transform: translateX(15px) !important; /* Adjust for smaller size */
    }

    .client-info h2.client-name {
        font-size: 16px !important; /* Smaller font size for client name */
    }

    .client-info p.page-name {
        font-size: 12px !important; /* Smaller font size for page name */
        color: #aaa !important; /* Subtle color for smaller screens */
    }



    span[data-platform="messenger"] {
        font-size: 5px; /* Smaller font size */
        padding: 3px 4px; /* Smaller padding */
        border-radius: 10px; /* Tighter rounded corners */
    }

    /* Instagram badge in mobile view */
    span[data-platform="instagram"] {
        font-size: 6px; /* Smaller font size */
        padding: 3px 8px; /* Smaller padding */
        border-radius: 10px; /* Tighter rounded corners */
    }



    .container {
        max-width: 100%; /* Ensure it fits within the screen */
    }

    .sidebar {
        width: 150px !important; /* Slightly reduce width of sidebar */
    }

    .platform-selector {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 5px !important; /* Reduce gap between buttons */
        padding: 5px !important; /* Smaller padding */
    }

    .platform-btn {
        font-size: 12px !important; /* Smaller font size for buttons */
        padding: 6px 10px !important; /* Adjust padding */
    }

    .search-filter-container {
        flex-direction: column !important; /* Stack search and filter vertically */
        gap: 5px !important; /* Smaller gap between elements */
    }

    #searchInput {
        width: 100% !important; /* Keep full width for input */
        padding: 6px !important; /* Smaller padding for input */
        font-size: 14px !important; /* Reduce font size */
    }

    #pageFilter {
        width: 100% !important; /* Keep full width for dropdown */
        padding: 6px !important; /* Smaller padding for dropdown */
        font-size: 14px !important; /* Reduce font size */
    }

    .conversations-list {
        width: 150px; /* Reduced width for mobile devices */
        padding: 1px !important; /* Adjusted padding for smaller screens */
    }

    .conversation {
        font-size: 10px; /* Smaller font for conversation items */
        padding: 8px; /* Compact padding */
        margin-bottom: 8px; /* Adjust spacing between conversations */
    }

    .conversation h3 {
        font-size: 14px; /* Smaller font for conversation titles */
    }

/* Adjust page-info for smaller size */
.conversation .page-info {
    font-size: 8px !important; /* Smaller font for page info */
    padding: 1px 1px !important; /* Reduce padding for a more compact look */
    border-radius: 10px !important; /* Adjust border radius for a smaller rounded effect */
    border: 1px solid #ccc; /* Subtle border for clarity */
    text-transform: capitalize; /* Keep the capitalization */
    background: #f7f7f7; /* Lighter background for readability */
    color: #555; /* Muted text color */
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

/* Hover effect for page-info */
.conversation .page-info:hover {
    transform: scale(1.05); /* Slight enlarge on hover */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    background: #e0e0e0; /* Slightly darker background on hover */
    border-color: #bbb; /* Subtle border highlight on hover */
    color: #333; /* Darker text on hover */
}


    .messages-container {
        font-size: 14px; /* Smaller font for messages */
        padding: 10px; /* Adjust padding */
    }

    .message {
        /* max-width: 45% !important;  */
        font-size: 12px !important; /* Slightly smaller font for messages */
       /*  padding: 5px !important; */
    }

    textarea {
        font-size: 14px; /* Adjust font size in textarea */
        height: 50px; /* Adjust height */
        padding: 8px; /* Reduce padding */
    }

    .send-btn {
        font-size: 14px; /* Adjust button font size */
        padding: 8px 16px; /* Reduce padding for send button */
    }

    .chat-header {
        font-size: 14px; /* Adjust header font size */
        padding: 8px 12px; /* Compact header padding */
    }

    .dark-mode-toggle {
        gap: 5px; /* Reduce gap between toggle and label */
    }
    .platform-btn {
        padding: 4px 10px; /* Even smaller padding for mobile */
        font-size: 10px; /* Smaller font size */
        border-radius: 10px; /* Tighter rounded corners */
    }

    /* Adjust active state for mobile */
    .platform-btn.active {
        background: #007acc; /* Slightly darker active color */
        color: white; /* White text */
        border-color: #005fa3; /* Darker border for active */
    }

    /* Adjust dark mode for mobile */
    body.dark-mode .platform-btn {
        background: #222; /* Slightly darker background */
        color: #ccc; /* Softer white text */
        border: 1px solid #333; /* Darker border */
    }

    /* Adjust hover state for mobile in dark mode */
    body.dark-mode .platform-btn:hover {
        background: #444; /* Slightly lighter dark background */
        color: #ffffff; /* Bright white text */
        border-color: #555; /* Slightly lighter border */
    }



}



/* Adjustments for very small screens (max-width: 480px) */
@media (max-width: 480px) {
    .sidebar {
        width: 200px; /* Further reduce sidebar width */
    }

    .platform-btn {
        padding: 4px 8px; /* Compact padding */
        font-size: 10px; /* Smaller font for platform buttons */
    }

    #searchInput,
    #pageFilter {
        font-size: 12px; /* Smaller font size */
        padding: 4px; /* Compact padding */
    }

    .conversation {
        font-size: 12px; /* Smaller font for conversations */
        padding: 6px; /* Compact padding */
    }

    .messages-container {
        font-size: 12px; /* Smaller font for messages */
        padding: 8px; /* Compact padding */
    }

    .message {
        max-width: 80%; /* Adjust message bubble width */
        font-size: 12px; /* Smaller font for messages */
        /* padding: 6px;  */
    }

    textarea {
        font-size: 12px; /* Smaller font for textarea */
        height: 40px; /* Adjust height */
        padding: 6px; /* Compact padding */
    }

    .send-btn {
        font-size: 12px; /* Smaller font size for send button */
        padding: 6px 12px; /* Compact padding */
    }

    .chat-header {
        font-size: 12px; /* Smaller font for header */
        padding: 6px 10px; /* Compact padding */
    }
}
