/* Charter ChordPro Rendering Styles */
/* Based on charter's actual styles.css */

/* Namespace all styles within preview panels */
.chordpro-preview-panel #charter-container,
.chordpro-show-preview #charter-container {
  position: relative;
  overflow: hidden;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 9pt;
}

.chordpro-preview-panel .charter-song-header,
.chordpro-show-preview .charter-song-header {
  background-color: #ffffff;
  overflow: visible;
  width: 100%;
}

.chordpro-preview-panel .charter-title-wrapper,
.chordpro-show-preview .charter-title-wrapper {
  line-height: 1.2;
  display: block;
  width: 100%;
  overflow: visible;
}

.chordpro-preview-panel .charter-title,
.chordpro-show-preview .charter-title {
  font-size: 1.5em;
  font-weight: bold;
  display: inline-block;
  white-space: normal;
  width: 75%;
}

.chordpro-preview-panel .charter-artist-wrapper,
.chordpro-show-preview .charter-artist-wrapper {
  font-size: 0.7em;
  display: block;
  width: 100%;
  overflow: visible;
}

.chordpro-preview-panel .charter-artist,
.chordpro-show-preview .charter-artist {
  white-space: normal;
  width: 73%;
  display: inline-block;
  box-sizing: border-box;
  padding-right: 15px;
}

.chordpro-preview-panel .charter-song-key-tempo-wrapper,
.chordpro-show-preview .charter-song-key-tempo-wrapper {
  font-size: 0.8em;
  font-weight: bold;
}

.chordpro-preview-panel .charter-song-key-tempo,
.chordpro-show-preview .charter-song-key-tempo {
  white-space: nowrap;
}

.chordpro-preview-panel .charter-song-body,
.chordpro-show-preview .charter-song-body {
  overflow: visible;
  margin: 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}

.chordpro-preview-panel .charter-section-wrapper,
.chordpro-show-preview .charter-section-wrapper {
  display: block;
  page-break-inside: avoid;
}

.chordpro-preview-panel .charter-section-title,
.chordpro-show-preview .charter-section-title {
  display: block;
  font-weight: bold;
  line-height: 2;
  text-transform: uppercase;
}

.chordpro-preview-panel .charter-song-line,
.chordpro-show-preview .charter-song-line {
  padding-left: 2em;
  display: inline-block;
  line-height: 1.1em;
  padding-top: 0.2em;
}

.chordpro-preview-panel .charter-chord-wrapper,
.chordpro-show-preview .charter-chord-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
}

.chordpro-preview-panel .charter-song-line .charter-chord-wrapper .charter-chord,
.chordpro-show-preview .charter-song-line .charter-chord-wrapper .charter-chord {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #000000;
  background-color: transparent;
  position: relative;
  font-weight: bold;
  white-space: nowrap;
  padding: 0 0.4em 0 0;
  float: left;
}

.chordpro-preview-panel .charter-chord-lyric,
.chordpro-show-preview .charter-chord-lyric {
  float: left;
  clear: both;
}

.chordpro-preview-panel .charter-direction-wrapper,
.chordpro-show-preview .charter-direction-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
}

.chordpro-preview-panel .charter-direction,
.chordpro-show-preview .charter-direction {
  color: #000000;
  background-color: transparent;
  position: relative;
  font-weight: normal;
  font-style: italic;
  white-space: nowrap;
  padding: 0;
  float: left;
}

/* Superscript for chord extensions (7, 9, sus, etc.) */
.chordpro-preview-panel .charter-chord sup,
.chordpro-show-preview .charter-chord sup {
  font-size: 0.75em;
  vertical-align: super;
}

/* ChordPro Modal Preview Styling */
.chordpro-modal-preview {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  max-height: 60vh;
  overflow-y: auto;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: #000000;
}

.chordpro-modal-preview #charter-container {
  max-width: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14pt;
}

/* Apply charter styles to modal preview */
.chordpro-modal-preview .charter-song-header {
  background-color: #ffffff;
  overflow: visible;
  width: 100%;
}

.chordpro-modal-preview .charter-title-wrapper {
  line-height: 1.2;
  display: block;
  width: 100%;
  overflow: visible;
}

.chordpro-modal-preview .charter-title {
  font-size: 1.5em;
  font-weight: bold;
  display: inline-block;
  white-space: normal;
  width: 75%;
}

.chordpro-modal-preview .charter-artist-wrapper {
  font-size: 0.7em;
  display: block;
  width: 100%;
  overflow: visible;
}

.chordpro-modal-preview .charter-artist {
  white-space: normal;
  width: 73%;
  display: inline-block;
  box-sizing: border-box;
  padding-right: 15px;
}

.chordpro-modal-preview .charter-song-key-tempo-wrapper {
  font-size: 0.8em;
  font-weight: bold;
}

.chordpro-modal-preview .charter-song-key-tempo {
  white-space: nowrap;
}

