/* ==========================================================
   Формы обратной связи НИЯК
   ========================================================== */

.niyak-feedback {
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 1.75rem 1.85rem;
  background: #ffffff;
  border: 1px solid var(--niyak-border, #d7e6e8);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(13, 107, 122, .1);
}

.niyak-feedback__header {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--niyak-teal, #0d6b7a);
}

.niyak-feedback__title {
  margin: 0 0 .35rem;
  color: var(--niyak-teal, #0d6b7a);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.niyak-feedback__subtitle {
  margin: 0;
  color: #5f6e77;
  font-size: .95rem;
  line-height: 1.4;
}

/* --- Плашка предупреждения о МАX для admission / dpo --- */

.niyak-feedback__notice {
  margin: 0 0 1.25rem;
  padding: .9rem 1rem;
  background: linear-gradient(
    135deg, #f4f7f8 0%, #eaf3f4 100%
  );
  border-left: 4px solid var(--niyak-teal, #0d6b7a);
  border-radius: 0 8px 8px 0;
  color: #2c3e50;
  font-size: .88rem;
  line-height: 1.5;
}

.niyak-feedback__notice strong {
  color: var(--niyak-teal, #0d6b7a);
}

/* --- Поля --- */

.niyak-feedback__field {
  margin-bottom: 1rem;
}

.niyak-feedback__field--half {
  display: inline-block;
  width: calc(50% - .5rem);
  vertical-align: top;
}

.niyak-feedback__field--half:first-of-type {
  margin-right: 1rem;
}

@media (max-width: 575.98px) {
  .niyak-feedback__field--half {
    display: block;
    width: 100%;
    margin-right: 0;
  }
}

.niyak-feedback__label {
  display: block;
  margin-bottom: .4rem;
  color: var(--niyak-text, #2c3e50);
  font-size: .9rem;
  font-weight: 600;
}

.niyak-feedback__label--required::after {
  content: " *";
  color: #c33;
  font-weight: 700;
}

.niyak-feedback__input,
.niyak-feedback__textarea,
.niyak-feedback__select {
  display: block;
  width: 100%;
  padding: .65rem .85rem;
  background: #fafcfc;
  border: 1px solid var(--niyak-border, #d7e6e8);
  border-radius: 8px;
  color: var(--niyak-text, #2c3e50);
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.4;
  box-sizing: border-box;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease;
}

.niyak-feedback__input:focus,
.niyak-feedback__textarea:focus,
.niyak-feedback__select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--niyak-teal, #0d6b7a);
  box-shadow: 0 0 0 3px rgba(13, 107, 122, .12);
}

.niyak-feedback__textarea {
  min-height: 120px;
  resize: vertical;
}

.niyak-feedback__help {
  display: block;
  margin-top: .3rem;
  color: #6c757d;
  font-size: .8rem;
  line-height: 1.35;
}

/* --- Ошибки поля --- */

.niyak-feedback__input.is-error,
.niyak-feedback__textarea.is-error,
.niyak-feedback__select.is-error {
  border-color: #c33;
  background: #fef5f5;
}

.niyak-feedback__error {
  display: block;
  margin-top: .3rem;
  color: #c33;
  font-size: .82rem;
  line-height: 1.35;
  font-weight: 600;
}

/* --- Файлы --- */

.niyak-feedback__file-wrap {
  padding: 1rem 1.1rem;
  border: 2px dashed var(--niyak-border, #d7e6e8);
  border-radius: 10px;
  background: #fafcfc;
  transition: border-color .15s ease, background .15s ease;
}

.niyak-feedback__file-wrap:hover {
  border-color: var(--niyak-teal, #0d6b7a);
  background: #f4f7f8;
}

.niyak-feedback__file-input {
  display: block;
  width: 100%;
  padding: .5rem 0;
  color: var(--niyak-text, #2c3e50);
  font-size: .9rem;
  cursor: pointer;
}

.niyak-feedback__file-info {
  margin-top: .5rem;
  color: #6c757d;
  font-size: .8rem;
  line-height: 1.4;
}

/* --- Чекбоксы согласий --- */

.niyak-feedback__checkbox {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .5rem 0;
  cursor: pointer;
  user-select: none;
}

.niyak-feedback__checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: .15rem;
  accent-color: var(--niyak-teal, #0d6b7a);
  cursor: pointer;
}

.niyak-feedback__checkbox-text {
  color: var(--niyak-text, #2c3e50);
  font-size: .85rem;
  line-height: 1.45;
}

.niyak-feedback__checkbox-text a {
  color: var(--niyak-teal, #0d6b7a);
  text-decoration: underline;
}

/* --- Кнопки --- */

.niyak-feedback__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--niyak-border, #d7e6e8);
}

.niyak-feedback__submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  background: var(--niyak-teal, #0d6b7a);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 107, 122, .25);
  transition:
    background-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.niyak-feedback__submit:hover:not(:disabled) {
  background: var(--niyak-teal-dark, #085564);
  box-shadow: 0 6px 18px rgba(13, 107, 122, .35);
  transform: translateY(-1px);
}

.niyak-feedback__submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.niyak-feedback__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: niyak-feedback-spin .8s linear infinite;
}

.niyak-feedback.is-sending .niyak-feedback__spinner {
  display: inline-block;
}

.niyak-feedback.is-sending .niyak-feedback__submit {
  opacity: .8;
}

@keyframes niyak-feedback-spin {
  to { transform: rotate(360deg); }
}

/* --- Скрытая ловушка ботов --- */

.niyak-feedback__honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* --- Ответ после отправки --- */

.niyak-feedback__response {
  display: none;
  margin: 0;
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  line-height: 1.5;
}

.niyak-feedback__response.is-visible {
  display: block;
}

.niyak-feedback__response--success {
  background: linear-gradient(
    135deg, #eaf7ee 0%, #d4efd9 100%
  );
  border: 1px solid #b9dfc5;
  color: #165c32;
}

.niyak-feedback__response--error {
  background: linear-gradient(
    135deg, #fef0f0 0%, #fcdada 100%
  );
  border: 1px solid #f5b5b5;
  color: #7a1e1e;
}

.niyak-feedback__response-title {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.niyak-feedback__response-text {
  margin: 0;
  font-size: .95rem;
}

/* --- Прячем форму после успеха --- */

.niyak-feedback.is-sent .niyak-feedback__form {
  display: none;
}