/* ingatlan-detail.css — views/ingatlan/detail.ejs (controllers/ingatlan/assets.js) */
.back { font-weight: 600; font-size: .9rem; text-decoration: none; }
.detail { display: grid; grid-template-columns: 1fr 370px; gap: 28px; margin-top: 12px; }
/* The details on a white sheet, as the offer panel beside them — the skyline drawing showed through the text. */
.detail > section:first-child { background: var(--panel); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
/* The seller's buttons one under the other, with room between. */
.offer .owner-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* The two secondary actions edged in the brand's colours: bringing forward violet, deleting lime. */
button.secondary.edge-violet, button.secondary.edge-violet:hover { box-shadow: inset 0 0 0 2px var(--violet); }
button.secondary.edge-lime, button.secondary.edge-lime:hover { box-shadow: inset 0 0 0 2px var(--lime); }
/* Deleting the listing: a red edge, and red all over on hover. */
button.secondary.edge-danger { box-shadow: inset 0 0 0 2px var(--danger); }
button.secondary.edge-danger:hover, button.secondary.edge-danger:focus-visible { background: var(--danger); color: #fff; box-shadow: inset 0 0 0 2px var(--danger); }

.hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius);
  background: var(--violet-soft); display: block; box-shadow: var(--shadow); }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding: 2px 2px 6px; }
