/* assets/styles/pages/learn/learn-note-order.css */
/* Beginner note-order visuals: Do to upper Do. */

.learn-note-ladder,
.learn-note-order-map {
  direction: rtl;
  width: min(100%, 820px);
  margin: 22px auto;
  padding: 22px 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,224,138,.24);
  background:
    radial-gradient(circle at 16% 12%, rgba(255,224,138,.11), transparent 14rem),
    linear-gradient(135deg, rgba(255,224,138,.06), transparent 46%),
    rgba(9,9,11,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 42px rgba(0,0,0,.20);
}

.learn-note-ladder-title {
  margin: 0 0 14px;
  color: rgba(255,255,255,.84);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.7;
  text-align: center;
}

.learn-note-order-track,
.learn-note-ladder-track {
  direction: rtl;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  overflow-x: visible;
  padding: 6px 0 10px;
}

html[dir="ltr"] .learn-note-order-track,
body[dir="ltr"] .learn-note-order-track,
html[dir="ltr"] .learn-note-ladder-track,
body[dir="ltr"] .learn-note-ladder-track {
  direction: ltr;
}

.learn-note-order-card {
  flex: 0 1 64px;
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 8px 5px;
  border-radius: 17px;
  border: 1px solid rgba(255,224,138,.24);
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px rgba(0,0,0,.14);
  text-align: center;
}

.learn-note-order-card[data-role="start"],
.learn-note-order-card[data-role="finish"] {
  background: rgba(255,224,138,.075);
  border-color: rgba(255,224,138,.38);
}

.learn-note-order-degree {
  min-width: 24px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,224,138,.22);
  color: rgba(255,255,255,.70);
  font-size: .66rem;
  font-weight: 900;
  white-space: nowrap;
}

.learn-note-order-card strong {
  color: #fff3bd;
  font-size: .96rem;
  font-weight: 900;
  line-height: 1.1;
}

.learn-note-order-card small {
  min-height: 0;
  color: rgba(255,255,255,.64);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .72rem;
  font-weight: 900;
}

html[dir="rtl"] .learn-note-order-card small,
body:not([dir="ltr"]) .learn-note-order-card small {
  display: none;
}

.learn-note-order-card em {
  min-height: 1em;
  color: rgba(255,255,255,.58);
  font-size: .66rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.learn-note-order-arrow {
  flex: 0 0 auto;
  align-self: center;
  color: rgba(255,224,138,.66);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 900;
}

.learn-note-step {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.learn-note-head {
  position: relative;
  width: 44px;
  height: 31px;
  border-radius: 50%;
  background: #fff3bd;
  box-shadow: 0 0 18px rgba(255,224,138,.28);
  transform: rotate(-12deg);
}

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

.learn-note-name {
  direction: rtl;
  min-height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 16px;
  border: 1px solid rgba(255,224,138,.24);
  background: rgba(255,255,255,.045);
  color: #fff3bd;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.learn-note-name small {
  color: rgba(255,255,255,.64);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .82rem;
  font-weight: 900;
}

.learn-note-index {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,224,138,.24);
  color: rgba(255,255,255,.70);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .86rem;
  font-weight: 900;
}

.learn-note-ladder-hint {
  margin: 12px 6px 0;
  color: rgba(255,255,255,.74);
  font-size: .92rem;
  line-height: 1.7;
  text-align: center;
}

.note-order-builder-prompt {
  margin: 0 0 10px;
  color: rgba(255,255,255,.84);
  line-height: 1.65;
  text-align: center;
}

.learn-note-order-selected,
.note-order-selected {
  direction: rtl;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

html[dir="ltr"] .learn-note-order-selected,
body[dir="ltr"] .learn-note-order-selected,
html[dir="ltr"] .note-order-selected,
body[dir="ltr"] .note-order-selected {
  direction: ltr;
}

.learn-note-order-selected span,
.note-order-selected span {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,224,138,.30);
  background: rgba(255,224,138,.065);
  color: #fff3bd;
  font-weight: 900;
  font-size: .95rem;
}

.note-order-selected.is-enhanced span::before {
  content: attr(data-index);
  position: absolute;
  inset-inline-start: 7px;
  top: 4px;
  color: rgba(255,255,255,.48);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .64rem;
  font-weight: 900;
}

.note-order-palette {
  direction: rtl;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

html[dir="ltr"] .note-order-palette,
body[dir="ltr"] .note-order-palette {
  direction: ltr;
}

.note-choice {
  min-width: 0;
  min-height: 44px;
  padding: 8px 8px;
  border-radius: 15px;
  border: 1px solid rgba(255,224,138,.26);
  background: rgba(255,255,255,.055);
  color: #fff3bd;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.note-choice:disabled {
  opacity: .35;
  color: rgba(255,255,255,.68);
}

.note-order-controls {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 8px;
  margin-top: 10px;
}

.note-order-controls .learn-btn {
  min-height: 46px;
  margin: 0;
}

.note-order-clear-btn {
  border-color: rgba(255,224,138,.26);
  background: rgba(255,224,138,.07);
  color: #fff3bd;
}

@media (max-width: 760px) {
  .learn-note-ladder,
  .learn-note-order-map {
    margin: 16px -4px;
    padding: 14px 10px;
    border-radius: 22px;
  }

  .learn-note-order-track,
  .learn-note-ladder-track {
    gap: 4px;
    padding-bottom: 8px;
  }

  .learn-note-order-card {
    flex-basis: 44px;
    min-height: 72px;
    padding: 6px 3px;
    border-radius: 14px;
  }

  .learn-note-order-card strong {
    font-size: .82rem;
  }

  .learn-note-order-card em {
    font-size: .58rem;
  }

  .learn-note-order-degree {
    height: 18px;
    padding: 0 4px;
    font-size: .55rem;
  }

  .learn-note-order-arrow {
    font-size: .78rem;
  }

  .learn-note-head {
    width: 36px;
    height: 25px;
  }

  .learn-note-head::after {
    top: -44px;
    width: 4px;
    height: 48px;
  }

  .learn-note-name {
    min-height: 38px;
    padding: 6px 8px;
    font-size: .88rem;
  }

  .learn-note-name small {
    font-size: .76rem;
  }

  .learn-note-ladder-hint {
    font-size: .86rem;
  }

  .learn-note-order-selected,
  .note-order-selected {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
    margin: 10px 0;
  }

  .learn-note-order-selected span,
  .note-order-selected span {
    min-height: 38px;
    border-radius: 12px;
    font-size: .86rem;
  }

  .note-order-selected.is-enhanced span::before {
    inset-inline-start: 5px;
    top: 3px;
    font-size: .58rem;
  }

  .note-order-palette {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .note-choice {
    min-height: 42px;
    padding: 7px 5px;
    font-size: .92rem;
  }
}

@media (max-width: 430px) {
  .learn-note-order-card {
    flex-basis: 38px;
    min-height: 66px;
  }

  .learn-note-order-card strong {
    font-size: .74rem;
  }

  .learn-note-order-degree {
    font-size: .5rem;
  }
}
