@font-face {
    font-family: 'SBL Hebrew';

    src: local("SBL Hebrew"), local("SBLHebrew"),
         url(/src/fonts/SBLHebrew.woff2) format("woff2"),
         url(/src/fonts/SBLHebrew.woff) format("woff"),

         url(https://www.hebcal.com/i/SBLHebrew-1.56a.woff2) format("woff2"),
         url(https://www.hebcal.com/i/SBLHebrew-1.56a.woff) format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: fallback;
}

.trop-mapping-table {
    max-width: 100%;
    overflow-x: auto;
}

.trop-mapping-table tbody tr {
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid #dee2e6 !important;
}

.trop-mapping-table tbody tr.table-active {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

.trop-mapping-table tbody tr td {
    border: 1px solid #dee2e6 !important;
}

.hebrew-text {
    font-size: 1.5rem;
    font-family: "SBL Hebrew", serif;
}

/* Ensure inline span styles from HebrewTextColoring apply */
.hebrew-text span {
    display: inline;
}

/* Existing visualization styles */
.tree-node {
    margin-bottom: 0.5rem;
}
.tree-node .ms-3 {
    margin-right: 1rem; /* RTL adjustment */
}
.tree-node .form-check-input {
    margin-left: 0.5rem;
}

#graphcontainer {
    display: none;
    margin: 20px 0;
    min-height: 200px;
}

.form-check-input {
    border-color: lightgreen;
    margin-left: 10px;
}

#togglePrefsBtn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1050;
}

#togglePrefsBtn, #cog:hover {
    color: #000;
}

#togglePrefsBtn, #cog {
    left: 25px;
    position: fixed;
}

#togglePrefsBtn, #cog, #prefs {
    direction: ltr;
}

/* Menu container - positioned at top left */
.menu-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1050;
    direction: ltr;
}

/* Gear icon styling */
#menuToggle {
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

#menuToggle:hover {
    color: #0d6efd;
}

/* Dark theme support for gear icon */
:root[data-theme="dark"] #menuToggle {
    color: #f8f9fa;
}

:root[data-theme="dark"] #menuToggle:hover {
    color: #0dcaf0;
}

/* Menu dropdown - appears below the icon */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.menu-dropdown.show {
    display: block;
}

.menu-item {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    color: #333;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

/* Dark theme support for menu dropdown */
:root[data-theme="dark"] .menu-dropdown {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

:root[data-theme="dark"] .menu-item {
    color: #f8f9fa;
}

:root[data-theme="dark"] .menu-item:hover {
    background-color: #495057;
}

#buttonContainer {
    padding-right: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

#buttonContainer button {
    margin-bottom: 10px;
    margin-right: 10px;
    margin-top: 10px;
}

#searchContainer {
    min-height: 150px;
    position: relative;
}

#searchSeqContainer {
    width: calc(100% - 300px);
    height: 2rem;
    left: 40px;
    top: 3rem;
    position: absolute;
    text-align: center;
    font-family: "SBL Hebrew", serif;
}

#searchSeq {
    font-size: 2rem;
}

#currentSearch {
    padding-right: 15px;
    padding-left: 15px;
    font-family: "David", serif;
    font-size: 18px;
    text-align: center;
}

#occurrences {
    direction: ltr;
    font-size: 2rem;
}

.abcjs-container {
    max-width: 100%;
    overflow-x: auto;
}

.abcjs-note_selected {
    fill: #0a9ecc;
}

.abcjs-inline-audio {
    max-width: 770px;
    margin: 1em auto;
    height: 50px;
    background-color: #f4f4f4;
    padding: 0.5em;
    border-radius: 3px;
}

.abcjs-midi-progress-background {
    background-color: #424242;
}

.abcjs-midi-progress-indicator {
    background-color: #f4f4f4;
}

.abcjs-midi-clock {
    margin-right: 0.5em;
}

.abcjs-midi-reset {
    margin-right: 0.5em;
}

#vizcontainer svg {
    overflow: visible;
    margin-top: 8px;
    font-family: sans-serif;
}

