

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: rgb(255, 252, 244);
  overflow-x: hidden;
}

header {
  text-align: center;
  background-color: #f8f8f8;
  padding: 15px;
  border-bottom: 1px solid #ccc;
}

/* Styles for the top image container with background */
      .top-image-container {
        max-width: 100%;
        /* Set width to 100% to fill the parent */
        height: 390px;
        /* Set height to 390px */
        background: url("../Nkarner/parchment.jpg") center/cover no-repeat;
        /* Set background image */
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
      }
      /* Top image */
      .top-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        /* Ensure the image is contained within the specified area */
      }
      
nav {
  background-color: #ddd;
  padding: 10px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
}

nav li {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

nav li:hover {
  background-color: darkgrey;
}

.main-content {
  display: flex;
  gap: 20px;
  padding: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar {
  flex: 0 1 clamp(180px, 13vw, 220px);
  width: auto;
  min-width: 160px;
  background-color: #f4f4f4;
  padding: 10px;
  border: 1px solid #ccc;
  margin-right: 0;
}

.main-content.is-graph-open .sidebar {
  flex-basis: clamp(160px, 10vw, 190px);
}

#fake-section{
  flex: 1 1 auto;
  min-width: 0;
  min-height: 58px;
  background-color: #eaeaea;
  border: 1px solid #ccc;
  padding: 10px;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
}

#graph-section {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  background-color: #eaeaea;
  border: 1px solid #ccc;
  padding: 8px;
  white-space: nowrap;
  position: relative;
  display: none;
  overflow: hidden;
}

#myCanvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: min(52.5vh, 525px);
  min-height: 400px;
  background-color: #fff;
  border: 1px solid #ccc;
  margin: 0 auto;
  cursor: default;
}

.graph-placeholder {
  width: 100%;
  padding: 10px 12px;
  background-color: #fff;
  border: 1px dashed #bbb;
  color: #555;
  font-size: 14px;
}

.overview-container {
  margin-top: 8px;
  padding: 8px;
  max-width: 100%;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow-x: auto;
}

#overviewCanvas {
  display: block;
  width: auto;
  min-width: 1024px;
  height: 150px;
  background-color: #fff;
  border: 1px solid #ccc;
}

.overview-header {
  margin-bottom: 6px;
  font-weight: bold;
  color: #333;
}

#overviewCanvas {
  width: 100%;
  height: 150px;
  background-color: #fff;
  border: 1px solid #ccc;
}

#bottom-content {
  display: flex;
  align-items: stretch;
  padding: 20px;
  min-height: 300px;
  max-height: 800px;
  background-color: #f9f9f9;
}

#text-area {
  display: flex;
  width: 80%;
  height: 800px;
  overflow-y: auto;
  flex: 3;
  gap: 20px; /* Spacing between the 2 inner divs */
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
}

#armenianText, #englishText {
  flex: 1; /* Each section takes up equal width */
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

#armenianText h2, #englishText h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
}

#armenianText p, #englishText p {
  line-height: 1.6;
  font-size: 16px;
}


#index-panel {
  flex: 1;  /* Adjust relative to #text-area */
  width: 20%;
  height: 100%;
  min-width: 140px;
  padding: 0px 10px 0px 10px;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  max-height: 800px;
  overflow-y: auto;
}

.year-box {
  padding: 10px;
  margin-bottom: 5px;
  background-color: #eee;
  cursor: pointer;
}

.year-box:hover {
  background-color: darkgrey;
}

canvas {
      border: 1px solid black;
      background-color: #f9f9f9;
  }


/* toggle canvas button */
.toggle { 
  position: relative;
  display: inline-block;
  flex: 0 0 50px;
  margin-top: 0.5rem;
  width: 50px;
  height: 26px;
  background-color: hsl(0, 0%, 85%);
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.25s ease-in;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.25s ease-out;
}
#cb-toggle:checked + .toggle {
  background-color: hsl(102, 58%, 39%);
}
#cb-toggle:checked + .toggle::after {
  transform: translateX(24px);
}
.hide-me {
  opacity: 0;
  height: 0;
  width: 0;
}

.tag-toggle-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.tag-toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  line-height: 1.15;
  cursor: pointer;
}

.tag-toggle-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--tag-color);
}

.tag-toggle-row span {
  border-left: 4px solid var(--tag-color);
  padding-left: 5px;
}

.tag-color-persons {
  --tag-color: #2f73b8;
}

.tag-color-places {
  --tag-color: #d65a3a;
}

.tag-color-animals {
  --tag-color: #2f8f5b;
}

.tag-color-dates {
  --tag-color: #b9830d;
}

.tag-color-references {
  --tag-color: #7a4bc2;
}

.tag-color-footnotes {
  --tag-color: #667085;
}

.reader-tag-highlight {
  padding: 0 3px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reader-status {
  margin-top: 8px;
  padding: 8px;
  border-left: 4px solid #2f73b8;
  background: #eef5fc;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.35;
}

.reader-status[hidden] {
  display: none;
}

.reader-status.is-warning {
  border-left-color: #b9830d;
  background: #fff7e0;
}

.reader-status.is-error {
  border-left-color: #d65a3a;
  background: #fff0eb;
}

.graph-toggle-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.graph-control-buttons {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.graph-control-button {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid #aaa;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.graph-control-button:hover,
.graph-control-button:focus-visible {
  background: #ececec;
}

.year-box.is-active {
  background-color: #d7e9fb;
  outline: 2px solid #2f73b8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.toggle:focus-visible,
.year-box:focus-visible {
  outline: 3px solid #2f73b8;
  outline-offset: 2px;
}

#cb-toggle:focus-visible + .toggle {
  outline: 3px solid #2f73b8;
  outline-offset: 2px;
}

.Manuscript_Read_,
.download-link,
.download-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 38px;
  margin: 14px 14px 0 0;
  padding: 8px 14px;
  border: 1px solid #8f6f3a;
  border-radius: 4px;
  background: #8f6f3a;
  color: #fff;
  font: 700 14px/1 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.Manuscript_Read_:hover,
.download-link:hover,
.download-link:visited:hover,
.download-link:focus:hover {
  background: #6f4b8b;
  border-color: #6f4b8b;
  color: #fff;
  transform: translateY(-1px);
}

.download-link:visited,
.download-link:focus,
.download-link:active {
  color: #fff;
  background: #8f6f3a;
  border-color: #8f6f3a;
}

.download-missing {
  background: #ece7dc;
  border-color: #d4c7ad;
  color: #6d6250;
  cursor: not-allowed;
}

.Manuscript_Box h3 {
  margin-bottom: 12px;
}
