:root {
  --sam-bg: rgba(17, 25, 40, .72);
  --sam-overlay: rgba(0, 0, 0, .35);
  --sam-blur: 12px;
  --sam-accent: #00c2a8;
  --sam-text: #fff;
  --sam-border: rgba(255, 255, 255, .15);
}

/* Оверлей и модалка */
.sam-overlay {
  position: fixed;
  inset: 0;
  background: var(--sam-overlay);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 9999;
}


.sam-modal__hero {
  padding-bottom: 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}

.sam-modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--sam-bg);
  color: var(--sam-text);
  backdrop-filter: blur(var(--sam-blur)) saturate(140%);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  padding: 24px;
  display: none;
  z-index: 10000;
}

.sam-close {
  background: transparent;
  border: none;
  font-size: 27px;
  color: #fff;
  cursor: pointer;
  margin-left: -5px;
  margin-bottom: 3px;
}

#sam-title {
  font-weight: 500;
  font-size: 22px;
}


.sam-modal__text {
  font-size: 14px;
  margin-bottom: 30px;
}

/* Формы */
.sam-row {
  margin-bottom: 14px;
}

.sam-small {
  font-size: 13px;
  opacity: .85;
}

.sam-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--sam-border);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  outline: none;
}

.sam-input::placeholder {
  color: rgba(255, 255, 255, .6);
}

.sam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--sam-accent);
  border: none;
  color: #042b27;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sam-btn[disabled] {
  opacity: .6;
  pointer-events: none;
}

/* Ступени */
.sam-steps [data-step] {
  display: none;
}

.sam-steps [data-step].active {
  display: block;
}

/* Ошибки */
.sam-error {
  background: rgba(255, 73, 73, .15);
  border: 1px solid rgba(255, 73, 73, .45);
  color: #ffdede;
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: none;
  font-size: 12px;
}

/* Мобилка — чуть плотнее */
@media (max-width: 420px) {
  .sam-modal {
    padding: 18px;
  }
}


.sam-row {
  position: relative;
}

.sam-row .sam-input {
  padding: 20px 14px 12px;
  /* место для лейбла внутри */
}

.sam-row .sam-input::placeholder {
  color: transparent;
}

.sam-row .sam-small {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, .75);
  transition: top .18s ease, transform .18s ease, font-size .18s ease, color .18s ease, opacity .18s ease;
  z-index: 1;
}

/* уехать вверх при фокусе/когда поле не пустое */
.sam-row:focus-within .sam-small,
.sam-row:has(.sam-input:not(:placeholder-shown)) .sam-small {
  top: 8px;
  transform: none;
  font-size: 12px;
  opacity: .9;
}

/* опционально — подсветка при фокусе */
.sam-row:focus-within .sam-small {
  color: var(--sam-accent, #00c2a8);
}

.sam-row .sam-input:focus {
  border-color: rgba(0, 194, 168, .7);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, .18);
}

.sam-step-btn-row {
  display: flex;
  margin-top: 50px;
  justify-content: center;
}

.link {
  border: 0;
  cursor: pointer;
}