body {
    background-color: #E0E1DD;
   /* Background color */
    margin: 0;
    padding: 0;
    overflow-y: hidden;
}
body, h1, h2, h3, h4, h5, h6  {
    font-family: Helvetica, Arial, sans-serif;
  }
header {
    background-color: #1B263B;
    color: #E0E1DD;
    padding: 10px 0;
    margin-bottom: 10px;
    height: 65px;
}
.app-name{
    margin-left: 20px;
    font-size: x-large;
    font-weight: bolder;
}

#container {
    display: none;
    margin: 0px;
}
#create-and-rooms {
    flex-basis: 30%;
    padding: 10px;
    border-right: 1px solid #415A77;
    height: calc(100svh - 20px);
    overflow-y: auto;
}
#create-room, #rooms, #your-rooms {
    margin-bottom: 20px;
}
#create-room h3{
    margin-top: 45px;
    font-weight: bolder;
    margin-left: 15px;
    margin-bottom: 10px;
    font-size: 1.2em;
}
#your-rooms h3{
    font-weight: bold;
    margin-left: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 1.2em;
}
#rooms h3 {
    font-weight: bold;
    margin-left: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
}
#room-list, #your-room-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: hidden;
    max-height: calc(100svh - 160px);
}
#room-list li, #your-room-list li {
    position: relative;
    padding: 5px 2px 5px 20px;
    cursor: pointer;
    border-bottom: 1px solid #778DA9;
   /* Room list item border color */
}
#room-list li:last-child, #your-room-list li:last-child {
    border-bottom: 1px solid #778DA9;
   /* Room list item border color for last item */
}
#room-list li:hover, #your-room-list li:hover {
    background-color: #415A77;
   /* Room list item background color on hover */
}
#room-list li.active, #your-room-list li.active {
    background-color: #1B263B;
   /* Active room list item background color */
    color: #E0E1DD;
   /* Active room list item text color */
}
#chat {
    flex-basis: 95%;
    display: flex;
    flex-direction: column;
    border: 1px solid #415A77;
   /* Chat container border color */
    border-radius: 5px;
    background-color: #E0E1DD;
   /* Chat container background color */
    overflow: hidden;
    height:90svh;
    position: relative;
}
#chat-header {
    text-align: right;
    padding-right: 30px;
    background-color: #1B263B;
    color: #E0E1DD;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
#room-name {
    margin-top: 8px;
    font-size: larger;
    font-weight: 600;
}
#created-by{
    font-size:smaller;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;

}
.no-room-selected {
    display: none;
    text-align: center;
    margin: 180px 180px 200px 400px;
    align-self: center;
    font-size: 1.2em;
    color: #888;
}
#messages {
    list-style-type: none;
    padding: 10px;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    clear: both;
    word-wrap: break-word; 
    word-break: break-word;

}
.sent {
    background-color: #1B263B;
    color: #E0E1DD;
    padding: 10px;
    border-radius: 5px;
    max-width: 80%;
    margin: 5px 0 10px auto;
    word-wrap: break-word; 
    word-break: break-word;

}
.received {
    background-color: #E0E1DD;
   /* Received message background color */
}
.message .message-content {
    position: relative;
    padding: 5px;
}
.message .message-sender {
    font-weight: bold;
    color: #888;
    margin-right: 5px;
}
.message .message-text {
    display: block;
    margin-top: 5px;
    color: #333;
}
.message .timestamp {
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
    text-align: right;
}
.sent .message {
    background-color: #1B263B;
   /* Sent message background color */
    color: #E0E1DD;
   /* Sent message text color */
    align-self: flex-end;
    text-align: right;
}
.received .message-content {
    background-color: #E0E1DD;
   /* Received message background color */
    align-self: flex-start;
}
/* Adjustments for message boxes */
.sent .message-text {
    color: #E0E1DD;
   /* Adjusted text color for sent messages */
}
.received .message-text {
    color: #333;
   /* Adjusted text color for received messages */
}
#message-form {
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 5px;
    padding: 10px;
}
#message-input {
    flex: 1;
    height: 40px;
    margin-right: 10px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}
#message-btn {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 5px;
    background-color: #1B263B;
   /* Message button background color */
    color: #E0E1DD;
   /* Message button text color */
    font-size: 16px;
    cursor: pointer;
}
.room-created-by {
    font-size: 0.8em;
    color: #888;
}
.logout1{
    position: absolute;
    right: 18px;
    border: none;
    color: red;
    background-color: white;
    font-size: medium;
}

