/* Подача объявления, страница статуса и модерация — одна и та же простая вёрстка:
   узкая колонка, крупные поля, никаких модалок. */

.podat {
  padding: 8px 0 72px;
}

.podat__container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.podat__container--narrow {
  max-width: 720px;
}

.podat__head {
  margin-bottom: 28px;
}

.podat__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-700);
}

.podat__head h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.podat__head p {
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ——— форма ——— */
.podat__form {
  display: grid;
  gap: 18px;
}

.podat__section {
  border: 1px solid rgba(20, 24, 26, .08);
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  display: grid;
  gap: 16px;
}

/* Заголовок секции — обычный блок внутри карточки, а не «врезка» в рамку.
   У fieldset здесь display: grid, и штатная legend рисуется браузером в вырезе
   верхней границы: текст ложился прямо на линию рамки и наезжал на неё.
   float снимает с legend особый режим отрисовки — она становится обычным
   элементом сетки и встаёт над полями. */
.podat__section legend {
  float: left;
  width: 100%;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.podat__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.podat__field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.podat__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.podat__field :is(input, select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}

/* Тянуть поле можно, но в пределах: без границ текстовое поле растягивают
   на несколько экранов, и форма перестаёт читаться. Нижняя граница — четыре
   строки, чтобы поле нельзя было сжать в щель. */
.podat__field textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 116px;
  max-height: 340px;
}

.podat__field textarea[rows="5"],
.podat__field textarea[rows="6"] {
  min-height: 140px;
}

.podat__field :is(input, select, textarea):focus {
  outline: none;
  border-color: rgba(31, 107, 54, .45);
  box-shadow: 0 0 0 3px rgba(31, 107, 54, .12);
}

.podat__field input[type="file"] {
  padding: 10px;
  background: #fbfcfb;
}

/* ——— выбор фотографий ——— */
.podat__upload {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 16px;
  border: 1px dashed rgba(20, 24, 26, .18);
  border-radius: 14px;
  background: #fbfcfb;
  transition: border-color .15s ease, background .15s ease;
}

.podat__upload.is-drag {
  border-color: var(--green-700, #1f7a45);
  background: rgba(31, 107, 54, .06);
}

.podat__upload input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

/* Как только заработал скрипт, штатную кнопку браузера прячем: у неё чужой вид
   и она заменяет выбор вместо того, чтобы добавлять к нему. */
.podat__photos-section.is-ready .podat__upload input[type="file"] {
  display: none;
}

.podat__upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid rgba(31, 107, 54, .35);
  border-radius: 12px;
  background: #fff;
  color: var(--green-700, #1f7a45);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.podat__upload-btn:hover,
.podat__upload-btn:focus-visible {
  background: rgba(31, 107, 54, .08);
  border-color: var(--green-700, #1f7a45);
}

.podat__upload-btn i,
.podat__upload-btn svg {
  width: 18px;
  height: 18px;
}

.podat__hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.podat__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.podat__check input {
  width: 20px;
  height: 20px;
  accent-color: var(--green-700);
}

.podat__note {
  font-size: 13px;
  color: var(--muted);
}

.podat__note a { color: var(--green-700); font-weight: 600; }

.podat__photos,
.podat__preview-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.podat__photos img,
.podat__preview-photos img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* ——— превью фотографий ——— */
.podat__photo {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20, 24, 26, .04);
}

.podat__photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.podat__photo-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20, 24, 26, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.podat__photo-badge--new {
  background: var(--green-700, #1f7a45);
}

/* Крестик поверх кадра: у загруженного фото это кнопка формы, у выбранного — обычная
   кнопка скрипта. Выглядят одинаково, потому что для человека это одно действие. */
.podat__photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 26, .62);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}

.podat__photo-remove:hover,
.podat__photo-remove:focus-visible {
  background: #b3261e;
}

.podat__photo-remove svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
}

/* ——— свой выпадающий список ——— */
.podat-select {
  position: relative;
}

/* Без скрипта работает обычный select, поэтому своя кнопка появляется только
   после инициализации — и тогда же прячется нативное поле. */
.podat-select__btn {
  display: none;
}

.podat-select.is-ready select {
  display: none;
}

.podat-select.is-ready .podat-select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.podat-select__btn:hover {
  border-color: rgba(31, 107, 54, .35);
}

.podat-select__btn.is-open {
  border-color: rgba(31, 107, 54, .45);
  box-shadow: 0 0 0 3px rgba(31, 107, 54, .12);
}

.podat-select__btn i,
.podat-select__btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
  transition: transform .15s ease;
}

.podat-select__btn.is-open svg {
  transform: rotate(180deg);
}

.podat-select__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 24, 26, .14);
}

.podat-select__search {
  width: 100%;
  min-height: 38px;
  margin-bottom: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfb;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}

.podat-select__search:focus {
  outline: none;
  border-color: rgba(31, 107, 54, .45);
}

