/* ==========================================================================
   maliya-contracts.css — Форма проверки договоров
   ========================================================================== */

.maliya-contract-form {
  background: var(--white, #fff);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
  padding: 24px;
  max-width: 640px;
  margin: 0 auto;
}

.maliya-contract-form h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-gray, #1f2937);
  margin: 0 0 6px;
}

.maliya-contract-form .form-desc {
  font-size: 13px;
  color: var(--medium-gray, #6b7280);
  margin: 0 0 20px;
  line-height: 1.5;
}

.maliya-form-row {
  margin-bottom: 16px;
}

.maliya-form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark-gray, #1f2937);
  margin-bottom: 5px;
}

.maliya-form-row label .required {
  color: #ef4444;
  margin-inline-start: 2px;
}

.maliya-form-row input,
.maliya-form-row select,
.maliya-form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-gray, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 14px;
  color: var(--dark-gray, #1f2937);
  background: var(--white, #fff);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.maliya-form-row textarea {
  min-height: 100px;
  resize: vertical;
}

.maliya-form-row input:focus,
.maliya-form-row select:focus,
.maliya-form-row textarea:focus {
  outline: none;
  border-color: var(--emerald, #059669);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 10%, transparent);
}

/* Dropzone для файлов */
.maliya-dropzone {
  border: 2px dashed var(--border-gray, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.maliya-dropzone:hover,
.maliya-dropzone.dragover {
  border-color: var(--emerald, #059669);
  background: var(--emerald-50, #ecfdf5);
}

.maliya-dropzone-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--medium-gray, #6b7280);
}

.maliya-dropzone-text {
  font-size: 13px;
  color: var(--medium-gray, #6b7280);
  margin: 0;
}

.maliya-dropzone-text b {
  color: var(--emerald, #059669);
}

.maliya-dropzone-hint {
  font-size: 11px;
  color: var(--medium-gray, #6b7280);
  opacity: 0.6;
  margin-top: 4px;
}

.maliya-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Список прикреплённых файлов */
.maliya-file-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maliya-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--light-gray, #f3f4f6);
  border-radius: 6px;
  font-size: 13px;
}

.maliya-file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maliya-file-item .file-size {
  color: var(--medium-gray, #6b7280);
  font-size: 11px;
  flex-shrink: 0;
}

.maliya-file-item .file-remove {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.maliya-file-item .file-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Чекбокс согласия */
.maliya-checkbox-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.maliya-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--emerald, #059669);
}

.maliya-checkbox-row label {
  font-size: 13px;
  color: var(--medium-gray, #6b7280);
  line-height: 1.5;
  cursor: pointer;
}

/* CAPTCHA */
.maliya-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.maliya-captcha-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-gray, #1f2937);
  white-space: nowrap;
}

.maliya-captcha input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--border-gray, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-size: 14px;
  text-align: center;
}

.maliya-captcha input:focus {
  outline: none;
  border-color: var(--emerald, #059669);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 10%, transparent);
}

/* Кнопка отправки */
.maliya-submit-btn {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm, 8px);
  background: var(--emerald, #059669);
  color: #fff;
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
}

.maliya-submit-btn:hover {
  background: var(--emerald-dark, #047857);
}

.maliya-submit-btn:active {
  transform: scale(0.98);
}

.maliya-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Состояние успеха */
.maliya-form-success {
  text-align: center;
  padding: 40px 24px;
  animation: maliyaFadeIn 0.4s ease;
}

.maliya-form-success .success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--emerald-50, #ecfdf5);
  color: var(--emerald, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.maliya-form-success h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-gray, #1f2937);
  margin: 0 0 8px;
}

.maliya-form-success p {
  font-size: 14px;
  color: var(--medium-gray, #6b7280);
  line-height: 1.6;
  margin: 0;
  max-width: 400px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

/* Ошибка валидации */
.maliya-form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
}

.maliya-form-row.error input,
.maliya-form-row.error select,
.maliya-form-row.error textarea {
  border-color: #ef4444;
}
