/*
 * Публичный сервис рекламаций (/reclamation/) — стили формы и загрузчика.
 *
 * Построен на дизайн-системе портала (variables/base/layout/components),
 * подключаются страницей по абсолютным путям /portal/assets/css/*.
 * Порт старого upload.css (классы ev-*) + оформление формы.
 */

/* --------------------------------------------------------------------------
 * Форма заявки
 * ------------------------------------------------------------------------ */
.reclamation-form .req,
.reclamation-form__required-note {
  color: var(--danger);
}

.btn--lg {
  padding: 12px 28px;
  font-size: var(--fs-lg);
}

.reclamation-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}

.reclamation-form__field--full {
  grid-column: 1 / -1;
}

.reclamation-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.reclamation-form legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: var(--space-2);
}

.reclamation-form__required-note {
  font-size: var(--fs-sm);
}

.reclamation-form__warning {
  color: var(--danger);
  min-height: 1.2em;
  margin: var(--space-2) 0 0;
}

/* Чекбоксы подтверждения — друг под другом, с отступами */
.reclamation-form .checkbox {
  display: flex;
  margin-bottom: var(--space-3);
}

/* Виджет капчи — фиксированная ширина, не во всю ширину карточки */
.reclamation-form .captcha-wrapper {
  max-width: 450px;
}

.reclamation-errors {
  margin: var(--space-2) 0 0;
  padding-left: 20px;
}

/* Плашки-переключатели (положение бака) */
.reclamation-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.reclamation-tiles__item {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.reclamation-tiles__item:hover {
  border-color: var(--brand);
}

.reclamation-tiles__item input {
  accent-color: var(--brand);
  margin-right: 8px;
}

.reclamation-tiles__item:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* --------------------------------------------------------------------------
 * Загрузчик фото/видео (порт upload.css)
 * ------------------------------------------------------------------------ */
.ev-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-alt);
  transition: border-color 0.3s, background 0.3s;
}

.ev-upload-zone:hover,
.ev-upload-zone.ev-dragover {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.ev-upload-zone p {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--text-muted);
}

.ev-upload-zone small {
  color: var(--text-faint);
  font-size: var(--fs-xs);
}

.ev-upload-zone input[type="file"] {
  display: none;
}

.ev-file-counter {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: 6px;
}

.ev-file-list {
  margin-top: 10px;
}

.ev-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin: 4px 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.ev-file-item:hover {
  background: var(--brand-tint);
  border-color: var(--brand);
}

.ev-file-item.ev-file-dragging {
  opacity: 0.55;
}

.ev-file-item.ev-file-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.ev-file-item .ev-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.ev-file-item .ev-file-drag-handle {
  color: var(--text-faint);
  cursor: move;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.ev-file-item .ev-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

.ev-file-item .ev-file-size {
  color: var(--text-faint);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.ev-file-item .ev-file-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  padding: 0 6px;
  line-height: 1;
}

.ev-file-item .ev-file-delete:hover {
  color: var(--danger-hover);
}

.ev-upload-error {
  color: var(--danger);
  font-size: var(--fs-xs);
  margin-top: 4px;
}

.ev-file-item.ev-required-marker::before {
  content: "*";
  color: var(--danger);
  font-weight: bold;
  margin-right: 4px;
}

/* --------------------------------------------------------------------------
 * Адаптив
 * ------------------------------------------------------------------------ */
@media (max-width: 720px) {
  .reclamation-form__grid {
    grid-template-columns: 1fr;
  }

  .reclamation-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
}
