/**
 * Freetar - Composition Workspace & Sections Styling
 * Fully responsive for Mobile, Tablet, Laptop, and Desktop
 */

/* COMPOSITION WORKSPACE OUTER CONTAINER */
.composition-workspace-card {
  position: relative;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-block);
  padding: 1.5rem 0.85rem 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Header Tag Ribbon */
.workspace-top-banner {
  background: var(--color-yellow);
  border: var(--border-thick);
  border-radius: var(--radius-md);
  box-shadow: 2px 2px 0px #000;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.workspace-desc-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.75rem, 2vw, 0.82rem);
  color: #000000;
  flex: 1;
}

.workspace-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workspace-banner-btn {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  background: #ffffff;
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0px #000;
  padding: 0.35rem 0.75rem;
  min-height: 34px;
  cursor: pointer;
  transition: all 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-banner-btn:hover {
  transform: translateY(-1px);
}

.workspace-banner-btn.btn-add-sec {
  background: var(--color-red);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.65rem;
}

/* SECTIONS ACCORDION STACK */
.sections-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Section Card */
.song-section-box {
  background: #ffffff;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-block);
  overflow: hidden;
}

/* Section Colored Header Band */
.section-colored-header {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: var(--border-thick);
  user-select: none;
  cursor: pointer;
}

.song-section-box.color-blue .section-colored-header   { background: var(--color-blue); color: #fff; }
.song-section-box.color-red .section-colored-header    { background: var(--color-red); color: #fff; }
.song-section-box.color-yellow .section-colored-header { background: var(--color-yellow); color: #000; }
.song-section-box.color-green .section-colored-header  { background: var(--color-green); color: #000; }
.song-section-box.color-purple .section-colored-header { background: var(--color-purple); color: #fff; }

.section-header-title-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.section-collapse-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: var(--border-medium);
  box-shadow: 1px 1px 0px #000;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-titles-vertical {
  display: flex;
  flex-direction: column;
}

.section-main-heading {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

.section-subtext {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
}

.section-btn-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.section-pill-btn {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.75rem;
  background: #ffffff;
  color: #000000;
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 1.5px 1.5px 0px #000;
  padding: 0.25rem 0.65rem;
  min-height: 30px;
  cursor: pointer;
  transition: all 0.1s;
}

.section-pill-btn:hover {
  transform: translateY(-1px);
}

/* Section Body */
.section-collapsible-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #ffffff;
}

/* Section Toolbar Row */
.section-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1.5px solid #ececec;
  padding-bottom: 0.65rem;
}

.section-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1;
}

@media (max-width: 768px) {
  .section-toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }
}

.add-detected-pill-btn {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  background: var(--color-blue);
  color: #ffffff;
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 1.5px 1.5px 0px #000;
  padding: 0.35rem 0.85rem;
  min-height: 36px;
  cursor: pointer;
  transition: all 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.song-section-box.color-red .add-detected-pill-btn    { background: var(--color-red); }
.song-section-box.color-yellow .add-detected-pill-btn { background: var(--color-yellow); color: #000; }
.song-section-box.color-green .add-detected-pill-btn  { background: var(--color-green); color: #000; }

.add-detected-pill-btn:hover {
  transform: translateY(-1px);
}

.manual-input-box {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  background: #ffffff;
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  outline: none;
  min-height: 36px;
  min-width: 170px;
}

.manual-add-btn {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  background: #ffffff;
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 1.5px 1.5px 0px #000;
  padding: 0.35rem 0.85rem;
  min-height: 36px;
  cursor: pointer;
  transition: all 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.manual-add-btn:hover {
  background: var(--color-yellow);
}

.section-appends-hint {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: #555555;
}

/* Chords Row */
.section-chords-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.65rem;
  min-height: 80px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.empty-flow-notice {
  font-size: 0.82rem;
  font-weight: 700;
  color: #888888;
  font-style: italic;
}

/* Authentic Chord Tile Card */
.comic-chord-card {
  position: relative;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0px #000000;
  width: 78px;
  height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.35rem 0.45rem;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s;
}

.comic-chord-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px #000000;
}

/* Colored Top Border Strip */
.comic-chord-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-blue);
}

.song-section-box.color-red .comic-chord-card::before    { background: var(--color-red); }
.song-section-box.color-yellow .comic-chord-card::before { background: var(--color-yellow); }
.song-section-box.color-green .comic-chord-card::before  { background: var(--color-green); }
.song-section-box.color-purple .comic-chord-card::before { background: var(--color-purple); }

.card-remove-cross {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #888888;
  cursor: pointer;
}

.card-remove-cross:hover {
  color: var(--color-red);
}

.card-chord-bold {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #000000;
  line-height: 1;
  margin-top: 0.35rem;
}

.card-degree-sub {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 900;
  color: #0080ff;
  line-height: 1;
}

.card-corner-dot {
  position: absolute;
  bottom: 5px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c5a059;
}

.chord-flow-arrow {
  font-size: 1rem;
  font-weight: 900;
  color: #555555;
  user-select: none;
}
