/* CSS Reset to override browser defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Core layout - Fix margin issues */
body {
  margin: 0 !important; /* Use !important to override user agent stylesheet */
  padding: 0;
  height: 100vh;
  font-family: "Lucida Bright", Georgia;
  overflow-x: scroll; /* Prevent horizontal scrolling */
}

/* Main container */
.wrapper {
  padding: 10px 20px; /* Reduced top/bottom padding */
  height: calc(100vh - 100px); /* Adjust for header height */
  margin-left: 190px; /* Match sidebar width */
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

#footer {
  /*background-color: #131516);*/
  font-size: 10px;
  position: relative;
  z-index: 0;
  /*padding-top: 10px; */
  margin-top: auto;
  /*top:815px;*/
  width: 85%;
  margin-top: 20px;
  padding-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Content areas */
.content {
  display: grid;
  height: 100%;
  width: calc(100% - 40px);
}

.div1 {
  grid-area: 1 / 1 / 2 / 16;
  width: 100%;
  min-width: 900px;
  height: 100%;
  min-height: 70px;
  overflow-y: hidden;
  justify-content: center;
  align-content: center;
  text-align: center;
  /*margin-bottom: 20px;*/
}

.div2 {
  grid-area: 9 / 1 / 10 / 16;
  height: 100%;
  min-height: 70px;
  /*margin-bottom: 20px;*/
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.div3 {
  grid-area: 2 / 1 / 9 / 16;
  display: flex;
  overflow-y: hidden;
  gap: 20px;
  /*height: calc(100% - 140px);*/
}

/* Tab styling improvements */
.tab {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Increased gap between tabs */
  border-bottom: 1px solid #ccc;
  background-color: #f1f1f1;
  padding: 10px;
  width: 100%;
}

.tablinks {
  background-color: #e9e9e9;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  padding: 12px 20px;
  transition: 0.3s;
  font-size: 14px;
  font-weight: bold;
  min-width: 120px;
  text-align: center;
}

.tablinks:hover {
  background-color: #ddd;
}

.tablinks.active {
  background-color: #fff;
  border-bottom: 1px solid white;
  border-top: 3px solid #0066cc;
}

/* Remove existing h3 styling to avoid conflict */
.tablinks h3 {
  margin: 0;
  font-size: 1em;
}

.filters {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  min-width: 270px; /* Slightly less than container to account for padding */
  box-sizing: border-box;
}

#met_pattern {
  margin-bottom: 20px;
}

/*#button.meter-markings {
  width: 20 px;
}*/

/* Statistics section */
.tab-statistics {
  flex: 1;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.statistics {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  width: 100%;
  box-sizing: border-box;
}

/* DataTables adjustments */
.my_lists {
  margin-bottom: 20px;
}

.dataTables_wrapper {
  padding: 10px;
}

.dataTables_scroll {
  margin-bottom: 10px;
}

#table_line_text {
  font: 18px sans-serif;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.center {
  text-align: center;
  margin: 10px 0;
}

/* Button styles - preserve DataTables button functionality */
.dt-buttons {
  margin-bottom: 10px;
}

.dt-button {
  margin-right: 5px;
}

/* Basic table styling */
.display {
  width: 100% !important;
  margin-bottom: 10px;
}

/* Links */
a {
  color: #00cc66;
  text-decoration: none;
}

.csv_link {
  color: #0066cc;
}

/* Sidenav positioning */
.sidenav {
  height: 100%;
  width: 190px; /* Match your sidebar width */
  /*position: fixed;*/
  width: 190px;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: #fff;
  overflow-x: hidden;
  overflow-y: hidden;
  /*padding-top: 20px;*/
}

/* Filter section - fix contradicting values */
.tab-filters {
  width: 300px;
  min-width: 300px;
  max-width: 300px; /* Match the min-width */
  margin-right: 10px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  overflow-y: hidden;
  flex-shrink: 0;
}

/* Ensure content stays beside sidebar */
.content {
  height: 100%;
  width: calc(100% - 40px);
}

/*.div3 {
  display: flex;
  gap: 20px;
  height: calc(100% - 140px);
}*/

/* Additional layout helpers */
/*.filters {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  min-width: 220px; // Slightly less than container to account for padding
  box-sizing: border-box;
}*/

.spacer {
  display: inline-block;
  width: 1em;
}

/* Header positioning */
.header {
  padding-left: 210px;
}

/* All Lines specific adjustments */
#all_lines {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

#showScansion{
  /*margin-top: -45px;
  margin-left: 35px;
  position:absolute;*/
  height:32px;
  width:100px;
  background-color: white;
  color: var(--darkreader-neutral-text);
  padding: 3px;
  border-radius: 3px;
  font-size: 11px;
  font-family: "Lucida Bright";
  opacity:100%;
  z-index:0;
}
	
#hideScansion {
  margin-top: -45px;
  margin-left: 35px;
  position:absolute;
  height:32px;
  width:100px;
  background-color: white;
  color: var(--darkreader-neutral-text);
  padding: 3px;
  border-radius: 3px;
  font-size: 11px;
  font-family: "Lucida Bright";
  opacity:0%;
  z-index:0;
}

.scansion { 
  display: none;
}

.showScan .scansion {
  display: block; 
}

seg[type="metron"].showScan {
  display: inline-block;
  border-right: 1px solid black;
}

seg[ana="long"].showScan {
  display: inline-block;
  position: relative;
}

seg[ana="long"].showScan .longbg {
  position: absolute;
  height: 100%;
  width: 100%;
  background: url(../long.png);
  background-repeat: no-repeat;
  background-position-y: 5px;
  background-position-x: 33%;
  background-size: 11px;
}

.dark-mode seg[ana="long"].showScan .longbg {
  position: absolute;
  height: 100%;
  width: 100%;
  background: url(../long.png);
  background-repeat: no-repeat;
  color: var(--darkreader-neutral-text);
  background-position-y: 5px;
  background-position-x: 33%;
  background-size: 11px;
}

seg[ana="short"].showScan {
  position: relative;
  display: inline-block;
  padding-top: 0px;
}

seg[ana="short"].showScan .shortbg {
  position: absolute;
  height: 100%;
  width: 100%;
  display: inline-block;
  background: url(../short.png);
  background-repeat: no-repeat;
  background-size: 11px;
  background-position-x: 33%;
}

seg[ana="unknown"].showScan {
  display: inline-block;
  background: url(../x.png);
  background-repeat: no-repeat;
  background-size: 15px;
  background-position-y: -4px;
  background-position-x: 90%;
  overflow: visible;
}

seg[ana="shortn"].showScan {
  display: inline-block;
  padding-top: -5px;
  background: url(../brevis.png);
  background-repeat: no-repeat;
  background-size: 9px;
  background-position-y: 0px;
  background-position-x: 33%;
}

milestone[unit="period"].showScan {
  display: inline-block;
  width: 6px;
  height: 20px;
  padding-top: 0px;
  background: url(../period.png);
  background-repeat: no-repeat;
  background-size: 23px;
  background-position-x: 70%;
  padding-left: 13px;
  font-size: 11px;
}

.caesura.showScan {
  display: inline-block;
  height: 1.3em;
  width: 15px;
  background: url(../caesura.png);
  background-repeat: no-repeat;
  background-size: 15px;
  background-position-y: 0px;
  overflow: show;
}

milestone[unit="synapheia"].showScan {
  display: inline-block;
  height: 22px;
  width: 20px;
  background: url(../synapheia.png);
  background-repeat: no-repeat;
  background-size: 23px;
  background-position-x: 70%;
  background-position-y: 90%;
  padding-left: 13px;
  font-size: 11px;
}
