/* Listing form helpers and listing-page map (habaru-core). Uses the theme's colour tokens. */

/* ---------- Description ---------- */
.desc-help__tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.desc-help__diff { margin: 10px 0; padding: 12px; border: 1px solid var(--line-strong, #D6D0C2); border-radius: var(--radius-sm, 10px); background: var(--surface, #fff); }
.desc-help__title { margin: 0 0 8px; font-weight: 700; }
.desc-help__cols { display: grid; gap: 10px; }
@media (min-width: 640px) { .desc-help__cols { grid-template-columns: 1fr 1fr; } }
.desc-help__cols b { font-size: 13px; color: var(--muted, #5E6656); text-transform: uppercase; letter-spacing: .3px; }
.desc-help__text { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: var(--field, #F4F2EC); white-space: pre-wrap; font-size: 15px; line-height: 1.45; max-height: 240px; overflow: auto; }
.desc-help__cols > div:last-child .desc-help__text { background: var(--green-tint, #E5F4E7); }
.desc-help__changes { margin: 10px 0; padding-left: 20px; font-size: 14px; color: var(--ink-2, #3F4739); }
.desc-checks { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 4px; }
.desc-checks__item { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.4; }
.desc-checks__item::before { position: absolute; left: 2px; top: 0; font-weight: 700; }
.desc-checks__item--ok { color: var(--green-dark, #086515); }
.desc-checks__item--ok::before { content: "✓"; }
.desc-checks__item--tip { color: var(--ink-2, #3F4739); }
.desc-checks__item--tip::before { content: "○"; color: var(--muted, #5E6656); }
.desc-checks__item--warn, .desc-checks__item--bad { color: #8A2E1E; }
.desc-checks__item--warn::before, .desc-checks__item--bad::before { content: "!"; }

/* ---------- Photos ---------- */
.photos-step__tip { margin: 4px 0 8px; padding: 10px 12px; border-left: 4px solid var(--orange, #FF8500); border-radius: 0 8px 8px 0; background: var(--orange-tint, #FFF0DC); font-size: 15px; }
.pics { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 10px; }
.pics__item { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px; border: 1px solid var(--line, #E6E1D6); border-radius: var(--radius-sm, 10px); background: var(--surface, #fff); }
.pics__item.has-flags { border-color: #E2B07A; }
.pics__img { position: relative; }
.pics__img img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.pics__star { position: absolute; top: 4px; right: 4px; }
.pics__star input { position: absolute; opacity: 0; width: 36px; height: 36px; margin: 0; cursor: pointer; }
.pics__star span[aria-hidden] { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(22, 38, 15, .55); color: #fff; font-size: 20px; line-height: 1; }
.pics__star input:checked + span { background: var(--orange, #FF8500); color: var(--ink, #16260F); }
.pics__star input:focus-visible + span { outline: 3px solid var(--green, #0B861C); outline-offset: 2px; }
.pics__fields { display: grid; gap: 6px; align-content: start; min-width: 0; }
.input--sm { min-height: 40px; padding: 6px 10px; font-size: 15px; }
select.input--sm { padding-right: 34px; }
.pics__flag { display: block; padding: 3px 8px; border-radius: 6px; background: var(--orange-tint, #FFF0DC); color: var(--orange-text, #9A5300); font-size: 13px; font-weight: 700; }
.pics__remove { display: flex; gap: 6px; align-items: center; font-size: 14px; min-height: 36px; }
.pics__auto { margin: 4px 0 10px; font-size: 14px; }
.pics__add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pics__kind { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pics__kind .input { width: auto; }
.pics__checks { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.pics__check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pics__check img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pics__check--ok { color: var(--green-dark, #086515); }
.pics__check--warn { color: var(--orange-text, #9A5300); }
.pics__check--bad { color: #8A2E1E; font-weight: 700; }
.tag--real { display: inline-block; background: var(--green-tint, #E5F4E7); color: var(--green-dark, #086515); text-transform: none; font-size: 13px; letter-spacing: 0; padding: 4px 8px; }

/* ---------- Map picker ---------- */
.geo__search { display: flex; gap: 8px; margin: 8px 0; }
.geo__search .input { flex: 1; min-width: 0; }
.geo__results { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line, #E6E1D6); border-radius: var(--radius-sm, 10px); background: var(--surface, #fff); overflow: hidden; }
.geo__results li { border-top: 1px solid var(--line, #E6E1D6); }
.geo__results li:first-child { border-top: 0; }
.geo__results .muted { padding: 10px 12px; }
.geo__result { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink, #16260F); cursor: pointer; }
.geo__result:hover, .geo__result:focus-visible { background: var(--green-tint, #E5F4E7); }
.geo__map { height: 300px; margin: 8px 0; border-radius: var(--radius-sm, 10px); border: 1px solid var(--line-strong, #D6D0C2); z-index: 0; }
.geo__warn { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--orange-tint, #FFF0DC); color: #7A3F00; font-size: 14px; font-weight: 700; }
.geo__addr { margin: 6px 0; font-size: 14px; color: var(--ink-2, #3F4739); }
.geo__buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.geo__manual { margin-top: 8px; font-size: 14px; }
.geo__manual summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--muted, #5E6656); }
.geo__manual .geo__coords { margin-top: 6px; }

/* ---------- Map on a listing page ---------- */
.place-map { margin: 12px 0 4px; }
.place-map__open { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 96px; border: 1px dashed var(--line-strong, #D6D0C2); border-radius: var(--radius-sm, 10px); background: var(--green-tint, #E5F4E7) repeating-linear-gradient(45deg, transparent 0 14px, rgba(11, 134, 28, .05) 14px 28px); color: var(--green-dark, #086515); font: 700 15px/1.3 var(--body, sans-serif); cursor: pointer; }
.place-map__box { height: 240px; border-radius: var(--radius-sm, 10px); border: 1px solid var(--line-strong, #D6D0C2); z-index: 0; }
.place-map__note { margin: 6px 0 0; font-size: 13px; color: var(--muted, #5E6656); }

/* Gallery: photo type on the thumbnail, "real photos" badge. */
.gallery__kind { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 5px; background: rgba(22, 38, 15, .72); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.gallery li { position: relative; }
.real-photos { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px; background: var(--green-tint, #E5F4E7); color: var(--green-dark, #086515); font-size: 14px; font-weight: 700; }

/* "hidden" wins over the display rules above. */
.geo__search[hidden], .place-map__open[hidden], .desc-help[hidden], .desc-help__diff[hidden], .geo__map[hidden], .place-map__box[hidden] { display: none; }
