/* assets/styles/pages/learn/learn-staff-reading.css */
/* Staff-reading visuals for beginner lessons. */

.learn-staff-demo {
  direction: ltr;
  margin: 22px auto;
  width: min(100%, 680px);
  padding: 22px 18px 18px;
  border-radius: 26px;
  border: 1px solid rgba(255,224,138,.24);
  background:
    radial-gradient(circle at 18% 10%, rgba(255,224,138,.10), transparent 14rem),
    linear-gradient(135deg, rgba(255,224,138,.06), transparent 46%),
    rgba(9,9,11,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 42px rgba(0,0,0,.20);
}

.learn-staff-title {
  direction: rtl;
  margin: 0 0 12px;
  color: rgba(255,255,255,.82);
  font-size: .98rem;
  font-weight: 800;
  text-align: center;
}

.learn-staff-board {
  position: relative;
  min-height: 178px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.025);
}

.learn-staff-lines {
  position: absolute;
  inset: 35px 16px 52px 86px;
}

.learn-staff-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,224,138,.72);
  box-shadow: 0 0 8px rgba(255,224,138,.12);
}

.learn-staff-line:nth-child(1) { top: 0%; }
.learn-staff-line:nth-child(2) { top: 25%; }
.learn-staff-line:nth-child(3) { top: 50%; }
.learn-staff-line:nth-child(4) { top: 75%; }
.learn-staff-line:nth-child(5) { top: 100%; }

.learn-staff-clef {
  position: absolute;
  left: 22px;
  top: 24px;
  z-index: 2;
  color: #fff3bd;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 5.3rem;
  line-height: 1;
  text-shadow: 0 0 22px rgba(255,224,138,.26);
}

.learn-staff-note {
  position: absolute;
  left: 57%;
  z-index: 4;
  width: 38px;
  height: 26px;
  border-radius: 50%;
  background: #fff3bd;
  box-shadow: 0 0 18px rgba(255,224,138,.28);
  transform: translate(-50%, -50%);
}

.learn-staff-note::after {
  content: '';
  position: absolute;
  right: 2px;
  top: -62px;
  width: 5px;
  height: 66px;
  border-radius: 999px;
  background: #fff3bd;
  box-shadow: 0 0 12px rgba(255,224,138,.18);
}

.learn-staff-note.is-line {
  top: calc(35px + ((178px - 87px) * .5));
}

.learn-staff-note.is-space {
  top: calc(35px + ((178px - 87px) * .375));
}

.learn-staff-focus-line,
.learn-staff-focus-space {
  position: absolute;
  left: 86px;
  right: 16px;
  z-index: 1;
  pointer-events: none;
}

.learn-staff-focus-line {
  top: calc(35px + ((178px - 87px) * .5) - 1px);
  height: 4px;
  border-radius: 999px;
  background: rgba(255,143,177,.34);
  box-shadow: 0 0 20px rgba(255,143,177,.18);
}

.learn-staff-focus-space {
  top: calc(35px + ((178px - 87px) * .25));
  height: calc((178px - 87px) * .25);
  border-radius: 14px;
  background: rgba(126,207,160,.18);
  box-shadow: inset 0 0 20px rgba(126,207,160,.08);
}

.learn-staff-label {
  direction: rtl;
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,224,138,.34);
  background: rgba(9,9,11,.72);
  color: #fff3bd;
  font-size: .92rem;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(0,0,0,.24);
}

.learn-staff-hint {
  direction: rtl;
  margin: 12px 4px 0;
  color: rgba(255,255,255,.72);
  font-size: .96rem;
  line-height: 1.8;
  text-align: center;
}

.learn-staff-legend {
  direction: rtl;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.learn-staff-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: rgba(255,255,255,.78);
  font-size: .94rem;
  line-height: 1.6;
}

.learn-staff-legend-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,224,138,.28);
  background: rgba(255,224,138,.12);
}

.learn-staff-legend-mark.is-line {
  height: 4px;
  background: rgba(255,143,177,.46);
}

.learn-staff-legend-mark.is-space {
  background: rgba(126,207,160,.22);
}

@media (max-width: 640px) {
  .learn-staff-demo {
    margin: 20px -4px;
    padding: 18px 12px 14px;
    border-radius: 22px;
  }

  .learn-staff-board {
    min-height: 150px;
    border-radius: 19px;
  }

  .learn-staff-lines {
    inset: 31px 10px 47px 64px;
  }

  .learn-staff-clef {
    left: 14px;
    top: 26px;
    font-size: 4.1rem;
  }

  .learn-staff-note {
    left: 59%;
    width: 30px;
    height: 21px;
  }

  .learn-staff-note::after {
    right: 1px;
    top: -50px;
    height: 53px;
    width: 4px;
  }

  .learn-staff-note.is-line {
    top: calc(31px + ((150px - 78px) * .5));
  }

  .learn-staff-note.is-space {
    top: calc(31px + ((150px - 78px) * .375));
  }

  .learn-staff-focus-line,
  .learn-staff-focus-space {
    left: 64px;
    right: 10px;
  }

  .learn-staff-focus-line {
    top: calc(31px + ((150px - 78px) * .5) - 1px);
  }

  .learn-staff-focus-space {
    top: calc(31px + ((150px - 78px) * .25));
    height: calc((150px - 78px) * .25);
  }

  .learn-staff-label {
    right: 12px;
    bottom: 10px;
    min-height: 30px;
    padding: 5px 11px;
    font-size: .82rem;
  }

  .learn-staff-hint {
    font-size: .9rem;
  }
}
