.ebl-map {
  font-family: inherit;
  --ebl-thumb: var(--ebl-thumb-d, 44px);
  --ebl-text:  var(--ebl-text-d, 13px);
}

.ebl-gate-message {
  font: inherit;
  color: inherit;
}

@media (max-width: 767px) {
  .ebl-map {
    --ebl-thumb: var(--ebl-thumb-m, 32px);
    --ebl-text:  var(--ebl-text-m, 11px);
  }
}

/* ── Progress counter ── */
.ebl-map-progress {
  font-size: 12px;
  font-weight: 500;
  color: #66B2B6;
  margin-bottom: 12px;
}

/* ── Vertical layout ── */
.ebl-map--vertical {
  display: flex;
  flex-direction: column;
}

.ebl-map--vertical .ebl-map-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ebl-map-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ebl-map--vertical .ebl-map-spine {
  align-self: stretch;
}

.ebl-map .ebl-map-dot {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ebl-map .ebl-map-dot svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  display: block;
  flex-shrink: 0;
}

.ebl-map--vertical .ebl-map-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: #A7E0E1;
  margin: 4px 0;
}

.ebl-map-item--done .ebl-map-line {
  background: #005D6C;
}

.ebl-map-item--current .ebl-map-line {
  background: #A7E0E1;
}

.ebl-map--vertical .ebl-map-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 24px;
  flex: 1;
}

/* ── Steps side variants (vertical only) ── */
.ebl-map--vertical.ebl-map--side-left .ebl-map-item {
  flex-direction: row-reverse;
}
.ebl-map--vertical.ebl-map--side-left .ebl-map-content {
  justify-content: flex-end;
}
.ebl-map--vertical.ebl-map--side-left .ebl-map-meta {
  text-align: right;
}

/* Alternate: spine stays centered, content flips left/right per item */
.ebl-map--vertical.ebl-map--side-alternate .ebl-map-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 16px;
}
.ebl-map--vertical.ebl-map--side-alternate .ebl-map-spine {
  grid-column: 2;
}
.ebl-map--vertical.ebl-map--side-alternate .ebl-map-item--odd .ebl-map-content {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-end;
}
.ebl-map--vertical.ebl-map--side-alternate .ebl-map-item--even .ebl-map-content {
  grid-column: 3;
}
.ebl-map--vertical.ebl-map--side-alternate .ebl-map-item--even .ebl-map-steps {
  padding-left: 0;
}

/* ── Horizontal layout ── */
.ebl-map--horizontal {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
}

.ebl-map--horizontal .ebl-map-item {
  flex: 1;
  min-width: 90px;
}

.ebl-map-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ebl-map-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.ebl-map-line--pre,
.ebl-map-line--post {
  flex: 1;
  height: 2px;
  background: #A7E0E1;
}

.ebl-map-item--done .ebl-map-line--pre {
  background: #005D6C;
}

.ebl-map-item--done .ebl-map-line--post {
  background: #005D6C;
}

/* ── Shared: image thumbnail ── */
.ebl-map .ebl-map-img {
  width:  var(--ebl-thumb);
  height: var(--ebl-thumb);
  max-width: var(--ebl-thumb);
  max-height: var(--ebl-thumb);
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.ebl-map .ebl-map-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F2F8FA;
  border: 1px solid #A7E0E1;
  color: #66B2B6;
}

.ebl-map-item--done .ebl-map-img--placeholder {
  border-color: #66B2B6;
  color: #005D6C;
}

.ebl-map-item--current .ebl-map-img--placeholder {
  border-color: #1D95A2;
  color: #1D95A2;
}

.ebl-map .ebl-map-img--placeholder svg {
  width: calc(var(--ebl-thumb) * 0.5);
  height: calc(var(--ebl-thumb) * 0.5);
  max-width: calc(var(--ebl-thumb) * 0.5);
  max-height: calc(var(--ebl-thumb) * 0.5);
  display: block;
  flex-shrink: 0;
}

/* ── Shared: meta text ── */
.ebl-map-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ebl-map--horizontal .ebl-map-meta {
  align-items: center;
  text-align: center;
}

.ebl-map-label {
  font-size: var(--ebl-text);
  font-weight: 600;
  color: #66B2B6;
  line-height: 1.3;
}

.ebl-map-item--done .ebl-map-label {
  color: #005D6C;
}

.ebl-map-item--current .ebl-map-label {
  color: #017481;
}

.ebl-map-type {
  font-size: 11px;
  color: #A7E0E1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ebl-map-item--done .ebl-map-type {
  color: #66B2B6;
}

.ebl-map-item--current .ebl-map-type {
  color: #66B2B6;
}

/* ── No labels — hides only the type tag and step list, never the achievement name ── */
.ebl-map--no-labels .ebl-map-type,
.ebl-map--no-labels .ebl-map-steps {
  display: none;
}

/* ── Per-achievement progress bar (always visible) ── */
.ebl-map-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.ebl-map-bar-track {
  flex: 1;
  height: 4px;
  background: #E2F4F5;
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}

.ebl-map-bar-fill {
  height: 100%;
  background: #1D95A2;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.ebl-map-item--done .ebl-map-bar-fill {
  background: #005D6C;
}

.ebl-map-bar-count {
  font-size: 10px;
  font-weight: 600;
  color: #66B2B6;
  white-space: nowrap;
  flex-shrink: 0;
}

.ebl-map-item--done .ebl-map-bar-count {
  color: #005D6C;
}

/* ── Steps list ── */
.ebl-map-steps {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ebl-map-step {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  color: #66B2B6;
  line-height: 1.4;
}

.ebl-map-step svg {
  width: 12px;
  height: 12px;
  max-width: 12px;
  max-height: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ebl-map-step--done {
  color: #005D6C;
}

.ebl-map-step-count {
  font-weight: 600;
  color: #1D95A2;
  white-space: nowrap;
}

/* flip bar order for left-side items so chevron is on the left */
.ebl-map--side-alternate .ebl-map-item--odd .ebl-map-bar {
  flex-direction: row-reverse;
}

/* ── Chevron toggle button ── */
.ebl-map-chevron {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #66B2B6;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.ebl-map-chevron svg {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  display: block;
  transition: transform 0.25s ease;
}

.ebl-map-item--revealed .ebl-map-chevron svg {
  transform: rotate(180deg);
}

/* ── Steps reveal on click (bar always stays, only list toggles) ── */
.ebl-map--labels-toggle .ebl-map-steps {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.2s ease;
  pointer-events: none;
}

.ebl-map--labels-toggle .ebl-map-item--revealed .ebl-map-steps {
  max-height: 400px;
  opacity: 1;
  margin-top: 4px;
  pointer-events: auto;
}
