/* The online LilyPond converter (task L.3): /convertisseur-lilypond/ and /en/lilypond-converter/,
   on the styles of the catalog pages (catalogue.css) and of the site's lacquered boxes. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.converter code,
.converter pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82em;
}

.converter code {
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.converter-panel {
  max-width: 820px;
  margin: 8px auto 56px;
  padding: 32px;
}

.converter-status {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 300;
}

.converter-closed p:last-child {
  margin: 0;
  color: var(--text-secondary);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  border: 2px dashed rgba(92, 225, 255, 0.35);
  border-radius: 18px;
  color: var(--right-hand-light);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.drop-zone:hover,
.drop-zone.is-over,
#ly-file:focus-visible + .drop-zone,
.drop-zone:focus-within {
  border-color: var(--right-hand);
  background: rgba(92, 225, 255, 0.06);
}

.converter-drop:has(#ly-file:focus-visible) .drop-zone {
  outline: 2px solid var(--right-hand);
  outline-offset: 4px;
}

.drop-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary);
}

.drop-hint {
  color: var(--text-secondary);
  font-size: 15px;
}

.converter-file {
  margin: 0 0 16px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.verdict {
  margin: 0 0 20px;
}

.verdict-badge {
  margin: 0 0 6px;
}

.verdict-badge span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verdict.is-compatible .verdict-badge span {
  border: 1px solid rgba(107, 242, 176, 0.5);
  background: rgba(107, 242, 176, 0.12);
  color: var(--good);
}

.verdict.is-refused .verdict-badge span {
  border: 1px solid rgba(255, 107, 138, 0.5);
  background: rgba(255, 107, 138, 0.12);
  color: var(--miss);
}

.verdict-detail {
  margin: 0;
  color: var(--text-primary);
}

.progress {
  margin: 0 0 20px;
}

.progress-bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--right-hand), var(--left-hand));
  animation: converter-progress 1.6s var(--ease) infinite;
}

@keyframes converter-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(290%); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar span {
    width: 100%;
    animation: none;
    opacity: 0.6;
  }
}

.progress-text {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.converter-error-message {
  margin: 0 0 10px;
  color: var(--miss);
}

.converter-error.is-info .converter-error-message {
  color: var(--text-primary);
}

.converter-error-detail {
  max-height: 260px;
  margin: 0 0 16px;
  padding: 14px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.converter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 4px 0 18px;
}

.converter-warnings {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 15px;
}

.converter-warnings p {
  margin: 0 0 6px;
}

.converter-warnings ul {
  margin: 0;
  padding-left: 20px;
}

.converter-again {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}

.converter-section {
  max-width: 820px;
  margin: 0 auto 48px;
}

.converter-section > p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.converter-limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.converter-limits .card h3,
.converter-columns .card h3 {
  font-size: 22px;
}

.converter-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin: 0 0 18px;
}

.converter-columns ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.converter-columns li + li {
  margin-top: 8px;
}

@media (max-width: 600px) {
  .converter-panel {
    padding: 22px 18px;
  }

  .converter-actions .key {
    width: 100%;
  }

  .converter-actions .filigree {
    width: 100%;
  }
}
