.arraysubs-modal.arraysubs-setup-wizard-modal {
  max-width: 1200px;
}

.arraysubs-setup-wizard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 60vh;

  &__inline-note,
  &__submit-error,
  &__review-summary,
  &__review-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;

    svg {
      flex-shrink: 0;
      margin-top: 1px;
    }
  }

  &__inline-note,
  &__review-summary {
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    color: #0a4b78;

    p {
      margin: 4px 0 0;
      color: #285a8b;
    }
  }

  &__submit-error {
    background: #fcf0f1;
    border: 1px solid #f0c2c7;
    color: #8c1d2c;
  }

  &__review-note {
    flex-direction: column;
    background: #fff8e5;
    border: 1px solid #e6c766;
    color: #6f4f00;

    strong {
      display: block;
    }

    ul {
      margin: 0;
      padding-left: 18px;
    }
  }

  &__progress {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }

  &__progress-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  &__progress-step {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid #c3c4c7;
    background: #fff;
    color: #50575e;
    font-size: 13px;
    font-weight: 600;

    &--active {
      border-color: #2271b1;
      background: #2271b1;
      color: #fff;
      box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.16);
    }

    &--done {
      border-color: #00a32a;
      background: #00a32a;
      color: #fff;
    }
  }

  &__progress-line {
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    width: calc(100% - 8px);
    height: 2px;
    background: #dcdcde;

    &--done {
      background: #00a32a;
    }
  }

  &__progress-label {
    font-size: 11px;
    line-height: 1.3;
    color: #50575e;
  }

  &__body,
  &__review {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  &__step-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  &__step-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
  }

  &__step-description {
    margin: 0;
    color: #50575e;
    font-size: 14px;
  }

  &__questions {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  &__question {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff;
  }

  &__question-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
  }

  &__question-help {
    margin: -4px 0 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.45;
  }

  &__question-error {
    color: #b32d2e;
    font-size: 12px;
    font-weight: 500;
  }

  &__radio-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  &__radio-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition:
      border-color 0.18s ease,
      box-shadow 0.18s ease,
      transform 0.18s ease,
      background-color 0.18s ease;

    &:hover {
      border-color: #2271b1;
      transform: translateY(-1px);
    }

    &--selected {
      border-color: #2271b1;
      background: #f0f6fc;
      box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.14);
    }
  }

  &__radio-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  &__radio-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(34, 113, 177, 0.1);
    color: #2271b1;
  }

  &__radio-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
  }

  &__radio-card-desc,
  &__choice-description {
    color: #646970;
    font-size: 12px;
    line-height: 1.45;
  }

  &__option-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f0f1;
    color: #3c434a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  &__choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  &__choice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;

    input {
      margin-top: 2px;
    }
  }

  &__choice-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  &__choice-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
  }

  &__input,
  &__select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #8c8f94;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;

    &:focus {
      outline: none;
      border-color: #2271b1;
      box-shadow: 0 0 0 1px #2271b1;
    }
  }

  &__number-field {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  &__number-field-suffix {
    color: #646970;
    font-size: 13px;
    white-space: nowrap;
  }

  &__toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;

    input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
  }

  &__toggle-track {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: #dcdcde;
    transition: background-color 0.18s ease;
  }

  &__toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.18s ease;
  }

  &__toggle input:checked + &__toggle-track {
    background: #2271b1;
  }

  &__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
    position: sticky;
    bottom: -14px;
    padding-bottom: 14px;
    background: #fff;
  }

  &__footer-back,
  &__footer-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  &__footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__footer-next .spinner {
    float: none;
    margin: 0;
  }

  &__review-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  &__review-section {
    border: 1px solid #dcdcde;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }

  &__review-section-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #f6f7f7;
  }

  &__review-section-toggle,
  &__review-section-edit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
  }

  &__review-section-toggle {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
  }

  &__review-section-edit {
    color: #2271b1;
    font-size: 12px;
    font-weight: 600;
  }

  &__review-section-body {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  &__review-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f1;
  }

  &__review-item-label {
    color: #50575e;
    font-size: 13px;
    max-width: 48%;
  }

  &__review-item-value {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
  }

  &__cancel-confirm {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(12px);
  }

  &__cancel-confirm-card {
    width: min(100%, 420px);
    padding: 18px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);

    p {
      margin: 12px 0 0;
      color: #50575e;
      font-size: 13px;
      line-height: 1.5;
    }
  }

  &__cancel-confirm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8c1d2c;
  }

  &__cancel-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
  }

  @media (max-width: 782px) {
    &__progress {
      gap: 6px;
    }

    &__progress-label {
      display: none;
    }
  }

  @media (max-width: 600px) {
    &__radio-cards {
      grid-template-columns: 1fr;
    }

    &__progress {
      grid-template-columns: repeat(9, minmax(24px, 1fr));
    }

    &__progress-line {
      left: calc(50% + 16px);
      width: calc(100% - 2px);
    }

    &__review-item,
    &__footer {
      flex-direction: column;
      align-items: stretch;
    }

    &__review-item-value {
      text-align: left;
    }

    &__footer-actions {
      width: 100%;
      justify-content: space-between;
    }
  }
}

.arraysubs-setup-wizard__toggle
  input:checked
  + .arraysubs-setup-wizard__toggle-track {
  background: #2271b1;
}

.arraysubs-setup-wizard__toggle
  input:checked
  + .arraysubs-setup-wizard__toggle-track
  .arraysubs-setup-wizard__toggle-thumb {
  transform: translateX(20px);
}