.podat-select__opt {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.podat-select__opt:hover,
.podat-select__opt:focus-visible {
  background: rgba(31, 107, 54, .08);
}

.podat-select__opt.is-active {
  color: var(--green-700, #1f7a45);
  font-weight: 700;
}

/* ——— кнопки ——— */
.podat__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.podat__actions-note {
  font-size: 13px;
  color: var(--muted);
}

.podat__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--green-700);
  border-radius: 12px;
  background: var(--green-700);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.podat__btn:hover { background: #185a2d; color: #fff; }
.podat__btn :is(svg, [data-lucide]) { width: 18px; height: 18px; }

.podat__btn--ghost {
  background: #fff;
  color: var(--green-700);
}
.podat__btn--ghost:hover { background: var(--green-50, #eef5ef); color: var(--green-700); }

.podat__btn--danger {
  background: #fff;
  border-color: #b4443a;
  color: #b4443a;
}
.podat__btn--danger:hover { background: #b4443a; color: #fff; }

/* ——— ошибки и сообщения ——— */
.podat__errors {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(180, 68, 58, .3);
  border-radius: 14px;
  background: #fdf3f2;
  color: #8d3229;
}

.podat__errors ul { margin: 8px 0 0; padding-left: 18px; }
.podat__errors li { margin-top: 4px; }

.podat__flash {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--green-50, #eef5ef);
  color: var(--green-700);
  font-weight: 700;
}

.podat__empty {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px dashed rgba(20, 24, 26, .16);
  color: var(--ink-3);
}

/* ——— предпросмотр ——— */
.podat__preview {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.podat__preview-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.podat__preview-page {
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 24, 26, .08);
}

.podat__preview-page h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.podat__preview-page h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 8px;
}

.podat__preview-page p { color: var(--ink-2); line-height: 1.65; white-space: pre-line; }

.podat__preview-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--green-700);
  margin-bottom: 16px;
}

.podat__preview-list { margin: 0; padding-left: 20px; color: var(--ink-2); }
.podat__preview-list li { margin-top: 6px; }

.podat__preview-meta {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 24, 26, .08);
}

.podat__preview-meta div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.podat__preview-meta span { color: var(--muted); }
.podat__preview-meta strong { color: var(--ink); text-align: right; }

.podat__preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ——— правила и статус ——— */
.podat__rules {
  margin-top: 30px;
  padding: 22px;
  border-radius: 18px;
  background: #f7f8f7;
}

.podat__rules h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.podat__rules ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.podat__rules li { margin-top: 6px; line-height: 1.55; }
.podat__rules p { margin-top: 12px; font-size: 14px; color: var(--muted); }

.podat__status {
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 24, 26, .08);
  margin-bottom: 24px;
}

.podat__status h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin: 12px 0 8px;
}

.podat__status p { color: var(--ink-3); line-height: 1.6; margin-bottom: 16px; }

.podat__status-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-50, #eef5ef);
  color: var(--green-700);
}

.podat__status-ico :is(svg, [data-lucide]) { width: 22px; height: 22px; }
.podat__status--rejected .podat__status-ico { background: #fdf3f2; color: #b4443a; }
.podat__status--pending .podat__status-ico { background: #fdf6ea; color: #9a5f12; }

.podat__keyform { display: flex; gap: 10px; flex-wrap: wrap; }
.podat__keyform input {
  flex: 1;
  min-width: 220px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}

/* ——— модерация ——— */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.admin-tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
}

.admin-tabs__item b { color: var(--muted); font-size: 13px; }
.admin-tabs__item.is-active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.admin-tabs__item.is-active b { color: rgba(255, 255, 255, .8); }

.admin-card {
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 24, 26, .08);
  margin-bottom: 16px;
}

.admin-card__head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.admin-card__head h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.admin-card__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

.admin-card__status {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fdf6ea;
  color: #9a5f12;
}

.admin-card__status--published { background: var(--green-50, #eef5ef); color: var(--green-700); }
.admin-card__status--rejected { background: #fdf3f2; color: #b4443a; }

.admin-card__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.admin-card__photos img { width: 100%; border-radius: 10px; display: block; }
.admin-card__text { color: var(--ink-2); line-height: 1.6; white-space: pre-line; }
.admin-card__list { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }

.admin-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
}

.admin-card__note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f7f8f7;
  font-size: 14px;
  color: var(--ink-2);
}

.admin-card__actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 24, 26, .08);
}

.admin-card__actions input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}

.admin-card__buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-card__link { font-size: 14px; font-weight: 700; color: var(--green-700); }

.admin-card__delete { margin-top: 10px; }
.admin-card__delete-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.admin-card__delete-btn:hover { color: #b4443a; }

/* ——— карточка комментария в админке ——— */
.admin-card.is-waiting {
  border-color: rgba(191, 132, 0, .4);
  background: rgba(255, 196, 0, .05);
}

.admin-card__link {
  font-size: 13px;
  color: var(--green-700, #1f7a45);
  text-decoration: none;
  word-break: break-all;
}

.admin-card__text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-line;
}

.admin-card__reply {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--green-700, #1f7a45);
  border-radius: 0 10px 10px 0;
  background: rgba(31, 107, 54, .05);
}

.admin-card__reply p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}

.admin-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-card__replyform {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.admin-card__replyform textarea {
  width: 100%;
  min-height: 84px;
  max-height: 260px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

/* Заявки и сообщения по объявлению на странице статуса (2026-10-02). */
.podat__inbox { margin: 24px 0; padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.podat__inbox h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; }
.podat__inbox h2 [data-lucide], .podat__inbox h2 svg { width: 20px; height: 20px; color: var(--green-700); }
.podat__inbox-empty { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.55; }
.podat__inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.podat__inbox-item { padding: 14px 16px; border-radius: 12px; background: var(--green-50, #EEF2EA); }
.podat__inbox-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.podat__inbox-kind { font-weight: 700; color: var(--ink-2); }
.podat__inbox-kind.is-order { color: var(--green-700); }
.podat__inbox-who { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 15px; }
.podat__inbox-who a { color: var(--green-700); font-weight: 600; }
.podat__inbox-text { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-line; color: var(--ink); }