.logout-btn2 {
    right: 15px;
    padding: 10px;
    margin: 15px;
    border: none;
    border-radius: 5px;
    background-color: #D9534F;
   /* Logout button background color */
    color: #E0E1DD;
   /* Logout button text color */
    font-size: 16px;
    cursor: pointer;
}
.icon {
    margin-right: 10px;
}
/* style the container */
.container {
    position: absolute;
    border-radius: 5px;
    background-color: white;
    padding: 20px 0 30px 0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
/* style inputs and link buttons */
input, .btn {
    width: 60%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    margin: 5px 0;
    opacity: 0.85;
    display: inline-block;
    font-size: 17px;
    line-height: 20px;
    text-decoration: none;
   /* remove underline from anchors */
    cursor: pointer;
}
input:hover, .btn:hover {
    opacity: 1;
}
/* add appropriate colors to google and guest buttons */
.google {
    background-color: #dd4b39;
    color: white;
}
.guest {
    background-color: #555555;
    color: white;
}
/* Two-column layout */
.col {
    margin: auto;
    padding: 0 50px;
    margin-top: 6px;
    text-align: center;
}
/* Clear floats after the columns */
.row:after {
    content: "";
    display: table;
    clear: both;
}
/* bottom container */
.bottom-container {
    text-align: center;
    background-color: #666;
    border-radius: 0px 0px 4px 4px;
}
.delete-room-btn {
    background: none;
    border: none;
    color: #ff0000;
   /* Red color for the delete icon */
    cursor: pointer;
    padding: 5px;
    display:none;
   /* Hide by default */
    position: absolute;
    right: 10px;
   /* Adjust as needed */
}
.delete-room-btn i {
    font-size: 18px;
   /* Adjust icon size */
}
.delete-room-btn:hover i {
    color: #cc0000;
   /* Darker red on hover */
}
/* Show the delete button on hover */
.room-name:hover .delete-room-btn {
    display: block;
}
.room-name {
    display: flex;
    align-items: center;
   /* Vertical alignment */
    justify-content: space-between;
   /* Items spread apart */
    position: relative;
}
#room-input {
    height: 35px;
    padding: 0 5px;
    border: none;
    border-radius: 5px;
    margin-left: 15px;
    background-color: white;
    color: black;
    font-size: 16px;
    cursor: pointer;
}
#create-room-btn {
    height: 35px;
    border: none;
    border-radius: 5px;
    margin-left: 20px;
    background-color: #1B263B;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.footer {
    font-size: smaller;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid lightgrey;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}




#menuBtn{
    position: absolute;
    left: 15px;
    margin: 25px 0px 0px 0px;
    border: none;
    border-radius: 5px;
    background-color: #1B263B;
    color: #E0E1DD;
    font-size: 16px;
    cursor: pointer;
}

#menuBtnn{
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #1B263B;
    color: #E0E1DD;
    font-size: 16px;
    cursor: pointer;
}

.sidebar {
    /*height: calc(100svh - 85px);
    max-height: calc(100svh - 85px); */
    height: 90svh;
    border: 1px solid #415A77;
     border-radius: 5px;
    width: 250px; /* Adjust width as needed */
    position: fixed; /* Keeps the sidebar fixed in place */
    left: 0;
    background-color: #E0E1DD; /* Sidebar background color */
    overflow-y: auto; /* Adds vertical scrolling if content exceeds height */
    z-index: 1000; /* Ensure it stays on top of other content */
    display: flex;
    flex-direction: column;
}

.sidebar a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}
.sidebar-footer {
    flex-shrink: 0; /* Prevents the footer from shrinking */
    background: white;
    border-top: 1px solid lightgrey;
    padding: 15px;
    color: #333;
}

.sidebar a:hover {
    color: #f1f1f1;
}

.sidebar .closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: #E0E1DD;
    border: none;
    font-size: medium;

}

.content {
    transition: margin-left .5s;
    padding: 16px;
}

#rooms-container {
    flex: 1; /* Allows this section to grow and take available space */
    overflow-y: auto; /* Adds vertical scrolling if content exceeds height */
}
.openbtn.hidden {
    display: none;
}






/* On screens that are less than 600px wide, make the sidebar width 250px */
@media screen and (max-width: 600px) {
    .sidebar {
        width: 310px;
    }

    .content {
        margin-left: 0;
    }

    #chat {
        position: fixed;
    }

    .sent {
        background-color: #1B263B;
        color: #E0E1DD;
        padding: 10px;
        border-radius: 5px;
        max-width: 80%;
        margin: 5px 0 10px auto;
        word-wrap: break-word;
        word-break: break-word;
    }
    .container {
        width: 80%;
    }
}
   /* .sidebar {
         width: 280px; 
        height: calc(100svh - 85px); 
        max-height: calc(100svh - 85px);
        bottom: 0; 
    }
        */

        



/* Hide the sidebar on larger screens */
@media screen and (min-width: 601px) {
    .sidebar {width: 0;}
    .content {margin-left: 0;}
}



@media screen and (max-width: 768px) {
    #create-and-rooms {
        flex: 0 0 40%; /* Adjusted sidebar width for medium screens */
        height: calc(100svh - 100px);
    }
    #chat {
        max-height: calc(100svh - 20px);
        width: 100%;
        bottom: 0;
    }
    .no-room-selected {
        margin: 0;
        position: fixed;
        margin-top: 800px;
    }
    .content {
        padding: 0px;
    }
    .sidebar {
       /*  width: 280px; 
        height: calc(100svh - 85px);  
        max-height: calc(100svh - 85px);*/
        bottom: 0;
        width: 310px;
    }
    .container {
        width: 85%;
    }

    
}

