a:link {
    color: #000;
}

/* unvisited link */
a:visited {
    color: #000;
}

/* visited link */
a:hover {
    color: #000;
}

/* mouse over link */
a:active {
    color: #000;
}

/* Style the navigation bar container */
.navbar {
    background-color: #d0d0d0;
    /* Dark gray background */
    overflow: hidden;
    /* Ensures the background contains the floated links */
    width: 100%;
    /* Make the bar span the full width */
    top: 0;
    /* Position it at the top */
    left: 0;
}

/* Style the links inside the navigation bar */
.navbar a {
    float: left;
    /* Align items horizontally */
    display: block;
    /* Make the entire area clickable */
    color: black;
    /* Text color */
    text-align: center;
    /* Center the text */
    padding: 14px 20px;
    /* Add some padding (top/bottom and left/right) */
    text-decoration: none;
    /* Remove the default underline from links */
}

/* Change color on hover for interactivity */
.navbar a:hover {
    background-color: #555;
    /* A slightly lighter gray on hover */
    color: white;
}


h1,
h2,
h3 {
    text-align: center;
}

#body {
    font-family: Arial;
    border-width: 2px;
    clear: both;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;
    min-width: 1024px;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

#section2 {
    font-family: Arial;
    border-width: 2px;
    clear: both;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 10px;
    min-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

#log_area {
    position: fixed;
    top: 60px;
    left: 20px;
    width: 500px;
    height: 300px;
    min-width: 250px;
    min-height: 120px;
    box-sizing: border-box;
    padding: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    border: 1px solid #b0bec5;
    border-radius: 8px;
    resize: both;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, sans-serif;
    transition: box-shadow 0.2s ease;
}

#log_area:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
    margin-bottom: 0;
}

.log-header strong {
    font-size: 13px;
    font-weight: 700;
    color: #1565c0;
}

.log-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.log-actions button {
    background: #ffffff;
    border: 1px solid #90caf9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 3px 7px;
    color: #1976d2;
    font-weight: 500;
    transition: background-color 0.15s;
}

.log-actions button:hover {
    background: #bbdefb;
}

#button_minimize_log {
    font-weight: bold;
    min-width: 22px;
}

/* Make sure text area inside fills remaining space and looks clean */
#log_area textarea {
    width: calc(100% - 16px);
    margin: 8px;
    flex-grow: 1;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    resize: none;
    box-sizing: border-box;
    background-color: #fafafa;
    color: #263238;
    padding: 8px;
    min-height: 0 !important;
    min-width: 0 !important;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    /* Ensure container takes full width */
    justify-content: center;
    align-items: center;
    flex-direction: row;/
}

/* Media query for smaller screens */
@media (max-width: 1500px) {
    .flex-container {
        flex-direction: column;
        /* Change to column layout on small screens */
    }
}

div.tooltip {
    position: absolute;
    text-align: center;
    /* width: 120px;
            height: 20px; */
    padding: 2px;
    font: 16px sans-serif;
    background: lightgray;
    border: 0px;
    border-radius: 0.5rem;
    pointer-events: none;
    z-index: 100;
    /* Place the tooltip above all other elements */
}

.drop-area {
    border: 2px dashed #ccc !important;
    border-radius: 20px;
    font-family: sans-serif;
    margin: 10px auto;
    padding: 10px;
}

.drop-area-neighbor {
    border: 2px solid #ccc;
    border-radius: 10px;
    font-family: sans-serif;
    margin: 10px auto;
    padding: 10px;
}

div.input-section {
    display: flex;
    gap: 5px;
    flex-direction: column;
    justify-content: start;
    align-items: left;
    margin: 10px;
    padding: 10px;
    border: 1px solid #4f2bcf;
    border-radius: 0.5rem;
}

div.resizable {
    border: 2px solid #40375f;
    border-radius: 0.5rem;
    padding: 20px;
    resize: both;
    overflow: hidden;
    min-width: 400px;
    min-height: 300px;
}

div.scroll {
    overflow: scroll;
}

div.resizable_stack {
    border: 2px solid #40375f;
    border-radius: 0.5rem;
    padding: 20px;
    resize: none;
    overflow: hidden;
}

div.resizable_stack_invisible {
    border: none;
    border-radius: 0.5rem;
    padding: 20px;
    resize: none;
    overflow: hidden;
}

.rotate90 {
    transform: rotate(90deg);
}

.information {
    font-weight: bold;
    color: #220ddc;
}

ol>li {
    margin-top: 1em;
}

button {
    margin: 5px;
}

/* span.information {
            font-weight: bold;
            color: #220ddc;
            display: inline-block;
            width: 6em;
        } */

textarea {
    resize: auto;
    min-height: 300px;
    min-width: 300px;
}

.fieldset-auto-width {
    display: inline-block;
}

#contour_message {
    position: fixed;
    font-size: x-large;
    left: 50px;
    top: 50px;
    background-color: #e6f10d;
    color: blue;
    opacity: 0.6;
    z-index: 2000;
}

#webassembly_message {
    position: fixed;
    font-size: x-large;
    left: 50px;
    top: 100px;
    background-color: #e6f10d;
    color: blue;
    opacity: 0.6;
    z-index: 2000;
}


div.input-section label,
div.input-section select {
    width: fit-content;
    display: inline;
}

