/* biosage_style_v2.css */

/* general styling for overall page layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body, html {
    height: 100%;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* styling for the header bar */
.header-bar {
    width: 100%;
    background-color: #3f71a2;
    color: white;
    padding: 15px 0;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header-title {
    font-size: 24px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

.dna-icon {
    width: 30px;
    height: 30px;
}

/* styling for the large dna icon shown 
at the start and the splash message */
.dna-splash {
    width: 300px;
    height: 300px;
}

.start-message {
    font-size: 24px;
    color: #333;
    margin-top: 20vh;
    text-align: center;
    opacity: 0.8;
}

/* flex container to hold results and chat side by side */
.content-container {
    display: flex;
    justify-content: center; /* center content when chat is closed */
    align-items: flex-start;
    width: 90vw; /* dynamically adjust to viewport width */
    max-width: 100vw;
    margin: 0 auto;
    transition: justify-content 0.4s ease;
    padding: 20px 10px; /* add padding for smaller screens */
    padding-top: 60px; /* adjust based on header height */
    margin-top: 15px;
}

/* results container - auto adjust the width when chat is open or closed */
.results-container {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: width 0.4s ease;
  }

/* shrink width and align to left when chat is open */
.content-container.with-chat {
    justify-content: flex-start; /* align items to left when chat is open */
}

.results-container.with-chat {
    width: calc(100% - 370px); /* adjust width dynamically based on chat width */
}

/* the search results column, where all the results are displayed - 70% Width */
.search-results {
    width: 100vw; /* set width to 70% of viewport width */
    max-width: 100%; /* ensure it does not exceed 70% of the container */
}

/* neta results column, where the gene info cards are displayed,
and also future protein, sequence info will be displayed - 30% Width */
.meta-results2 {
    width: 30vw; /* set width to 30% of viewport width */
    max-width: 30%; /* ensure it does not exceed 30% of the container */
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.search-results h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.result-card {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.result-card:hover {
    background-color: #f0f4ff;
}

/* floating chat bubble icon */
.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4285f4;
    color: white;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* what window positioning on the right side of the page */
.chat-window {
    position: fixed;
    z-index: 9999;
    width: 370px;
    height: 85vh;
    bottom: 80px;
    right: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    padding: 10px;
    background-color: #000000;
    color: white;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.chat-history {
    flex: 1;
    padding: 10px;
    background-color: #f1f1f1;
    overflow-y: auto;
}

.chat-input {
    display: flex;
    padding: 10px;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

.chat-input button {
    padding: 10px 20px;
    background-color: #3367d6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.chat-input button:hover {
    background-color: #2853a1;
}

/* styling for the tabbed content cards in the search results */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tab-button.active {
    background-color: #3367d6; /* active tab color */
}

.tab-button:hover {
    background-color: #2853a1;
}

/* tab content sections */
.tab-content {
    display: none;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content h3 {
    margin-top: 0;
}

/* get the browser window size for smaller screens */
@media (max-width: 768px) {
    .content-container {
    flex-direction: column; /* stack content vertically on smaller screens */
    align-items: center;
    }

    /* full width on small screens */
    .results-container.with-chat {
    width: 100%; 
    }

    /* full width on small screens */
    .chat-window {
    width: 100%; 
    margin-left: 0;
    }
}