.hp-otp {
  --navy: #1b4f8c;
  --navy-dark: #0f3057;
  --gold: #c08b3b;
  --gold-soft: #fcf8f3;
  --text: #19181b;
  --muted: #5e5d65;
  --line: #e5e4e7;
  --bg: #fff;
  --err: #d94b4b;
  --ok: #1fa971;
  --radius: 16px;
  max-width: 440px;
  margin: 0 auto;
  font-family: "Yekan Bakh FaNum", Tahoma, sans-serif;
  color: var(--text);
}

.hp-otp *,
.hp-otp *::before,
.hp-otp *::after {
  box-sizing: border-box;
}

.hp-otp__card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(15, 48, 87, 0.08);
  padding: 28px 24px 24px;
  position: relative;
  overflow: hidden;
}

.hp-otp__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}

.hp-otp__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hp-otp__brand img {
  width: auto;
  height: 44px;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.hp-otp__brand strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.hp-otp__brand span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.hp-otp__test {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gold-soft);
  border: 1px solid rgba(192, 139, 59, 0.35);
  font-size: 13px;
  text-align: center;
  color: var(--text);
}

.hp-otp__test b {
  color: var(--navy-dark);
}

.hp-otp__steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.hp-otp__steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px;
  border-radius: 999px;
  background: #f7f7f8;
}

.hp-otp__steps li span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8e8ea;
  font-size: 11px;
  font-weight: 700;
}

.hp-otp__steps li.is-active {
  background: #eef4fb;
  color: var(--navy);
  font-weight: 700;
}

.hp-otp__steps li.is-active span {
  background: var(--navy);
  color: #fff;
}

.hp-otp__steps li.is-done {
  color: var(--ok);
  background: #e8f6ef;
}

.hp-otp__steps li.is-done span {
  background: var(--ok);
  color: #fff;
}

.hp-otp__panel[hidden] {
  display: none !important;
}

.hp-otp__panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

.hp-otp__panel > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.hp-otp__panel > p b {
  color: var(--navy);
  font-weight: 700;
}

.hp-otp__field {
  display: block;
  margin-bottom: 14px;
}

.hp-otp__field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.hp-otp__field input,
.hp-otp__field select,
.hp-otp .hp-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hp-otp__field select {
  cursor: pointer;
}

#hp-phone-input {
  letter-spacing: 0.04em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.hp-otp__field input:focus,
.hp-otp .hp-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 79, 140, 0.12);
}

.hp-otp__btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 30px;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.hp-otp__btn:hover:not(:disabled) {
  background: var(--navy-dark);
}

.hp-otp__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hp-otp__digits {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 18px;
}

.hp-otp__digits .otp-digit {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hp-otp__digits .otp-digit:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192, 139, 59, 0.18);
}

.hp-otp__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.hp-otp__text-btn {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hp-otp__text-btn:disabled {
  color: var(--muted);
  cursor: default;
  font-weight: 500;
}

.hp-otp__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hp-otp__extra {
  margin: 4px 0 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafafa;
}

.hp-otp__extra summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}

.hp-otp__extra summary::-webkit-details-marker {
  display: none;
}

.hp-otp__ghost,
.hp-add-address-button {
  width: 100%;
  margin-top: 10px;
  height: 42px;
  border: 1px dashed #cbcace;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hp-address-box {
  position: relative;
  margin-top: 12px;
  padding: 14px 12px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.hp-address-box .hp-otp__row,
.hp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.hp-remove-address {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #fdecec;
  color: var(--err);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.hp-otp__msg {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

.hp-otp__msg[hidden] {
  display: none !important;
}

.hp-otp__msg.is-ok {
  background: #e8f6ef;
  color: #146c48;
}

.hp-otp__msg.is-err {
  background: #fdecec;
  color: #a32d2d;
}

@media (max-width: 520px) {
  .hp-otp__card {
    padding: 22px 16px 18px;
    border-radius: 14px;
  }

  .hp-otp__steps li {
    font-size: 11px;
  }

  .hp-otp__row,
  .hp-address-box .hp-otp__row,
  .hp-form-row {
    grid-template-columns: 1fr;
  }

  .hp-otp__digits .otp-digit {
    width: 48px;
    height: 52px;
    font-size: 20px;
  }
}
