/* ------ STEP HEADINGS ------ */

.ms-step__title {
  font-size: 48px;
  color: #0364d0;
  font-weight: 700;
  margin-bottom: 46px;
  text-align: center;
}

.ms-step__description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

/* ------ PROGRESS BAR ------ */

.ms-progress {
  margin-bottom: 20px;
}

.ms-progress__bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 12px;
}

.ms-progress__bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.25s ease-out;
}

.ms-progress__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.ms-progress__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2f2ff;
  color: #1f2933;
  cursor: default;
  transition: all 0.15s ease-in-out;
}

.ms-progress__step-index {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #cbd5e1;
}

.ms-progress__step-label {
  white-space: nowrap;
}

/* Активний/завершений крок */
.ms-progress__step.is-active {
  background: #2563eb;
  color: #fff;
}

.ms-progress__step.is-active .ms-progress__step-index {
  background: #fff;
  border-color: #fff;
  color: #2563eb;
}

.ms-progress__step.is-complete {
  background: #22c55e;
  color: #fff;
}

.ms-progress__step.is-complete .ms-progress__step-index {
  background: #fff;
  border-color: #fff;
  color: #16a34a;
}

/* На мобільних можна приховати частину лейблів, якщо буде тісно
@media (max-width: 480px) {
  .ms-progress__steps {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}
*/
.ms-form {
  max-width: 720px;
  margin: 0 auto;
  background: #e2f2ff;
  padding: 24px;
  border-radius: 16px;
}

.ms-step {
  display: none;
}

.ms-field {
  margin-bottom: 18px;
}

.ms-field__label {
  font-weight: 600;
  margin-bottom: 8px;
}

.ms-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.ms-input--textarea {
  min-height: 100px;
}

.ms-input--error {
  border-color: #ef4444;
}

/* Кнопки next/prev/submit */
.ms-form__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.ms-btn {
  border-radius: 16px;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  font-size: 14px;
}

.ms-btn-next {
  max-width: 370px;
  width: 100%;
  background-color: #fdc64d;
}

/* -------- ICON CARDS (як на першому скріні) -------- */

.ms-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ms-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ms-options--icon .ms-option__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-width: 100px;
  padding: 18px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.ms-options--icon .ms-option__icon {
  margin-bottom: 10px;
}

.ms-options--icon .ms-option__icon img {
  width: 32px;
  height: 32px;
}

/* активний стан + hover */
.ms-options--icon .ms-option.is-active .ms-option__label,
.ms-options--icon .ms-option__label:hover {
  border-color: #2563eb;
}

.ms-select-wrapper {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.ms-input--select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  height: 56px;

  padding: 0 48px 0 18px;
  border-radius: 14px;

  font-size: 16px;
  font-weight: 500;
  color: #1f2937;

  background-color: #ffffff;
  border: 2px solid transparent;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover */
.ms-input--select:hover {
  border-color: rgba(3, 100, 208, 0.3);
}

/* focus */
.ms-input--select:focus {
  outline: none;
  border-color: #0364d0;
}

/* arrow */
.ms-select-wrapper::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  pointer-events: none;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  /* chevron down */
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%231f2937' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* disabled */
.ms-input--select:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* -------- TEXT PILLS (як на другому скріні) -------- */

.ms-options--text {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ms-options--text .ms-option__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.12s ease-in-out;
}

.ms-options--text .ms-option.is-active .ms-option__label {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.ms-progress {
  max-width: 520px;
  margin: 0 auto 28px;
  text-align: center;
}

.ms-progress__row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 18px;
  align-items: center;
}

.ms-progress__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(3, 100, 208, 0.15);
  overflow: hidden;
}

.ms-progress__bar-fill {
  height: 100%;
  width: 0%;
  background: #0364d0;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.ms-progress__count {
  margin-top: 14px;
  font-size: 16px;
  color: #1f2a37;
}

/* close button like TB */
.ms-progress__close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 100, 208, 0.1);
  color: #6b7280;
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
}

.ms-progress__close:hover {
  filter: brightness(0.98);
}
.ms-options.ms-options--text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 394px;
  margin: 0 auto;
}

.ms-options.ms-options--text .ms-option {
  width: 100%;
}

/* ховаємо стандартний radio */
.ms-options.ms-options--text .ms-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* label = карточка */
.ms-options.ms-options--text .ms-option__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;

  background: #fff;
  border: 2px solid transparent;

  cursor: pointer;
  user-select: none;
}

/* текст */
.ms-options.ms-options--text .ms-option__text {
  font-size: 16px;
  line-height: 1.2;
  color: #1f2937;
}

/* кастомний кружок справа */
.ms-options.ms-options--text .ms-option__label::after {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;

  border: 2px solid rgba(31, 41, 55, 0.35);
  background: #fff;

  box-sizing: border-box;
}

/* hover */
.ms-options.ms-options--text .ms-option__label:hover {
  border-color: rgba(3, 100, 208, 0.25);
}

/* checked/active (як на скріні: синя рамка + коло з точкою) */
.ms-options.ms-options--text .ms-option__input:checked + .ms-option__label {
  border-color: #0364d0;
  background: #fff;
}

.ms-options.ms-options--text
  .ms-option__input:checked
  + .ms-option__label::after {
  border-color: #1f2937;
  background: radial-gradient(circle at center, #1f2937 0 4px, transparent 5px);
}

/* keyboard focus (tab) */
.ms-options.ms-options--text .ms-option.is-active .ms-option__label {
  border-color: #0364d0;
  background: #fff;
}

.ms-options.ms-options--icon {
  justify-content: center;
}

.ms-field.ms-field--text {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.ms-field.ms-field--text .ms-field__label,
.ms-field.ms-field--text .ms-field__control {
  width: 100%;
}

.ms-input.ms-input--text {
  max-width: 420px;
  margin: 0 auto 24px;
  background: #fff;
  border-radius: 16px;
}

.ms-phone {
  display: grid;
  grid-template-columns: 64px 64px 1fr;
  align-items: center;

  max-width: 420px;
  margin: 0 auto;

  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);

  overflow: hidden;
}

.ms-phone__country {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid rgba(17, 24, 39, 0.08);
  color: #111827;
  font-weight: 600;
}

.ms-phone__flag {
  font-size: 16px;
  line-height: 1;
}

.ms-phone__chev {
  font-size: 12px;
  opacity: 0.7;
}

.ms-phone__dial {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-weight: 600;
}

.ms-input--phone {
  height: 46px;
  border: 0;
  outline: none;
  padding: 0 16px;
  font-size: 15px;
  color: #1f2937;
  background: transparent;
}

.ms-input--phone::placeholder {
  color: #9ca3af;
}

.ms-phone:focus-within {
  box-shadow: 0 0 0 3px rgba(3, 100, 208, 0.25), 0 4px 12px rgba(15, 23, 42, 0.08);
}