/* Container */
#otp-container {
  position: relative;
  max-width: 100%;
  margin: 20px auto;
  padding: 15px 15px 80px;  /* bottom space for desktop labels */
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Ensure wrap is relative for overlay positioning */
#otp-progress-wrap {
  position: relative;
}

/* HORIZONTAL TRACK (desktop) */
#otp-progressbar {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 12px;
  background: #e1e1e1;       /* empty track */
  transform: translateY(-50%);
  margin: 0; padding: 0;
  list-style: none;
  border-radius: 6px;
  z-index: 0;
}

/* FILLED PORTION */
#otp-progressbar-fill {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 12px;
  background: #c7b8aa;       /* softer taupe */
  transform: translateY(-50%);
  border-radius: 6px;
  transition: width 2s ease-in-out;
  z-index: 1;
}

/* DOTS + LABELS (desktop) */
#otp-progressbar li {
  position: absolute;
  top: 50%;
  transform-origin: center center;
  font-size: 0.75em;
  color: #555;
  white-space: nowrap;
  z-index: 2;                /* above track */
  transition: transform 0.4s, color 0.4s, font-weight 0.4s;
}

/* INACTIVE: vertical below circle */
#otp-progressbar li:not(.active):not(.current) {
  transform: translate(-50%, -50%) rotate(-90deg);
  padding-top: 16px;
}

/* PASSED but not last: 45° below circle */
#otp-progressbar li.active:not(.current) {
  transform: translate(-50%, 0%) rotate(-45deg);
  padding-top: 16px;
}

/* LAST ACTIVE (“current”): horizontal above circle */
#otp-progressbar li.current {
  transform: translate(-50%, -75%) rotate(0deg);
  font-weight: bold;
  font-size: 0.85em;
  padding-bottom: 24px;      /* push label above circle */
  color: #333;
}

/* Default circle */
#otp-progressbar li::before {
  content: '';
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 auto 4px;
  transition: background 0.4s, transform 0.4s;
  z-index: 2;
}

/* PASSED circles */
#otp-progressbar li.active::before {
  background: #c7b8aa;
  transform: scale(1.3);
  content: '✔';
  color: white;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* MOBILE: horizontal bar + carousel steps + overlay */
@media (max-width: 600px) {
  #otp-container {
    padding: 15px;
    overflow: hidden;
  }

  /* Track reset */
  #otp-progressbar {
    position: relative;
    top: auto; left: auto; right: auto;
    height: 12px;
    margin-bottom: 20px;
    transform: none;
    background: #e1e1e1;
    border-radius: 6px;
    z-index: 0;
    display: block;
  }
  #otp-progressbar-fill {
    position: relative;
    top: auto; left: auto;
    width: 0; height: 12px;
    transform: none;
    background: #c7b8aa;
    z-index: 1;
  }

  /* Overlay on entire wrap, centered on track */
  #otp-progress-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 14px;
    background: rgba(128,128,128,0.2); /* 20% transparency */
    border-radius: 7px;
    transform: translateY(49px);
    pointer-events: none;
    z-index: 2;
  }

  /* Carousel container */
  #otp-progressbar {
    display: flex;
    overflow-x: auto;
    height: auto;   /* your requested */
    padding: 14px;  /* your requested */
    white-space: nowrap;
  }

  #otp-progressbar li {
    position: relative !important;
    transform: none !important;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 12px;
    font-size: 0.8em;
    color: #555;
    white-space: normal;
    z-index: 3;     /* above overlay */
  }
}
