/* Shared interaction states for the catalog and property pages. */
:root {
  --rio-halo: rgba(41, 130, 209, .22);
  --rio-ring: #1675bb;
  --rio-ease: cubic-bezier(.2,.72,.28,1);
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--rio-ring);
  outline-offset: 3px;
}
.property:focus-within, .home-finder:focus-within {
  box-shadow: 0 0 0 2px var(--rio-halo), 0 12px 32px rgba(13, 67, 109, .12);
}
:where(.bluebtn,.rd-call,.rd-ask,.rd-action,.iconbox,.inquiry-submit,.rd-thumb,.property) {
  transition: box-shadow .18s ease, border-color .18s ease, background-color .18s ease, transform .18s var(--rio-ease);
}
@media (hover:hover) and (pointer:fine) {
  .property:hover { transform:translateY(-3px); box-shadow:0 14px 32px rgba(24,76,118,.16), 0 0 0 1px var(--rio-halo); }
  :is(.bluebtn,.rd-call,.rd-ask,.inquiry-submit,.iconbox,.rd-thumb):hover { box-shadow:0 0 0 3px var(--rio-halo),0 5px 16px rgba(30,106,168,.16); }
}
:is(.bluebtn,.rd-action,.inquiry-submit,.slide-ctrl button,.rd-controls button):active { transform:scale(.97); }
:is([data-save],[data-compare],[data-rd-store])[aria-pressed=true] { box-shadow:0 0 0 2px rgba(43,131,213,.34); }
.rio-toast {
  position:fixed; z-index:1500; left:50%; bottom:max(22px,env(safe-area-inset-bottom));
  transform:translateX(-50%); max-width:calc(100% - 24px); width:max-content;
  display:flex; align-items:center; gap:.85rem; padding:.6rem .75rem .6rem 1rem;
  border:1px solid #6693b7; border-radius:14px; background:#123a58; color:white;
  box-shadow:0 8px 32px #0b315539; font:600 .94rem/1.4 system-ui,sans-serif;
}
.rio-toast a { color:white; text-underline-offset:3px; }
.rio-toast button { background:transparent; color:white; border:0; min-width:36px; min-height:36px; font-size:1.35rem; cursor:pointer; }
.rio-toast[hidden], .rio-notice[hidden] { display:none; }
.rio-notice { margin:1rem auto; padding:1rem; border:1px solid #a0bfd7; border-radius:12px; color:#173c57; background:#f2f8fd; }
.rio-notice p { margin:0 0 .6rem; }
.rio-notice button,.rmap-unavailable button { color:#124e80; background:white; border:1px solid #749bb8; border-radius:8px; min-height:44px; padding:0 .95rem; font:inherit; cursor:pointer; }
.rio-error-page { margin:0; min-height:100vh; display:grid; grid-template-rows:auto 1fr auto; font-family:system-ui,sans-serif; background:#f6f9fc; color:#11324c; }
.rio-error-head,.rio-error-foot { padding:22px max(6vw,20px); background:white; }
.rio-error-head { border-bottom:1px solid #d9e5ee; }
.rio-error-head img { display:block; }
.rio-error-foot { border-top:1px solid #d9e5ee; }
.rio-error-page main { box-sizing:border-box; align-self:center; width:min(100%,68rem); padding:clamp(2rem,6vw,6rem); margin:auto; }
.rio-error-panel { display:grid; grid-template-columns:auto 1fr; gap:clamp(1.5rem,5vw,4.5rem); align-items:center; }
.rio-error-mark { margin:0; font-size:clamp(3.8rem,12vw,10rem); line-height:1; font-weight:750; letter-spacing:-.075em; color:#17598c; text-shadow:0 10px 40px #4c9ddb33; }
.rio-error-copy h1 { font-size:clamp(1.9rem,4vw,3.2rem); line-height:1.07; margin:0; }
.rio-error-copy p { line-height:1.6; max-width:38ch; }
.rio-error-links { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.rio-error-links :is(a,button) { padding:.8rem 1rem; border:1px solid #adc2d4; border-radius:8px; background:white; color:#123d5e; font:600 1rem/1.3 system-ui; cursor:pointer; text-decoration:none; }
.rio-error-links .primary { background:#125587; color:white; border-color:#125587; }
@media(max-width:680px) {
  .rio-error-panel { grid-template-columns:1fr; }
  body:has(.inquiry-dock) .rio-toast { bottom:calc(80px + env(safe-area-inset-bottom)); }
}
@keyframes rio-enter { from { opacity:.45; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@keyframes rio-fade { from {opacity:.4} to {opacity:1} }
@media (prefers-reduced-motion:no-preference) {
  #flymenu:not([hidden]), #filter-body:not([hidden]), .rio-dialog[open], .rd-lightbox[open] .rd-lightbox-frame { animation:rio-enter .2s var(--rio-ease); }
  .rio-toast:not([hidden]), dialog[open]::backdrop { animation:rio-fade .16s ease; }
}
@view-transition { navigation:auto; }
::view-transition-group(root) { animation-duration:.15s; }
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
  ::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation:none !important; }
  .property:hover, :is(.bluebtn,.rd-action,.inquiry-submit,.slide-ctrl button,.rd-controls button):active { transform:none; }
}

/* Applied search criteria, comparison and the route back to a result. */
.catalog-tools {display:grid;gap:12px;margin:14px 0}
.filter-chips,.search-memory {display:flex;gap:8px;flex-wrap:wrap;align-items:start}
.filter-chip,.search-memory button,.search-memory summary,.cmp-switch,.back-results {
  display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:40px;padding:7px 12px;
  border:1px solid #bdd0e0;border-radius:8px;color:#174e79;background:white;text-decoration:none;
  font:600 .9rem/1.35 system-ui,sans-serif;cursor:pointer;overflow-wrap:anywhere;
}
.filter-chip {background:#ebf4fb;border-radius:20px}
.filter-chip span {font-size:1.1rem}
.search-memory details {min-width:0;max-width:100%}
.search-memory summary {list-style:revert;display:list-item}
.search-memory button:disabled {color:#425e70;cursor:default;background:#f1f6f9}
.search-memory ul {list-style:none;margin:6px 0;padding:5px 12px;background:#f5f9fc;border-radius:8px}
.search-memory li {display:flex;align-items:center;gap:8px;justify-content:space-between}
.search-memory li a {padding:8px 0;color:#16517d;overflow-wrap:anywhere}
.search-memory li button {min-width:40px;justify-content:center}
.back-results {margin:0 0 .8rem}
.property.returned-card,.rmap-card.returned-card {outline:3px solid #2084ca;outline-offset:3px;box-shadow:0 0 0 6px #2084ca20}
.cmp-scroll {max-height:68vh;overflow:auto;border:1px solid #cad9e4;border-radius:10px;isolation:isolate}
.cmp-scroll table {border-collapse:separate;border-spacing:0}
.cmp-scroll thead th {position:sticky;top:0;z-index:2;background:#f0f6fa;vertical-align:top}
.cmp-scroll tbody th,.cmp-scroll thead th:first-child {position:sticky;left:0;background:#f0f6fa;min-width:105px;max-width:130px;z-index:1}
.cmp-scroll thead th:first-child {z-index:3}
.cmp-scroll th:has(.cmp-property),.cmp-scroll td {min-width:170px}
.cmp-property.property {display:block;position:relative;margin:0;border:0;box-shadow:none;border-radius:0;background:transparent;transform:none}
.cmp-property>a {display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:3px 8px;padding-right:24px;text-decoration:none;font-size:.84rem;line-height:1.25;color:#143b54}
.cmp-property img {width:46px;height:46px;object-fit:cover;grid-row:1/3;border-radius:5px}
.cmp-property b {color:#165985}
.cmp-property button {position:absolute;top:0;right:0;border:0;background:transparent;color:#385c76;font-size:18px;cursor:pointer}
.only-differences tr[data-identical] {display:none}
.cmp-switch {margin-top:16px}
.cmp-switch input {accent-color:#15598d}
.similar-list {margin:clamp(32px,5vw,68px) 0}
.similar-list h2 {margin-bottom:16px}
.similar-list .cards {grid-template-columns:repeat(4,minmax(0,1fr))}
.inquiry-actions .rd-book,.inquiry-dock .rd-book {min-height:44px;border:1px solid #165787;border-radius:6px;background:#165787;color:white;font:600 1rem system-ui;cursor:pointer;padding:8px 14px}
.inquiry-actions .rd-book {flex:1 0 100%}
.rio-dialog {max-height:85dvh;overflow:auto}
#filter-body .mobile-apply {display:none}
@media(max-width:900px){.similar-list .cards {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
  .inquiry-dock {grid-template-columns:1fr 1fr 1fr}
  .rd-estate .inquiry-dock :is(a,button) {min-width:0;min-height:44px;line-height:1.1;font-size:12px}
  .inquiry-dock svg {display:none}
  #filter-body .mobile-apply {display:inline-flex;gap:.35em;justify-content:center;grid-column:1/-1;min-height:44px}
  .filter-chip,.search-memory summary,.search-memory button {min-height:44px}
  .cmp-scroll td,.cmp-scroll th:has(.cmp-property) {min-width:140px;padding:8px}
  .cmp-scroll tbody th,.cmp-scroll thead th:first-child {min-width:80px;max-width:100px;overflow-wrap:anywhere}
  .cmp-property>a {grid-template-columns:1fr}
  .cmp-property img {grid-row:auto}
}
@media(max-width:480px){.similar-list .cards {grid-template-columns:minmax(0,1fr)}}
