
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../../app/font/roboto-latin.woff2'); 
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url('../../app/font/roboto-500-latin.woff2'); 
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  src: url('../../app/font/Barlow-Condensed-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Luckiest Guy';
  font-style: normal;
  font-weight: 400;
  src: url('../../app/font/luckiest-guy-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Music';
  font-style: normal;
  font-weight: 400;
  src: url('../../app/font/noto-music-v19-latin_latin-ext_music-regular.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 100 900;
  src: url('../../app/font/roboto-slab-latin.woff2') format('woff2');
}

html, body {
  font-family: 'Roboto','Noto Music','Helvetica',sans-serif;
  font-size:1em;
  text-align: left;
  margin: 0;
  padding: 0;
  background: #eee;
}

/* wrapper around every select */
.select-wrap {
  display: inline-block;
  position: relative;
}

/* unified select styling */
.select-wrap select,
select {
  font-family: 'Roboto','Noto Music','Helvetica',sans-serif;
  font-size: 0.9em;
  font-weight: 400;
  margin: 3px 0;
  padding: 2px 28px 2px 6px; /* room for the pseudo arrow */
  background-color: #fff;
  color: black;
  border: 2px solid black;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1.5;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* show a consistent arrow using a pseudo element */
.select-wrap::after {
  content: "▾"; /* change to "▼", "⌄", > */
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: black;
  font-size: 0.95em;
}

/*focus visual similar to buttons */
.select-wrap select:focus {
  box-shadow: 0 0 0 0px rgba(0,0,0,0.08);
}

/* hide IE/Edge native arrow when using custom pseudo arrow */
select::-ms-expand { display: none; }


h1 {
  font-family: 'Roboto', 'Noto Music', 'Helvetica', sans-serif;
  font-size: 1.3em;
  padding: 0;
  margin: 0;
  color:black;
  
  /* Flexbox logic */
  display: flex;
  justify-content: space-between; /* Pushes items to far left and far right */
  align-items: center;            /* Centers them vertically */
}

.title-text {
  display: flex;
  align-items: center; /* centers vertically */
  overflow: hidden;    /* Keeps the container from expanding */
  flex: 1;             /* Allows it to take up available space */
}

.main-title {
  white-space: nowrap; 
  flex-shrink: 0;      
}

#filename-display {
  font-weight: normal; 
  font-size:1em; 
  margin-left: 8px; 
  color: #666;
  /* Truncation */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

#xfileMenu {
  background: white;
  border: 2px solid black;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 400;
  cursor: pointer;
  color: black;
  outline: none;
  padding: 1px 5px;
  /* Remove default arrow to look more like a menu */
  /*appearance: none; 
  -webkit-appearance: none;
  */
}

#hamburger {
  font-size: 1.3em;
  height: 100%;
  cursor: pointer;
  padding: 5px 5px 10px 5px;
  margin: 0;
  border: 0px;
  user-select: none; /* Prevents text selection highlighting on click */
}

#hamburger.open {
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

hr {
  border: none;
  border-top: 1px solid #666; /* Use #ccc for a light gray or #888 for dark */
  margin: 10px 0;
}

.logo{
  width: 30px;
  height: 30px;
  border-radius: 5px;
  margin-right: 8px;
  object-fit: cover; /* Ensures the image doesn't distort if the aspect ratio is off */
  display: inline-block; /* Useful if placing it next to text */
  vertical-align: middle;
}
  
.abcjs-chord{ 
  /* Chord Symbols */
  font-family: 'Roboto','Noto Music','Helvetica','Times','serif';
  font-size: 1.4em;
  font-weight: 500; /*100-900, 400 = normal 700 = Bold*/
  transform: translateY(.6em); /*move down towards the staves*/
} 

.abcjs-annotation{ 
  /* Chord Symbols */
  font-family: 'Roboto','Noto Music','Helvetica','Times','serif';
  font-size: 1em;
  font-weight: 400; /*100-900, 400 = normal 700 = Bold*/
  transform: translateY(.6em); /*move down towards the staves*/
} 

.abcjs-lyric {
  /*Lyrics below the staves*/
  font-family: 'Barlow Condensed', "Arial Narrow", "Helvetica Condensed", sans-serif;
  font-size: 0.9;
  font-weight: 400; 
  transform: translateY(-.2em); /*move down towards the staves*/
  /*
  letter-spacing: -.05em;
  font-stretch: ultra-condensed; extra-condensed; condensed; semi-condensed; normal; semi-expanded;etc of 50% 
  */  
}

.abcjs-title { 
  /* Song title */
  font-family: 'Roboto Slab','Noto Music','Helvetica','Times','serif' !important;
  font-size: 1.7em;
  font-weight: 400; /*100-900, 400 = normal 700 = Bold*/
  /*transform: translateY(.3em);*/  /*move down towards the staves*/ 
} 

#paper .abcjs-rest > path[data-name="scripts.coda"],
#paper .abcjs-rest > path[data-name="scripts.segno"] {
  transform: translateY(-1.2em);
  transform-box: fill-box;
  transform-origin: center;
}



.abcjs-inline-audio .abcjs-midi-clock {
  color: black;
  font-size: 0.9em;
}