.node {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.node:not(.disabled):hover rect.outerbox {
    stroke: #3167F4;
    stroke-width: 2px;
}

.node.disabled {
    cursor: not-allowed;
}

.node.disabled:hover rect.outerbox {
    stroke: #cccccc;
    stroke-width: 1px;
}

.node rect.outerbox {
    fill: #fff;
    stroke: #727272;
    stroke-width: 1px;
}

.node rect.histbar {
    fill: #a5a5a5;
}

.node.disabled rect.histbar {
    fill: #ccc;
}

.node text {
    stroke: none;
    fill: #000;
    font-size: 12px;
    direction: ltr;
}

.node text.tropchar {
    font-family: "SBL Hebrew";
    font-size: 0px;
}

.node text.name {
    font-family: "SBL Hebrew";
    font-size: 24px;
    direction: rtl;
}

.node:hover text,
.node.disabled:hover text {
    stroke: none;
    fill: #3167F4;
}

.node.disabled text {
    fill: #777;
    opacity: 0.7;
}

#graphcontainer .bar {
    fill: #555;
    stroke: none;
}

#graphcontainer .bar:hover {
    fill: #999;
    cursor: pointer;
}

#graphcontainer .tick line {
    stroke: #000;
}

#graphcontainer .tick text {
    font-size: 13px;
}

#graphcontainer .domain {
    fill: none;
    stroke: #000;
}

#graphcontainer rect.mytooltip {
    fill: rgba(40, 40, 40, 0.75);
}

#graphcontainer .mytooltip text {
    fill: #fff;
    font-size: 13px;
}

#graphcontainer .mytooltip text.location {
    font-weight: bold;
}

.graphcontrolbox {
    fill: none;
    stroke: #000;
    stroke-width: 1px;
}

.graphcontrolhiddenbox {
    fill: none;
    stroke: #888;
    stroke-width: 2px;
}

.details {
    font-family: "SBL Hebrew";
    font-size: 24px;
}

#graphcontainer {
    background-color: #f5f5f5;
    position: relative;
    overflow: visible !important;
}

#graphcontainer svg {
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

#graphcontainer .bar {
    transition: fill 0.3s ease;
}

#graphcontainer .axis text {
    font-family: "SBL Hebrew", serif;
    font-size: 16px;
    fill: #000;
}

#graphcontainer .tooltip {
    font-family: "SBL Hebrew", serif;
    font-size: 14px;
    pointer-events: none;
}

#graphcontainer rect.mytooltip {
    fill: rgba(40, 40, 40, 0.75);
}

#graphcontainer .mytooltip.text {
    fill: #fff;
    font-family: "SBL Hebrew", serif;
}

#graphcontainer .tooltips {
    pointer-events: none;
}

#graphcontainer .tick text {
    z-index: 2;
    position: relative;
}

#graphcontainer::after {
    content: '';
    display: block;
    height: 80px;
    width: 100%;
    position: absolute;
    bottom: -80px;
    left: 0;
}

.pasuktext {
    padding: 8px;
    vertical-align: top;
}

.pasuktext a {
    font-family: "SBL Hebrew";
    font-size: 20px;
    text-decoration: none;
}

.pasuktext a:hover {
    text-decoration: underline;
}

.pasuktext a[data-visited="true"] {
    color: #666;
}

.pasuknum {
    font-size: 16px;
    text-align: left;
    padding-left: 12px;
    padding-top: 8px;
}

.citation-card {
    transition: background-color 0.2s ease;
    border: 1px solid rgba(0,0,0,.125);
    margin: 4px;
}

.citation-card .card-body {
    padding: 0.75rem;
    font-family: "SBL Hebrew", serif;
    font-size: 1rem;
}

#citationsModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#citationsGrid {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

#tanachSectionCheckboxes .form-check {
    margin-bottom: 0.5rem;
}

#tanachSectionCheckboxes .ms-3 {
    margin-right: 1rem; /* RTL adjustment */
}

body {
    padding: 20px;
}

#searchInput {
    margin-bottom: 20px;
}

.table-container {
    overflow-x: auto;
}

#columnModal .modal-body {
    max-height: 400px;
    overflow-y: auto;
}

#columnModal .form-check {
    margin-bottom: 10px;
}