/* OnCloud Real Estate — public pages. Colours come from @oncloud/ui tokens (brand, gray, surface, border); dark mode is
   `.dark` on <html>, RTL is [dir=rtl] with logical properties. No inline styles anywhere (CSP). */
:root {
  --re-text: var(--color-gray-900, #18181b);
  --re-muted: var(--color-gray-500, #71717a);
  --re-bg: var(--color-surface-muted, #f5f5f5);
  --re-card: var(--color-surface, #fff);
  --re-line: var(--color-border, #e4e4e7);
  --re-brand: var(--color-brand-600, #155dfc);
  --re-brand-soft: var(--color-brand-50, #eff6ff);
  --re-on-brand: #fff;
  --re-radius: 16px;
  --re-tap: 44px;
}
.dark {
  --re-text: var(--color-gray-100, #f4f4f5);
  --re-muted: var(--color-gray-400, #a1a1aa);
  --re-bg: #121214;
  --re-card: var(--color-surface, #18181b);
  --re-line: #2e2e33;
  --re-brand: var(--color-brand-400, #60a5fa);
  --re-brand-soft: color-mix(in oklab, var(--re-brand) 18%, transparent);
  --re-on-brand: #0b1220;
}
html { background: var(--re-bg); }
.re-body { margin: 0; min-height: 100vh; background: var(--re-bg); color: var(--re-text); font-family: var(--font-sans, "IBM Plex Sans", system-ui, sans-serif); -webkit-font-smoothing: antialiased; }
[dir="rtl"] .re-body { font-family: var(--font-arabic, "IBM Plex Sans Arabic", system-ui, sans-serif); }
.re-app { max-width: 1240px; margin-inline: auto; }
.re-page { padding: 16px 16px 96px; }
.re-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.re-muted { color: var(--re-muted); margin: 0; }
.re-note { color: var(--re-muted); margin: 4px 0 16px; }
.re-h2 { font-size: 1.125rem; font-weight: 700; margin: 0; }
.re-link { background: none; border: 0; padding: 0; color: var(--re-brand); font: inherit; font-weight: 600; cursor: pointer; min-height: var(--re-tap); }
.re-label { font-weight: 600; margin: 0 0 8px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--re-brand); outline-offset: 2px; }

/* Header */
.re-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.re-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.re-logo { height: 36px; width: auto; }
.re-agency { font-size: 1.25rem; font-weight: 700; margin: 0; }
.re-location { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; color: var(--re-muted); font-size: .875rem; }
.re-top-actions { display: flex; align-items: center; gap: 8px; }
.re-lang { background: none; border: 1px solid var(--re-line); color: var(--re-text); border-radius: 999px; padding: 0 12px; min-height: 36px; font: inherit; font-size: .8125rem; cursor: pointer; }
.re-icon-btn { display: inline-grid; place-items: center; min-width: var(--re-tap); min-height: var(--re-tap); border: 1px solid var(--re-line); background: var(--re-card); color: var(--re-text); border-radius: 14px; cursor: pointer; }
.re-round { border-radius: 999px; }
.re-avatar { display: grid; place-items: center; width: var(--re-tap); height: var(--re-tap); border-radius: 999px; border: 0; background: var(--re-brand); color: var(--re-on-brand); cursor: pointer; }

/* Segmented control, search, chips */
.re-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--re-line); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.re-seg-btn { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--re-muted); font: inherit; font-weight: 600; cursor: pointer; }
.re-seg-on { background: var(--re-card); color: var(--re-text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.re-search { display: flex; gap: 8px; margin-bottom: 12px; }
.re-search-field { flex: 1; display: flex; align-items: center; gap: 8px; padding-inline: 14px; min-height: 48px; border: 1px solid var(--re-line); border-radius: 999px; background: var(--re-card); color: var(--re-muted); }
.re-search-input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--re-text); font: inherit; min-width: 0; }
.re-filter-btn { border-radius: 999px; min-width: 48px; min-height: 48px; }
.re-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.re-chip { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--re-line); border-radius: 999px; background: var(--re-card); color: var(--re-text); font: inherit; font-weight: 500; cursor: pointer; }
.re-chip-on { background: var(--re-brand); border-color: var(--re-brand); color: var(--re-on-brand); }

/* Results and cards */
.re-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.re-other { margin: -4px 0 12px; }
.re-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .re-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .re-grid { grid-template-columns: repeat(3, 1fr); } }
.re-card { position: relative; border-radius: var(--re-radius); overflow: hidden; background: var(--re-card); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.re-card-link { display: block; color: inherit; text-decoration: none; }
.re-card-art { position: relative; height: 196px; background: linear-gradient(180deg, color-mix(in oklab, var(--re-brand) 30%, #bfd6ff), color-mix(in oklab, var(--re-brand) 10%, #e9e3ff)); overflow: hidden; }
.re-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.re-art-sun { fill: rgb(255 255 255 / .55); }
.re-art-wall { fill: #eef0f4; }
.re-art-roof { fill: #3f4652; }
.re-art-win { fill: #f4cd4c; }
.re-art-win-dark { fill: #4b5563; }
.dark .re-art-wall { fill: #c7cbd3; }
.re-card-overlay { position: absolute; inset-inline: 0; bottom: 0; padding: 48px 14px 12px; color: #fff; background: linear-gradient(180deg, transparent, rgb(10 14 22 / .6) 35%, rgb(10 14 22 / .88)); }
.re-card-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.re-card-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / .25); align-items: center; }
.re-card-titles { min-width: 0; }
.re-card-title { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.re-card-place { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; font-size: .875rem; opacity: .9; }
.re-price { display: flex; flex-direction: column; align-items: flex-end; text-align: end; flex: none; }
.re-money { font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace); font-weight: 700; letter-spacing: .02em; }
.re-price .re-money { font-size: 1.25rem; }
.re-price-sub { font-size: .8125rem; opacity: .9; }
.re-specs { display: flex; gap: 14px; font-size: .875rem; }
.re-spec { display: inline-flex; align-items: center; gap: 5px; }
.re-when { font-weight: 700; font-size: .875rem; }
.re-badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.re-badge-dark { background: rgb(30 34 44 / .82); color: #fff; }
.re-heart { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: var(--re-tap); height: var(--re-tap); border-radius: 999px; border: 0; background: #fff; color: #18181b; cursor: pointer; box-shadow: 0 1px 3px rgb(0 0 0 / .15); }

/* States */
.re-state { text-align: center; padding: 40px 16px; display: grid; justify-items: center; gap: 10px; }
.re-state-title { font-weight: 700; font-size: 1.125rem; margin: 0; }
.re-state-body { color: var(--re-muted); margin: 0; }
.re-skeleton { pointer-events: none; }
.re-skel-art { height: 196px; background: var(--re-line); }
.re-skel-line { height: 14px; margin: 12px 14px; border-radius: 6px; background: var(--re-line); }
.re-skel-short { width: 40%; }
@media (prefers-reduced-motion: no-preference) {
  .re-skeleton .re-skel-art, .re-skeleton .re-skel-line, .re-unit-hero.re-skeleton { animation: re-pulse 1.4s ease-in-out infinite; }
  @keyframes re-pulse { 50% { opacity: .55; } }
}

/* Buttons */
.re-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--re-tap); padding: 0 16px; border-radius: 999px; border: 1px solid var(--re-line); background: var(--re-card); color: var(--re-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.re-btn-primary { background: var(--re-brand); border-color: var(--re-brand); color: var(--re-on-brand); }
.re-btn-outline { background: var(--re-card); }
.re-btn-block { width: 100%; min-height: 48px; border-radius: 12px; }

/* Tab bar */
.re-tabbar { position: fixed; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--re-card); border-top: 1px solid var(--re-line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.re-tab { display: grid; justify-items: center; gap: 2px; min-height: 52px; background: none; border: 0; color: var(--re-muted); font: inherit; font-size: .75rem; text-decoration: none; cursor: pointer; }
.re-tab-active { color: var(--re-brand); font-weight: 700; }
@media (min-width: 1024px) {
  .re-tabbar { position: sticky; top: 0; bottom: auto; inset-inline: auto; grid-template-columns: repeat(4, auto); justify-content: end; gap: 8px; border: 0; background: transparent; order: -1; margin-bottom: 8px; }
  .re-tab { grid-auto-flow: column; gap: 6px; align-items: center; padding: 0 12px; font-size: .875rem; }
  .re-browse, .re-map { display: flex; flex-direction: column; }
  .re-browse .re-top, .re-map .re-top { order: -2; }
  .re-page { padding-bottom: 32px; }
}

/* Unit page */
.re-unit { padding: 0 0 120px; }
.re-unit-hero { position: relative; height: 300px; overflow: hidden; background: linear-gradient(180deg, color-mix(in oklab, var(--re-brand) 35%, #bcd4ff), color-mix(in oklab, var(--re-brand) 12%, #e8e2ff)); color: #fff; }
.re-unit-hero-text { position: absolute; inset-inline: 0; bottom: 0; padding: 72px 16px 56px; background: linear-gradient(180deg, transparent, rgb(10 14 22 / .55) 35%, rgb(10 14 22 / .85)); display: grid; gap: 4px; justify-items: start; }
.re-unit-bar { position: absolute; inset-inline: 16px; top: 16px; display: flex; justify-content: space-between; z-index: 2; }
.re-unit-bar .re-icon-btn { background: #fff; color: #18181b; border: 0; }
.re-unit-bar-end { display: flex; gap: 8px; }
.re-unit-title { margin: 0; font-size: 1.5rem; font-weight: 700; }
.re-unit-place, .re-unit-media { margin: 0; display: flex; align-items: center; gap: 4px; font-size: .875rem; opacity: .92; }
.re-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 700; margin-top: 4px; }
.re-pill-green { background: #dcfce7; color: #14532d; }
.re-pill-amber { background: #fef3c7; color: #78350f; }
.re-pill-green::before { content: "● "; }
.re-pill-amber::before { content: "▲ "; }
.re-unit-body { padding: 16px; display: grid; gap: 16px; }
.re-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); background: var(--re-card); border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 14px 8px; margin-top: -40px; position: relative; box-shadow: 0 2px 8px rgb(0 0 0 / .06); }
.re-stat { display: grid; justify-items: center; gap: 2px; color: var(--re-brand); }
.re-stat strong { color: var(--re-text); font-size: 1.125rem; }
.re-stat span { color: var(--re-muted); font-size: .8125rem; }
.re-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.re-actions .re-btn { flex: 1 1 auto; }
.re-about-text { margin: 6px 0 0; line-height: 1.6; }
.re-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.re-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.re-tag { padding: 6px 10px; border-radius: 8px; background: var(--re-line); font-size: .8125rem; }
.re-movein { display: flex; align-items: center; gap: 10px; padding: 4px 14px; border: 1px solid var(--re-line); border-radius: 12px; background: var(--re-card); color: var(--re-brand); }
.re-movein span { color: var(--re-text); }
.re-movein strong { color: var(--re-text); flex: 1; }
.re-sticky { position: fixed; inset-inline: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--re-card); border-top: 1px solid var(--re-line); z-index: 5; }
.re-sticky-price { min-width: 0; }
.re-sticky-price p { margin: 0; white-space: nowrap; }
.re-sticky-price .re-price-sub { font-size: .8125rem; color: var(--re-muted); }
.re-money-lg { font-size: 1.25rem; }
/* R1 follow-up: at 390 px the two buttons and the price did not fit one row, so Reserve was cut off. They share the row
   when they fit and the buttons take a row of their own when they don't (larger text, Arabic), never cut. */
.re-sticky-actions { display: flex; gap: 8px; margin-inline-start: auto; }
.re-sticky-actions .re-btn { padding: 0 18px; }
@media (max-width: 420px) {
  .re-sticky-actions { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; }
}
.re-sale-kicker { margin: 0; color: #92400e; font-weight: 700; font-size: .875rem; }
.dark .re-sale-kicker { color: #fbbf24; }
.re-sale-price { margin: 0; font-size: 1.75rem; }
.re-unit-title-dark { margin: 4px 0 0; font-size: 1.375rem; font-weight: 700; }
.re-box { border: 1px solid var(--re-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; background: var(--re-card); }
.re-kv { display: flex; justify-content: space-between; gap: 12px; color: var(--re-muted); }
.re-kv span:last-child { color: var(--re-text); }
.re-stack { display: grid; gap: 10px; }
@media (min-width: 1024px) {
  .re-unit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; padding: 24px 24px 40px; }
  .re-unit-hero-text { padding-bottom: 20px; }
  .re-unit-hero { height: 440px; border-radius: var(--re-radius); grid-row: span 3; position: sticky; top: 24px; }
  .re-unit-body { padding: 0; }
  .re-stats { margin-top: 0; }
  .re-sticky { position: static; border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 16px; margin-top: 16px; grid-column: 2; }
}

/* Map list */
.re-maplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.re-maplist-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--re-card); border: 1px solid var(--re-line); border-radius: 12px; }
.re-maplist-main { display: grid; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }

/* Sheet and toast */
.re-sheet-root { position: fixed; inset: 0; z-index: 20; display: grid; align-items: end; }
.re-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.re-sheet { position: relative; background: var(--re-card); color: var(--re-text); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin-inline: auto; box-sizing: border-box; }
@media (min-width: 720px) { .re-sheet-root { align-items: center; } .re-sheet { border-radius: 20px; } }
.re-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.re-sheet-title { margin: 0; font-size: 1.25rem; }
.re-sheet-body p { line-height: 1.55; }
.re-sheet-actions { display: grid; margin-top: 12px; }
.re-toast { position: fixed; inset-inline: 16px; bottom: 96px; margin-inline: auto; max-width: 360px; padding: 12px 16px; border-radius: 12px; background: #18181b; color: #fff; text-align: center; z-index: 30; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { :root { --re-line: #71717a; --re-muted: #3f3f46; } }
[dir="rtl"] .re-icon-back, [dir="rtl"] .re-icon-nav { transform: scaleX(-1); }
.re-sale-cur { font-size: 1.125rem; font-weight: 600; }
@media (min-width: 1024px) { .re-seg { max-width: 480px; } }

/* The person's display settings (@oncloud/ui 1.2.0 applyDisplay: the shell's C12 classes on <html>). Text size is the
   root font size, set by the package. */
.oc-bold .re-body { font-weight: 500; }
.oc-bold .re-body :is(h1, h2, h3, strong, .re-btn, .re-chip, .re-seg-btn) { font-weight: 800; }
.oc-high-contrast { --re-line: #52525b; --re-muted: #27272a; }
.oc-high-contrast.dark { --re-line: #a1a1aa; --re-muted: #e4e4e7; }
.oc-large-targets { --re-tap: 48px; }
.oc-reduce-motion *, .oc-reduce-motion *::before, .oc-reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
