/* rather non specific styles */
html,
body,
main {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lb {
    color: red;
}

.rub {
    color: red;
}

.am {
    display: none;
}

.lb {
    display: none;
}

span.editorial_note {
    display: none;
}

.s_orig {
    display: none;
}

.sup_orig {
    display: none;
}

div {
    box-sizing: border-box;
}

/* Synoptic Text Viewer specific styles */
/* as you can see, you might have to adjust the styles/scopes for specific elements */
div {
    box-sizing: border-box;
}

div.synTexView_controls_wrapper {
    position: relative;
    display: inline-block;
    /* Ensure it fits the width of its content */
    margin-bottom: 1rem;
    margin-top: 2rem;
    margin-left: 0.3rem;
}

button.synTexView_controls_toggle {
    padding: 10px 20px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
    display: inline-block;
    user-select: none;
    position: relative;
    z-index: 101;
}

div.synTexView_controls {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
    padding: 10px;
    min-width: 200px;
}

div.synTexView_controls.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
    padding: 10px;
    min-width: 200px;
}

div.synTexView_controls.open div {
    padding: 0.5rem;
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* Align buttons to the left */
    align-items: center;
}

div.synTexView_controls.open div button {
    background: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, border 0.2s;
    display: inline-block;
    user-select: none;
    position: relative;
}

div.synTexView_controls.open div button:hover,
div.synTexView_controls.open div button:focus {
    background-color: #bbb;
    outline: none;
}

#synTexView-witness-container {
    margin: .3rem;
    display: inline-flex;
    flex-direction: row;
    /* Arrange children in a row */
    flex-wrap: nowrap;
    /* Prevent wrapping */
    gap: 0.75rem;
    /* Add spacing between children */
    padding-bottom: 1rem;
    align-items: stretch;
    white-space: nowrap;
    /* Prevent children from wrapping */
    width: auto;
    /* Ensure the width adjusts to fit children */
    height: 100%;
    overflow-x: auto;
    overflow-y: auto;
    height: 100% !
}

.synTexView-witness {
    position: relative;
    flex: 1 1 auto;
    min-width: 30rem;
    max-width: fit-content;
    width: auto;
    font-size: 1em;
    text-align: left;
    font-family: Garamond, serif;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
}

.synTexView-witness h4 {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.synTexView-witness.synTexView-scroll-individual {
    height: 100%;
}

.synTexView-witness.synTexView-scroll-global {
    height: fit-content;
}

.synTexView-controls-container {
    height: 2.5rem;
}

.synTexView-text-content.synTexView-scroll-individual {
    overflow-y: auto;
    height: calc(100% - 2rem);
    padding-top: 10rem;
    padding-bottom: 20rem;
    box-sizing: border-box;
}

.synTexView-text-content.synTexView-scroll-global {
    height: fit-content;
}

#columnControls {
    margin: 20px 0;
    display: flex;
    gap: 0;
}

.controlls-container {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping to the next row */
    justify-content: space-between;
    /* Space between dropdown and button */
    align-items: center;
    /* Align items vertically */
    margin-bottom: 10px;
    position: sticky;
    /* Make it sticky */
    top: 0;
    /* Stick to the top */
    z-index: 20;
    /* Ensure it stays above other elements */
    padding-top: .5rem;
}

.controlls-container .synTexView-remove-column {
    margin-left: auto;
    /* Push the button to the right */
}

/* .synTexView-col-switch {
    padding: 5px 20px 5px 10px;
    font-size: 14px;
} */

/* .synTexView-column-button {
    padding: 5px 20px 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #999;
    border-radius: 3px;
    margin: 0;
    text-align: center;
    width: 10px;
} */

.synTexView-init {
    color: red;
    font-size: 120%;
}

span.synTexView-line {
    display: block;
    width: 100%;
    white-space: normal !important;

}

span.synTexView-line:hover {
    background-color: lightblue;
}

.synTexView-linenr-global {
    font-size: 0.8em;
    color: gray;
}

.synTexView-linenr-local {
    font-size: 0.8em;
    color: gray;
}

span.synTexView-highlight {
    background-color: rgb(206, 206, 206);
    transition: background-color 0.3s ease;
}

span.synTexView-highlight.synTexView-neighbor {
    background-color: inherit;
    border-bottom: rgb(206, 206, 206) solid 4px;
    margin-bottom: 1rem;
    transition: border-bottom 0.3s ease;
    width: 100%;
    display: inline-block;
}

.synTexView-last .synTexView-linenr-global {
    color: orange;
}

/* .line-synTexView-highlight {
    background-color: rgba(255, 204, 153, 0.4);
} */

button.synTexView-remove-column {
    position: sticky;
    background-color: white;
    color: grey;
    border: none;
    width: 1rem;
    height: 2rem;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1rem;
    text-align: center;
}

.synTexView-hidden {
    display: none !important;
}

.synTexView-text-content:focus {
    outline: 2px solid grey !important;
}

.synTexView-line:focus {
    outline: 2px solid grey !important;
}

.synTexView-url-copy-notification {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(60,60,60,0.95);
    color: #fff;
    padding: 0.75em 2em;
    /* border-radius: 0 0 8px 8px; */
    border-radius: 8px;
    font-size: 1.1em;
    z-index: 9999;
    pointer-events: none; /* Prevent interaction */
    user-select: none;    /* Prevent selection */
    opacity: 1;
    transition: opacity 2s;
}

@media (max-width: 800px) {
    .synTexView-text-content.synTexView-scroll-individual {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}