/* ks-hr-form.css */

/* ── Обёртка ──────────────────────────────────────────── */
.ks-hr-wrap {
  max-width: 760px;
  margin: 0 auto;
  font-family: inherit;
  color: #1a1a1a;
}

/* ── Индикатор шагов ──────────────────────────────────── */
.ks-hr-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-bottom: 32px;
}

.ks-hr-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 20px;
  border: 1.5px solid #d0d0d0;
  background: #f7f7f7;
  cursor: default;
  transition: background .2s, border-color .2s;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.ks-hr-step.is-done {
  border-color: #a0c8a0;
  background: #f0f8f0;
  cursor: pointer;
  color: #3a7a3a;
}

.ks-hr-step.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.ks-hr-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d0d0d0;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.ks-hr-step.is-done .ks-hr-step__num {
  background: #4caf50;
  color: #fff;
}

.ks-hr-step.is-active .ks-hr-step__num {
  background: #2563eb;
  color: #fff;
}

/* ── Секции ───────────────────────────────────────────── */
.ks-hr-section {
  display: none;
}
.ks-hr-section.is-active {
  display: block;
}

/* ── Заголовок секции ─────────────────────────────────── */
.ks-hr-h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8e8e8;
  color: #111;
}

/* ── Поля ─────────────────────────────────────────────── */
.ks-hr-field {
  margin-bottom: 20px;
}

.ks-hr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

@media (max-width: 560px) {
  .ks-hr-row {
    grid-template-columns: 1fr;
  }
}

.ks-hr-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.ks-hr-req {
  color: #e53e3e;
  margin-left: 2px;
}

.ks-hr-hint {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  line-height: 1.4;
}

.ks-hr-hint-inline {
  font-size: 13px;
  font-weight: 400;
  color: #888;
}

/* ── Поля ввода ───────────────────────────────────────── */
.ks-hr-input,
.ks-hr-textarea,
.ks-hr-select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1.5px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ks-hr-input:focus,
.ks-hr-textarea:focus,
.ks-hr-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.ks-hr-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.ks-hr-select {
  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='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ── Счётчик символов ─────────────────────────────────── */
.ks-hr-counter-row {
  text-align: right;
  margin-top: 3px;
}

.ks-hr-counter {
  font-size: 11px;
  color: #aaa;
  transition: color .15s;
}

.ks-hr-counter.is-over {
  color: #e53e3e;
  font-weight: 600;
}

/* ── Ошибки ───────────────────────────────────────────── */
.ks-hr-error {
  display: none;
  font-size: 12px;
  color: #e53e3e;
  margin-top: 4px;
}

.ks-hr-error--global {
  font-size: 14px;
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #fc8181;
  border-radius: 6px;
  margin-bottom: 16px;
}

.ks-hr-input.is-error,
.ks-hr-textarea.is-error,
.ks-hr-select.is-error {
  border-color: #e53e3e;
}

/* ── Чекбоксы ─────────────────────────────────────────── */
.ks-hr-checkgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ks-hr-checklabel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid #d0d0d0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.ks-hr-checklabel:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.ks-hr-checklabel input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #2563eb;
}

.ks-hr-checklabel input[type="checkbox"]:disabled + span {
  color: #bbb;
}
.ks-hr-checklabel:has(input:disabled) {
  border-color: #e8e8e8;
  cursor: not-allowed;
}
.ks-hr-checklabel:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

/* ── Согласие (чекбокс + текст) ───────────────────────── */
.ks-hr-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.ks-hr-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #2563eb;
}

.ks-hr-consent a {
  color: #2563eb;
  text-decoration: underline;
}

/* ── Загрузка файлов ──────────────────────────────────── */
.ks-hr-upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ks-hr-file-input {
  display: none;
}

.ks-hr-upload-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1.5px solid #2563eb;
  border-radius: 6px;
  background: #fff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.ks-hr-upload-btn:hover {
  background: #2563eb;
  color: #fff;
}

.ks-hr-upload-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.ks-hr-upload-name {
  font-size: 13px;
  color: #666;
  word-break: break-all;
}

/* ── Навигация ────────────────────────────────────────── */
.ks-hr-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.ks-hr-btn-prev,
.ks-hr-btn-next {
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ks-hr-btn-prev {
  background: #f1f1f1;
  color: #444;
  margin-right: auto;
}
.ks-hr-btn-prev:hover {
  background: #e4e4e4;
}

.ks-hr-btn-next {
  background: #2563eb;
  color: #fff;
  margin-left: auto;
}
.ks-hr-btn-next:hover {
  background: #1d4ed8;
}

/* ── Кнопка отправки ──────────────────────────────────── */
.ks-hr-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  margin-top: 8px;
}

.ks-hr-btn-submit:hover {
  background: #15803d;
}

.ks-hr-btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Успех ────────────────────────────────────────────── */
.ks-hr-success {
  text-align: center;
  padding: 48px 24px;
}

.ks-hr-success__inner {
  display: inline-block;
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 32px 40px;
}

.ks-hr-success__title {
  font-size: 22px;
  font-weight: 700;
  color: #15803d;
  margin: 0 0 10px;
}

.ks-hr-success p {
  margin: 0;
  font-size: 15px;
  color: #333;
}
