/*
  Hitos y prácticas: barras verticales entre columnas, con el texto rotado y
  en mayúsculas, como en la malla oficial. Mismos 3 estados que el ramo.
*/
.barra-hito {
  --acento: var(--color-texto-principal);
  --fondo: var(--color-blanco);
  --texto: var(--color-texto-principal);
  display: flex;
  flex-direction: column;
  width: var(--ancho-barra);
  border: 1.5px solid var(--acento);
  border-radius: 2px;
  background: var(--fondo);
  color: var(--texto);
  transition: background-color 0.12s ease, color 0.12s ease;
}

.barra-hito__boton {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 8px 0 4px;
  border: 0;
  background: none;
  color: inherit;
  font: 500 10px/13px var(--fuente);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.barra-hito__nombre {
  /* se lee de abajo hacia arriba, como en la malla oficial */
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.barra-hito__icono {
  width: 13px;
  height: 13px;
}

/* Botón de detalle: siempre visible, al pie de la barra */
.barra-hito__info {
  display: grid;
  flex: none;
  place-items: center;
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.barra-hito__info-icono {
  display: block;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 700 10px/13px var(--fuente);
  text-align: center;
}

.barra-hito__info:hover .barra-hito__info-icono {
  background: var(--texto);
  color: var(--fondo);
}

.barra-hito__boton:focus-visible,
.barra-hito__info:focus-visible {
  outline: 2px solid var(--color-texto-principal);
  outline-offset: 2px;
}

.barra-hito--disponible {
  border-width: 2px;
  box-shadow: 0 1px 3px rgba(20, 41, 74, 0.18);
}

.barra-hito--disponible:hover {
  box-shadow: 0 0 0 1px var(--acento), 0 2px 6px rgba(20, 41, 74, 0.22);
}

.barra-hito--aprobado {
  position: relative;
  border-color: var(--texto);
  background: var(--texto);
  color: var(--color-blanco);
}

/* Línea diagonal: aprobado = "tachado" */
.barra-hito--aprobado::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    transparent calc(50% - 2.5px),
    rgba(0, 0, 0, 0.25) calc(50% - 2.5px),
    rgba(255, 255, 255, 0.9) calc(50% - 1.5px),
    rgba(255, 255, 255, 0.9) calc(50% + 1.5px),
    rgba(0, 0, 0, 0.25) calc(50% + 2.5px),
    transparent calc(50% + 2.5px)
  );
  pointer-events: none;
}

.barra-hito--aprobado .barra-hito__info:hover .barra-hito__info-icono {
  background: var(--color-blanco);
  color: var(--texto);
}

.barra-hito--aprobado .barra-hito__boton:focus-visible,
.barra-hito--aprobado .barra-hito__info:focus-visible {
  outline-color: var(--color-blanco);
  outline-offset: -3px;
}

.barra-hito--bloqueado {
  border: 1.5px dashed var(--color-borde-medio);
  background: var(--color-blanco);
  color: var(--color-texto-bloqueado);
}