.gallery button { padding: 0; background: none; border-radius: 12px; flex: 0 0 auto; box-shadow: none; overflow: hidden; opacity: .55; transition: opacity .2s; }
.gallery button:hover { transform: none; background: none; box-shadow: none; opacity: .85; }
.gallery button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--violet); }
.report { margin: 8px 0 0; text-align: right; }
/* Reporting the photo shown: a "!" in a triangle at the big photo's bottom right, its words in the help's floating tip, above it. */
.hero-wrap { position: relative; }
.hero-wrap form.report-flag { position: absolute; right: 12px; bottom: 12px; margin: 0; }
.report-flag .help .tip { top: auto; bottom: calc(100% + 8px); width: max-content; max-width: min(240px, 70vw); }
button.flag-x, button.flag-x:hover { width: 30px; height: 30px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
button.flag-x svg { display: block; width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
button.flag-x .tri { fill: #fff; stroke: var(--danger); stroke-width: 2; stroke-linejoin: round; }
button.flag-x .bang { fill: none; stroke: var(--danger); stroke-width: 2.4; stroke-linecap: round; }
button.flag-x:hover .tri, button.flag-x:focus-visible .tri { fill: var(--danger); }
button.flag-x:hover .bang, button.flag-x:focus-visible .bang { stroke: #fff; }
.report button.link { background: none; box-shadow: none; padding: 0; color: var(--muted); font-size: .85rem; font-weight: 700; text-decoration: underline; }
.report button.link:hover { transform: none; background: none; box-shadow: none; color: var(--danger); }
.gallery img { width: 96px; height: 72px; object-fit: cover; display: block; }
h2.title { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; margin: 22px 0 6px; }
.addr { color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.desc { white-space: pre-wrap; font-size: 1rem; line-height: 1.6; max-width: 68ch; }
#map { width: 100%; height: 360px; border-radius: var(--radius); margin-top: 22px; box-shadow: var(--shadow); overflow: hidden; }
.offer { position: sticky; top: 84px; align-self: start; }
.offer h2 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.offer .sticker { font-size: 1.6rem; padding: 6px 16px; }
.offer .when { margin: 14px 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.offer form { margin-top: 6px; }
.offer form button[type=submit] { width: 100%; justify-content: center; margin-top: 10px; }
/* The offer's withdraw ✕ keeps its own size (stat/ingatlan-base.css button.offer-x): the rule above is the stronger selector and
   stretched it across the card — a box wider than the card with a huge cross over it. */
.offer form button.offer-x[type=submit] { width: 26px; height: 26px; margin-top: 0; justify-content: initial; }
/* The seller's own price box framed all round in the yellow that was its top edge. */
.offer.own { box-shadow: var(--shadow), inset 0 0 0 4px var(--sun); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 18px; margin: 18px 0 6px; }
.facts div { margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.dealprice { margin: 6px 0 10px; }
.dealprice .kind { margin-right: 6px; }
.dealoffer { margin-top: 14px; }
.dealoffer h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.floor-plan { margin: 22px 0 8px; }
.floor-plan h3 { margin: 0 0 8px; }
.floor-plan h4.fp-level { margin: 14px 0 6px; font-size: .95rem; }
.fp-view { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 10px; }
.fp-view svg { display: block; width: 100%; height: auto; max-height: 70vh; font-family: inherit; }
/* A suspended listing, as its seller sees it: greyed out, stamped with the day. */
.detail.suspended > section > :not(.suspended-stamp) { filter: grayscale(1); opacity: .5; }
.suspended-stamp { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: var(--shape); background: var(--ink);
  color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
form.mod-suspend { margin: 0 0 12px; }
form.mod-suspend button { padding: 7px 14px; font-size: .82rem; background: var(--danger); }
.viewing { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--soft-line); }
.viewing h2 { margin-top: 0; }
/* Questions: a ticket's comments — author, attribute and time over each message; one-line inputs. */
.questions { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--soft-line); }
.questions h2 { margin-top: 0; }
/* The heading with its "?", the walk figure with its "?". */
.questions .with-help h2 { margin-bottom: 0; }
.with-help.walk { margin: 12px 0 6px; }
.with-help.walk p { margin: 0; }
.qa-thread { list-style: none; margin: 10px 0; padding: 0 0 0 14px; border-left: 3px solid var(--violet-soft); }
.qa-msg { margin: 0 0 12px; }
.qa-msg p { margin: 4px 0 0; font-size: .92rem; overflow-wrap: anywhere; }
.qa-msg.qa-own .qa-head strong { color: var(--violet); }
.qa-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.qa-head time { color: var(--muted); }
.qa-ticket { margin: 14px 0; padding: 12px 14px; background: var(--panel); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.qa-form select { margin: 8px 0; }
.qa-line { display: flex; gap: 8px; }
.qa-line input { flex: 1 1 0; min-width: 0; }
/* The aside's .offer forms make their submit full width; not this one. */
.offer form .qa-line button[type=submit], .qa-line button[type=submit] { flex: 0 0 auto; width: auto; margin-top: 0; }
/* The moderators' thread: the button on its own line under the field, which then takes the full width. */
.qa-line.stack { flex-direction: column; }
.qa-line.stack button[type=submit] { align-self: flex-end; }
.vdays { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; }
.vdays li, .vdays label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; font-size: .92rem; color: var(--ink); font-weight: 500; }
.vdays label input { width: auto; margin-right: 8px; accent-color: var(--violet); }
.vdays label span { flex: 1; }
.vdays form { margin: 0; }
.vdays button.link, .report button.link { background: none; box-shadow: none; padding: 0; color: var(--muted); font-size: .85rem; font-weight: 700; text-decoration: underline; }
.vdays button.link:hover { transform: none; background: none; box-shadow: none; color: var(--danger); }
.vdays .vfull { flex: 1; padding-left: 30px; color: var(--muted); }
.vbook button[type=submit] { width: 100%; justify-content: center; margin-top: 10px; }
.mine { background: #fff4cc; border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } .offer { position: static; } }
/* The typical price nearby (KSH): at most two lines, the limited note and the source under them. */
.market { margin: 0 0 14px; }
.market p { margin: 0 0 4px; }
.market .hint { margin-top: 4px; }
.market .limited { color: #8a5a00; }
.market .market-where { margin-top: 8px; font-weight: 600; }
.market-table { border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.market-table th, .market-table td { padding: 2px 14px 2px 0; text-align: right; font-weight: normal; vertical-align: top; }
.market-table td { white-space: nowrap; }
.market-table tr > th:first-child { text-align: left; }
.market-table tr:first-child th { font-size: .85em; opacity: .8; }
.market-table td:last-child { font-weight: 600; }
.market-table tr.own th, .market-table tr.own td { border-top: 1px solid currentColor; padding-top: 4px; font-weight: 700; }
/* The nearby places' pictograms before their lines. */
.poi-chip { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; flex: none; }
details > summary:has(.poi-chip) { display: flex; align-items: center; gap: 10px; list-style: none; }
details > summary:has(.poi-chip)::-webkit-details-marker { display: none; }
/* The open/closed caret, at the line's end (a flex summary loses the browser's own). */
details > summary:has(.poi-chip)::after { content: '▸'; margin-left: auto; color: var(--muted); transition: transform .15s; }
details[open] > summary:has(.poi-chip)::after { transform: rotate(90deg); }
/* "emelem" from "ajánlataim" lands on the offer form: clear of the sticky header. */
#ajanlat { scroll-margin-top: 96px; }
/* The last free live offer's question: a small notice, as the list page's. */
/* One's offer with its red ✕ to take it back. */
.mine.with-x { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* The seller's buttons the card's full width: the links, bringing the deadline forward, closing now / deleting. */
.offer.own .owner-actions { align-items: stretch; }
.offer.own .owner-actions .btn, .offer.own #deadlineForm > button, .offer.own #closeForm > button, .offer.own #withdrawForm > button {
  width: 100%; justify-content: center; }
/* The map button at the end of the address line; the comparison price table the section's width. */
.addr, .gps { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.addr a.btn, .gps a.btn { padding: 6px 14px; font-size: .8rem; }
.market-table { width: 100%; }
.market-table th, .market-table td { padding-right: 0; }
.market-table tr > :not(:last-child) { padding-right: 14px; }

/* A valuation the quality guard holds — the moderators' box (views/ingatlan/detail.ejs, controllers/ingatlan/valuationIssues.js). */
#valuation-quality.warn { border-left: 4px solid #e8b100; padding: 6px 10px; background: #fff8e1; margin: 8px 0; }
#valuation-quality.warn form { display: inline; }

/* The price's VAT row: the whole width of the facts, its reason behind a "?". */
/* A derived fact with its "?" (the price's VAT, the comfort grade): a row of its own, so the tip has room. */
.facts .vat-fact, .facts .derived-fact { grid-column: 1 / -1; display: block; }
.facts .vat-fact dd, .facts .derived-fact dd { display: inline-flex; align-items: center; gap: 8px; }
/* A rent's utility bills (propertyFacts.js utilityBillsView): the period, the kinds' table, the average below — a row of its own. */
.facts .bills-fact { grid-column: 1 / -1; display: block; }
.facts .bills-fact table.bills { border-collapse: collapse; margin: 6px 0 4px; max-width: 100%; }
.facts .bills-fact table.bills th, .facts .bills-fact table.bills td { padding: 3px 12px 3px 0; text-align: left; font-weight: normal; }
.facts .bills-fact table.bills thead th { font-size: 0.85em; opacity: 0.75; }
.facts .bills-fact table.bills td { text-align: right; white-space: nowrap; }
.facts .bills-fact .hint { display: block; }
/* The asking price's green box: square at the left. */
.dealprice .sticker { border-top-left-radius: 0; border-bottom-left-radius: 0; }
/* The valuations' buttons in the offer's card, under the offer. */
aside.offer .valuation-offers { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid #ece6db; display: grid; gap: 8px; }
aside.offer .valuation-offers form { margin: 0; }
aside.offer .valuation-offers .btn.lime, aside.offer .valuation-offers button.btn.lime { width: 100%; justify-content: center; }
/* Outstandingly green surroundings. */
.green-badge { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: #e7f5e9; border: 1px solid #9fd3a8; }
.green-badge .hint { display: block; margin-top: 4px; }

/* The appraiser-only facts the seller may publish. */
.publish-facts { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: #f6f2ff; display: grid; gap: 8px; }
.publish-facts label.check { display: flex; gap: 8px; align-items: center; }
.publish-facts .btn { justify-self: start; }
/* What is sold on top of the price. */
.dealprice .price-add { display: block; margin-top: 4px; font-weight: 600; }

/* The next-step nudge
   — views/ingatlan/detail.ejs: beside the button pointing left and swaying sideways, or above it pointing down and swaying up and down;
   three sways, then still, gone after about 6 s; the button's one violet halo. Reduced motion: shown still. */
.nudge-arrow { position: absolute; z-index: 60; width: 40px; height: 40px; color: var(--violet); pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(60, 20, 140, .25)); opacity: 0; }
.nudge-arrow svg { display: block; }
.nudge-h svg { transform: rotate(90deg); }          /* beside on the right, pointing left */
.nudge-h.nudge-right svg { transform: rotate(-90deg); } /* beside on the left, pointing right */
.nudge-v.nudge-up svg { transform: rotate(180deg); }    /* below, pointing up */
.nudge-h { animation: nudge-in-h .35s ease-out forwards, nudge-sway-h .53s ease-in-out .35s 3; }
.nudge-v { animation: nudge-in-v .35s ease-out forwards, nudge-sway-v .53s ease-in-out .35s 3; }
.nudge-arrow.nudge-still { animation: none; opacity: 1; }
.nudge-arrow.nudge-out { transition: opacity .35s ease; opacity: 0 !important; animation: none; }
@keyframes nudge-in-h { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes nudge-in-v { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nudge-sway-h { 0%, 100% { opacity: 1; transform: translateX(0); } 50% { opacity: 1; transform: translateX(7px); } }
@keyframes nudge-sway-v { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-7px); } }
.nudge-halo { animation: nudge-halo 1.2s ease-out 1; }
@keyframes nudge-halo { 0% { box-shadow: 0 0 0 0 rgba(107, 44, 255, .55); } 100% { box-shadow: 0 0 0 14px rgba(107, 44, 255, 0); } }
@media (prefers-reduced-motion: reduce) {
  .nudge-arrow, .nudge-h, .nudge-v { animation: none !important; opacity: 1; }
  .nudge-halo { animation: none; box-shadow: 0 0 0 3px rgba(107, 44, 255, .45); }
}
