.uf-wrapper {
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(46,39,81,0.18);
  position: relative;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
@media all and (min-width: 513px) { .uf-wrapper { width: 460px; } }
@media all and (max-width: 512px) { .uf-wrapper { width: 92%; } }

/* Декоративная полоса сверху */
.uf-wrapper::before {
  content: '';
  display: block;
  height: 4px;
  background: #F3A712;
}

/* Кнопка закрытия */
.uf-wrapper .mfp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(46,39,81,0.07);
  color: #2E2751;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}
.uf-wrapper .mfp-close:hover {
  background: #F3A712;
  color: #fff;
  transform: rotate(90deg);
}

/* Заголовок */
.uf-header {
  padding: 28px 32px 0;
  font-size: 20px;
  font-weight: 700;
  color: #2E2751;
  background: transparent;
  border-radius: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.uf-header::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #F3A712;
  border-radius: 2px;
  margin-top: 8px;
}

/* Контент */
.uf-content {
  padding: 20px 32px 28px;
  font-size: 14px;
}

/* Алерты */
.uf-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.uf-alert ul { margin: 6px 0 0 16px; }
.uf-alert-success {
  background: rgba(23,158,102,0.1);
  color: #179E66;
  border: 1px solid rgba(23,158,102,0.25);
}
.uf-alert-error {
  background: rgba(233,82,65,0.08);
  color: #e95241;
  border: 1px solid rgba(233,82,65,0.2);
}
.uf-alert-info {
  background: rgba(243,167,18,0.1);
  color: #b87800;
  border: 1px solid rgba(243,167,18,0.25);
  font-weight: normal;
}

/* Поле формы */
.uf-field {
  margin-bottom: 16px;
  position: relative;
}
.uf-field:last-child { margin-bottom: 0; }

/* Лейбл — над полем, не сбоку */
.uf-label {
  float: none;
  width: auto;
  text-align: left;
  padding: 0 0 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: block;
}

.uf-field-input { overflow: visible; }

/* Инпуты */
input.uf-input,
textarea.uf-input,
select.uf-input {
  display: block;
  width: 100%;
  height: 46px;
  font-size: 15px;
  font-family: inherit;
  color: #2E2751;
  padding: 0 14px;
  background: #f8f7fc;
  border: 2px solid transparent;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
input.uf-input:focus,
textarea.uf-input:focus,
select.uf-input:focus {
  background: #fff;
  border-color: #F3A712;
  box-shadow: 0 0 0 4px rgba(243,167,18,0.12);
}
textarea.uf-input {
  height: auto;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}
select.uf-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232E2751' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.uf-input-error,
.uf-input-error:focus {
  background: rgba(233,82,65,0.06) !important;
  border-color: #e95241 !important;
  box-shadow: 0 0 0 4px rgba(233,82,65,0.1) !important;
}
.uf-error-text {
  color: #e95241;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Кнопка отправки */
.uf-btn,
button.uf-btn {
  display: block;
  width: 100%;
  height: 48px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  color: #fff !important;
  background: #F3A712;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(243,167,18,0.35);
  padding: 0;
  margin-top: 4px;
}
.uf-btn:hover {
  background: #d99200;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(243,167,18,0.45);
}
.uf-btn:active { transform: translateY(0); }

/* Сообщение об успехе */
.uf-content b { color: #2E2751; }