.abcjs-inline-audio .abcjs-midi-progress-background {
  margin-left: 8px;
  margin-right: 8px;
  border: 2px solid white;
  min-height: 0;
}

.abcjs-inline-audio {
    padding-left: 0px;
    height: 12px;
}

.abcjs-inline-audio .abcjs-midi-progress-indicator {
  height: 18px;
  width: 10px;
  margin-left:-2px;
  margin-top:-2px;
}

.abcjs-btn {
  height:auto;
  width: 0.8em;
  height: 0.8em;
  border: 2px solid black;
  min-width: 1.2em;
}

button { 
  font-family: 'Roboto','Noto Music','Helvetica',sans-serif;
  font-size: 0.9em;
  min-width: 2em;
  min-height: 2em;
  margin: 0 3px; 
  padding: 0px 3px; 
  background-color: #fff;
  border: 2px solid black;
  border-radius: 5px;
}


#transposeVal { 
  font-weight:400; 
  margin:0 0px; 
  min-width: 1.5em;
  text-align: center;
}

/* Layout Container */
.main-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 10px 20px;
}

/* Left Column: Fills remaining space */
.editor-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px; 
  padding-bottom: 20px;
}

/* Right Column: Fixed Width */
#paper-wrapper {
  width: 500px; 
  width: 40%;
  max-width: 500px;
  min-width: 250px;
  flex-shrink: 0; /* Prevents the notation from shrinking */
  border: 1px solid gray;
  background: white;
  padding-bottom: 10px;
}


#abc {
  width: 100%;
  max-width: 100%;    /* prevent overflow */
  box-sizing: border-box;
  margin-bottom: 0px;
  padding: 8px;
  font-family: 'SF Mono','Menlo','Consolas', monospace;
  font-size: 0.8em;
  font-weight: 400; 
  line-height: 1.3em;
  color:black;
  background-color: #ddd;
  border: 1px solid #bbb;
  transition: all 0.2s ease; /* Makes the transition smooth */
  overflow: auto;  /* Allow scrolling if content exceeds height */
  resize: vertical;
}

#abc:focus {
  outline: none;
  border: 1px solid #000000; /* Define a soft border instead of a glow */
}

#abc.drag-over {
  border-color: #007bff; 
  background-color: #f0f8ff;
}

textarea::selection {
  background: #008080; /*  */
  color: #fff;        /* Text color when highlighted */
}

textarea:hover, #abc:hover{
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='5' height='20'><rect x='0' y='0' width='3' height='20' fill='red'/><rect x='3' y='0' width='1' height='20' fill='white'/></svg>") 1 8, auto;
}

#menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.2s ease-out, opacity 0.2s ease-out;
  background-color: rgb(170, 204, 204);
  z-index: 5;
  /* Add these to the base state so the flex layout exists but is hidden */
  display: flex;
  align-items: center;
  padding: 0px 10px; 
}

#menu.open {
  display: flex;         /* Align children horizontally */
  align-items: center;   /* Center vertically */
  gap: 10px;             /* Space between the elements */
  max-height: 200px;     
  opacity: 1;
  padding: 10px 10px; 
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.transpose-controls, 
.save-abc {
   /* Add vertical bars to the left elements */
  border-right: 1px solid #88aaaa; /* A slightly darker shade than your background */
  padding-right: 10px;            /* Space between text and the bar */
  margin-right: 0px;              /* Space after the bar before the next element */
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

#audio {
  flex-grow: 1;          
  background: transparent; 
  min-width: 100px;      
  align-items: center;
  border-right: 1px solid #88aaaa; /* A slightly darker shade than your background */
  padding-right: 10px;            /* Space between text and the bar */
  margin-right: 0px;              /* Space after the bar before the next element */
}

#infoIcon {
  font-weight: 900;
  cursor: pointer;
}

.transpose-controls, #audio {
  margin-bottom: 0px;
}

.highlight-note {
  fill: red !important;
  stroke: red !important;
}

.abcjs-highlight {
  fill: #ff0000 !important;
  stroke: #ff0000 !important;
}

.abcjs-highlight path {
  stroke: #ff0000 !important;
}

.abcjs-cursor {
  fill: red !important;
}


#errors{
  color:#ff0000;
  color: white;
  background-color: red;
  font-size: 0.9em;
  padding: 10px;
}

#errors:empty {
  display: none;
  padding: 0;
  margin: 0;
}

dialog {
  border: 1px solid #008080;
  background-color: rgb(170, 204, 204);

  border-radius: 0px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  padding: 20px 40px 20px 20px;
  max-width: 500px;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

.dialog-content h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.dialog-content p {
  margin: 10px 0;
  line-height: 1.5;
}

#dialogLinks {
  margin: 15px 0;
}

#dialogLinks a {
  display: inline-block;
  color: #0066cc;
  text-decoration: none;
  margin-right: 10px;
}

#dialogLinks a:hover {
  text-decoration: underline;
}

#dialogCloseBtn {
  background-color: #008080;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  outline: none;
}

#dialogCloseBtn:hover {
  background-color: #006edb;
}

#dialogCloseBtn:focus {
  outline: none;
}

#dialogCloseBtn:active {
  outline: none;
}