.chordpro-modal-preview .charter-song-body {
  overflow: visible;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.chordpro-modal-preview .charter-section-wrapper {
  display: block;
  page-break-inside: avoid;
}

.chordpro-modal-preview .charter-section-title {
  display: block;
  font-weight: bold;
  line-height: 2;
  text-transform: uppercase;
}

.chordpro-modal-preview .charter-song-line {
  padding-left: 2em;
  display: inline-block;
  line-height: 1.1em;
  padding-top: 0.2em;
}

.chordpro-modal-preview .charter-chord-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
}

.chordpro-modal-preview .charter-song-line .charter-chord-wrapper .charter-chord {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: #000000;
  background-color: transparent;
  position: relative;
  font-weight: bold;
  white-space: nowrap;
  padding: 0 0.4em 0 0;
  float: left;
}

.chordpro-modal-preview .charter-chord-lyric {
  float: left;
  clear: both;
}

.chordpro-modal-preview .charter-direction-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
}

.chordpro-modal-preview .charter-direction {
  color: #000000;
  background-color: transparent;
  position: relative;
  font-weight: normal;
  font-style: italic;
  white-space: nowrap;
  padding: 0;
  float: left;
}

.chordpro-modal-preview .charter-chord sup {
  font-size: 0.75em;
  vertical-align: super;
}

/* Mobile responsive fixes */
@media (max-width: 640px) {
  .chordpro-modal-preview {
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
  }

  .chordpro-modal-preview #charter-container {
    font-size: 12pt;
    max-width: 100%;
    overflow-x: hidden;
    padding-left: 0;
    padding-right: 0;
  }

  .chordpro-modal-preview .charter-song-line {
    padding-left: 0;
    padding-right: 0;
    display: block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .chordpro-modal-preview .charter-section-title {
    font-size: 0.9em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-left: 0;
  }

  .chordpro-modal-preview .charter-title {
    font-size: 1.2em;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .chordpro-modal-preview .charter-artist {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Keep content within card boundaries */
  .card-body .chordpro-modal-preview {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 70vh;
  }
}
/* ChordPro Editor Layout and Styling */

.chordpro-editor-container {
  width: 100%;
  margin: 20px 0;
}

/* Two-column layout for editor and preview */
.chordpro-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Textarea wrapper and styling */
.chordpro-textarea-wrapper {
  display: flex;
  flex-direction: column;
}

.chordpro-textarea-wrapper label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.chordpro-textarea-wrapper textarea {
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  min-height: 400px;
  background: #fff;
}

.chordpro-textarea-wrapper textarea:focus {
  outline: none;
  border-color: #5b9dd9;
  box-shadow: 0 0 0 1px #5b9dd9;
}

/* Preview wrapper and panel */
.chordpro-preview-wrapper {
  display: flex;
  flex-direction: column;
}

.chordpro-preview-wrapper h4 {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.chordpro-preview-panel {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.chordpro-preview-panel #charter-container {
  max-width: 800px;
  width: 100%;
}

.chordpro-preview-panel .placeholder-text {
  color: #999;
  font-style: italic;
  text-align: center;
  width: 100%;
}

/* Error display */
.chordpro-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 13px;
}

.chordpro-error.hidden {
  display: none;
}

/* Show page preview styling */
.chordpro-show-preview {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  min-height: 200px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  display: flex;
  align-items: flex-start;
}

.chordpro-show-preview #charter-container {
  max-width: 800px;
  width: 100%;
}

/* Responsive layout - stack on smaller screens */
@media (max-width: 1024px) {
  .chordpro-editor-layout {
    grid-template-columns: 1fr;
  }

  .chordpro-preview-panel {
    max-height: 400px;
  }
}

/* ActiveAdmin specific adjustments */
.active_admin .chordpro-editor-section {
  margin-top: 20px;
}

.active_admin .chordpro-editor-section fieldset {
  padding: 20px;
}
/* Dark Mode Support for Song Modals and Content */

/* Modal Close Button Dark Mode */
.modal-box .btn-circle.btn-ghost {
  color: hsl(var(--bc));
  background-color: hsl(var(--b3) / 0.5);
}

.modal-box .btn-circle.btn-ghost:hover {
  background-color: hsl(var(--b3));
}

/* ChordPro Modal Dark Mode */
.chordpro-modal-preview {
  background: hsl(var(--b1));
  color: hsl(var(--bc));
}

.chordpro-modal-preview .charter-song-header {
  background-color: transparent;
}

.chordpro-modal-preview .charter-song-line .charter-chord-wrapper .charter-chord {
  color: hsl(var(--p));
}

.chordpro-modal-preview .charter-direction {
  color: hsl(var(--bc) / 0.7);
}

/* Lyrics Content Dark Mode */
.collapse-content article.prose {
  color: hsl(var(--bc));
}

.collapse-content article.prose p {
  color: hsl(var(--bc));
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *





 */
