/* === ФОРМЫ И МОДАЛЬНЫЕ ОКНА === */

/* ─── Поля ввода ──────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label  { font-size: 13px; font-weight: 600; color: var(--dim); }

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,65,194,.12);
}
.field-input::placeholder,
.field-textarea::placeholder { color: #aab3c0; }

.field-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6573' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

.field-textarea { resize: vertical; min-height: 96px; }

/* Состояние ошибки */
.field-input.error,
.field-select.error { border-color: #ef4444; }
.field-error { font-size: 12px; color: #ef4444; margin-top: 4px; }

/* ─── Чекбокс ─────────────────────────────────────────────────── */
.check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
  user-select: none;
}
.check-box {
  flex-shrink: 0;
  margin-top: 1px;
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.check-wrap input { position: absolute; opacity: 0; pointer-events: none; }
.check-wrap input:checked + .check-box {
  background: var(--blue);
  border-color: var(--blue);
}
.check-link { color: var(--dim); text-decoration: underline; }
.check-link:hover { color: var(--blue); }

/* ─── Кнопка отправки ─────────────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 16px 24px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background .2s, opacity .2s, transform .15s;
}
.btn-submit:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.btn-submit.loading { opacity: .7; }

/* ─── Форма ───────────────────────────────────────────────────── */
.quick-form { display: flex; flex-direction: column; gap: 14px; }
.quick-form .form-title    { font-weight: 700; font-size: 22px; color: var(--text); }
.quick-form .form-subtitle { font-size: 14px; color: var(--dim); margin-bottom: 4px; }

/* ─── Состояние «Спасибо» ─────────────────────────────────────── */
.form-success {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.form-success .success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.form-success .success-title { font-weight: 700; font-size: 20px; color: var(--text); }
.form-success .success-sub   { font-size: 14px; color: var(--dim); }

/* ─── Модальное окно "Спасибо" ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 24px 24px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: slideUp .25s ease;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background .2s;
}
.modal-close:hover { background: var(--line); }

.modal-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.modal-title { font-weight: 800; font-size: 26px; color: var(--text); margin-bottom: 12px; letter-spacing: -0.02em; }
.modal-text  { font-size: 16px; color: var(--dim); line-height: 1.55; max-width: 380px; margin: 0 auto; }
.modal-details {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.modal-detail-n { font-weight: 800; font-size: 26px; color: var(--accent); letter-spacing: -0.02em; }
.modal-detail-t { font-size: 13px; color: var(--dim); margin-top: 2px; }

.modal-btn-close {
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .2s;
}
.modal-btn-close:hover { opacity: .85; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ─── Cookie-баннер ───────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 100px;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
  max-width: 560px;
  animation: slideUp .3s ease;
}
.cookie-banner.hidden { display: none; }
.cookie-banner p {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}
.cookie-banner a { color: var(--accent); }
.cookie-accept {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-dark); }

/* Попап с формой */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 24px 24px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
.popup-overlay.hidden { display: none; }
.popup-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: slideUp .25s ease;
}
.popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.popup-close:hover { background: var(--line); }
.popup-title    { font-weight: 700; font-size: 22px; color: var(--text); margin-bottom: 6px; }
.popup-subtitle { font-size: 14px; color: var(--dim); margin-bottom: 20px; line-height: 1.5; }
