/* styles.css */

/* General Body and Flex Setup */
body {
    font-family: Arial, sans-serif;
    background-color: #eae6df;
    color: #000;
    display: flex;
    transition: background-color 0.3s, color 0.3s;
    margin:0;
    max-height: 100vh;
    max-width: 100vw;
    overflow: hidden;
}

#tabs {
    display: flex;
    flex-direction: column;
    width: 15vw;
    height: 100vh;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.tab {
    padding: 12px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
    color: #3b4a54;
}

.tab:hover {
    background-color: #e6e6e6;
}

.tab.active {
    background-color: #ffffff;
    color: #075e54;
    font-weight: bold;
}

#conversations {
    flex-grow: 1;
    padding: 10px;
    overflow-y: scroll;
    background-color: #e5ddd5;
  	width:80%;
}

.tab-content {
    display: none;
    background-color: #e5ddd5;
    padding: 10px;
}

.tab-content.active {
    display: block;
    height: 100vh;

}

.messages-container {
    max-height: 400px;
    overflow-y: visible;
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #e5ddd5;
}

.message {
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    display: inline-block;
    max-width: 80%;
    line-height: 1.4;
    clear: both;
}

.sent {
    background-color: #dcf8c6;
    float: right;
    color: #303030;
}

.received {
    background-color: #ffffff;
    float: left;
    color: #303030;
}

/* Dark Mode */
body.dark-mode {
    background-color: #0d1418;
    color: #d1d1d1;
    overflow: visible;
    max-width: 100vw;
    max-height: 100vh;
}

body.dark-mode #conversations,
body.dark-mode .tab-content

{
    background-color: #0d1418;
    color: #d1d1d1;
}



body.dark-mode #tabs {
    background-color: #1f2c34;
    border-right: 1px solid #3c4b53;
}

body.dark-mode .tab {
    color: #b1b1b1;
}

body.dark-mode .tab:hover {
    background-color: #2c3b42;
}

body.dark-mode .tab.active {
    background-color: #2a3942;
    color: #128c7e;
}

body.dark-mode .messages-container {
    background-color: #0b141a;
    border-color: #3c4b53;
    border:none;
}

body.dark-mode .sent {
    background-color: #056162;
    color: #d1d1d1;
}

body.dark-mode .received {
    background-color: #202c33;
    color: #d1d1d1;
}

/* Dark Mode Toggle Button */
#dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    background-color: #128c7e;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    z-index: 100;
}

#dark-mode-toggle:hover {
    background-color: #0a7261;
}

/* Mobile layout */
@media (max-width: 768px) {
    #tabs {
        width: 40%;
        height: 100vh;
        border-right: none;
        overflow-y: auto;
    }

    #conversations{
    max-width:60%;
    }

    /* Popup chat styles */
    .popup {
        display: none; /* Initially hidden */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
        z-index: 1000; /* On top of other content */
    }

    .popup-content {
        background-color: #fff;
        border-radius: 8px;
        width: 90%;
        max-width: 400px; /* Limit max width */
        margin: 50px auto; /* Center the popup */
        padding: 20px;
        position: relative; /* For positioning the close button */
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Shadow effect */
    }

    .close-button {
        position: absolute;
        top: 10px;
        right: 10px;
        cursor: pointer;
        font-size: 20px;
        color: #007bff; /* Customize color */
    }

    .popup-header {
        margin-bottom: 15px;
    }

    .messages-container {
        overflow-y: visible; /* Enables scrolling */
        border: none;
        padding: 5px;
        margin-bottom: 10px;
    }
}