.popup_div {
    display: none;
    position: fixed;
    top: 0px;
    left: 0px;
    background-color: rgb(208, 206, 206);
    z-index: 1001;
    opacity: 0.80;
}

table {
    border-collapse: collapse;
    border: 2px solid rgb(140 140 140);
    font-family: sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
}

caption {
    caption-side: bottom;
    padding: 10px;
    font-weight: bold;
}

thead,
tfoot {
    background-color: rgb(228 240 245);
}

div.resizable.scroll>table>thead {
    position: sticky;
    top: 30px;
    z-index: 1000;
}

.header_sticky {
    position: sticky;
    top: 0px;
    background-color: rgb(185, 188, 111);
    z-index: 1000;
}

th,
td {
    border: 1px solid rgb(160 160 160);
    padding: 8px 10px;
}

th[role=columnheader]:not(.no-sort) {
    cursor: pointer;
}

th[role=columnheader]:not(.no-sort):after {
    content: '';
    float: right;
    margin-top: 7px;
    border-width: 0 4px 4px;
    border-style: solid;
    border-color: #404040 transparent;
    visibility: hidden;
    opacity: 0;
    -ms-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

th[aria-sort=ascending]:not(.no-sort):after {
    border-bottom: none;
    border-width: 4px 4px 0;
}

th[aria-sort]:not(.no-sort):after {
    visibility: visible;
    opacity: 0.4;
}

th[role=columnheader]:not(.no-sort):hover:after {
    visibility: visible;
    opacity: 1;
}

#peak_table tbody td:first-child {
    cursor: pointer;
    font-weight: bold;
}

#peak_table tbody td:first-child:hover {
    background-color: #e2f0fb;
}

tr.selected_peak_row,
tr.selected_peak_row td {
    background-color: lightblue !important;
}

tr.selected_peak_row td:first-child:hover {
    background-color: #9eccf0 !important;
}

/* Multi-dip row highlighting for CEST / Pseudo-3D profiles */
tr.multi_peak_row,
tr.multi_peak_row td {
    background-color: #ffe0b2 !important;
}

tr.multi_peak_row:hover,
tr.multi_peak_row:hover td {
    background-color: #ffd199 !important;
}

#peak_table tbody tr.multi_peak_row td:first-child:hover {
    background-color: #ffb74d !important;
}

tr.multi_peak_row.selected_peak_row,
tr.multi_peak_row.selected_peak_row td {
    background-color: lightblue !important;
}

tr.multi_peak_row.selected_peak_row td:first-child:hover {
    background-color: #9eccf0 !important;
}

/* Tutorial Styles */
.tutorial-highlight {
    outline: 4px solid #ff4500 !important;
    box-shadow: 0 0 10px #ff4500;
    transition: all 0.3s ease-in-out;
    z-index: 10000;
    position: relative;
    background-color: rgba(255, 69, 0, 0.1);
}

.tutorial-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 10001;
    max-width: 250px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tutorial-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Compact minimized spectrum for 2D spectral list */
#spectra_list_ol > li.spectrum-minimized-compact,
ol#spectra_list_ol > li.spectrum-minimized-compact,
li.spectrum-minimized-compact {
    display: inline-block !important;
    list-style: none !important;
    list-style-type: none !important;
    counter-increment: list-item;
    margin: 2px 2px !important;
    padding: 0 !important;
    vertical-align: middle;
}

li.spectrum-minimized-compact > div {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0 !important;
    line-height: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

li.spectrum-minimized-compact > div > *:not([id^="minimize-"]) {
    display: none !important;
}

li.spectrum-minimized-compact > div > button[id^="minimize-"] {
    display: inline-block !important;
    font-size: 13px !important;
    line-height: normal !important;
    margin: 2px 2px !important;
    padding: 2px 6px !important;
    min-width: 22px;
    height: 24px;
    cursor: pointer;
    vertical-align: middle;
}

/* Floating Pseudo-3D Peak Profile Window */
.floating_profile_window {
    position: fixed;
    top: 90px;
    right: 30px;
    width: 780px;
    height: 360px;
    min-width: 480px;
    min-height: 240px;
    background: #ffffff;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
    transition: box-shadow 0.2s ease;
}

.floating_profile_window:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.floating_window_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.floating_window_title {
    font-size: 13px;
    font-weight: 700;
    color: #1565c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating_window_actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.floating_window_actions button {
    background: #ffffff;
    border: 1px solid #90caf9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 3px 7px;
    color: #1976d2;
    transition: background-color 0.15s;
}

.floating_window_actions button:hover {
    background: #bbdefb;
}

#pseudo3d_profile_minimize_btn {
    font-weight: bold;
    min-width: 22px;
}

.floating_window_body {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#pseudo3d_profile_plot_container {
    width: 100%;
    height: 100%;
}

.pseudo3d-profile-tooltip {
    position: absolute;
    padding: 4px 8px;
    background: rgba(33, 33, 33, 0.85);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    z-index: 20;
    display: none;
    white-space: nowrap;
}

.profile-top-x-axis path,
.profile-top-x-axis line {
    stroke: #78909c;
}

.profile-top-x-axis text {
    fill: #455a64;
    font-size: 10px;
}

.profile-top-x-label {
    fill: #455a64;
    font-size: 11px;
    font-weight: bold;
}


