/* WIP015 | shared Home/Browse media, stable layout and archive-safe gallery.
   Loaded only with the existing public surface; no change to legacy admin CSS. */
.srrm-public-surface .srrm-public-card__media{display:grid;place-items:center;position:relative;min-width:0;width:100%;min-height:120px;overflow:hidden;border-radius:12px;background:#f2f6f9;color:#59758a;text-decoration:none}
.srrm-public-surface .srrm-public-card__photo{display:block;width:100%;max-width:100%;aspect-ratio:4/3;object-fit:contain;background:#f2f6f9}
.srrm-public-surface .srrm-public-card__fallback{display:grid;place-items:center;width:100%;min-height:120px;color:#526d80;text-align:center;padding:12px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.srrm-public-surface .srrm-public-card__title{font-size:clamp(16px,1.8vw,21px);line-height:1.55;font-weight:750;margin-block:0 10px;overflow-wrap:anywhere}
.srrm-public-surface .srrm-public-card__title a{color:inherit;text-decoration:none}
.srrm-public-surface .srrm-public-card__title a:hover{text-decoration:underline}
.srrm-public-surface .srrm-public-card__price{font-weight:800;font-size:clamp(16px,1.8vw,21px);font-variant-numeric:tabular-nums;unicode-bidi:isolate;overflow-wrap:anywhere}
.srrm-public-surface .srrm-public-card__price.is-unpriced{font-weight:550;font-size:15px;color:#506476}
.srrm-public-surface .srrm-gallery--shared{max-width:100%;min-width:0}
.srrm-public-surface .srrm-gallery__rail{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding:10px 2px}
.srrm-public-surface .srrm-gallery__thumb{scroll-snap-align:start}
.srrm-public-surface .srrm-gallery__thumb[aria-pressed="true"]{outline:2px solid #075987;outline-offset:-2px}
.srrm-public-surface .srrm-gallery__empty{min-height:160px;border:1px dashed #c4d6df;background:#f4f8fa;border-radius:12px}
.srrm-public-surface .srrm-gallery__thumb--historic{cursor:default}
.srrm-public-surface .srrm-home-card__media{min-height:170px}
.srrm-public-surface .srrm-ad-card__media{min-height:125px}
@media(max-width:767px){.srrm-public-surface .srrm-ad-card .col-sm-2{padding:0;margin-bottom:12px}.srrm-public-surface .srrm-public-card__media{min-height:160px}.srrm-public-surface .srrm-gallery__rail{gap:6px}}
@media(prefers-reduced-motion:reduce){.srrm-public-surface .srrm-gallery__rail{scroll-behavior:auto}}

/* One fullscreen media viewer shared across both detail routes. */
.srrm-gallery-viewer{position:fixed;z-index:2147483200;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:calc(env(safe-area-inset-top,0px) + 10px) 10px calc(env(safe-area-inset-bottom,0px) + 10px);background:rgba(4,15,24,.96);color:#fff}
.srrm-gallery-viewer__controls{display:flex;align-items:center;justify-content:center;gap:clamp(6px,2vw,18px);width:100%;max-width:1000px;padding:7px 4px}
.srrm-gallery-viewer button{min-height:48px;min-width:60px;background:#18394e;border:1px solid #7494a6;border-radius:9px;color:#fff;font-weight:650}
.srrm-gallery-viewer button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.srrm-gallery-viewer__counter{font-variant-numeric:tabular-nums;min-width:58px;text-align:center;direction:ltr}
.srrm-gallery-viewer__image{width:auto;max-width:100%;height:auto;max-height:calc(100dvh - 116px);object-fit:contain;flex:0 1 auto}
.srrm-public-surface .srrm-gallery__main[role="button"]{cursor:zoom-in}
.srrm-public-surface .srrm-gallery__main:focus-visible{outline:3px solid #075987;outline-offset:3px}

/* The same unavailable-photo state applies to active/archived thumbnails,
   without inventing a current primary photo for historical advertisements. */
.srrm-public-surface .srrm-gallery__thumb .srrm-public-card__fallback,
.srrm-public-detail .srrm-gallery__thumb .srrm-public-card__fallback{min-height:70px;font-size:12px;line-height:1.4;padding:4px}
/* WIP016: results toolbar remains readable in mobile WebView & RTL. */
.srrm-browse-toolbar{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:1rem 0;padding:.75rem 1rem;border:1px solid #dce4ec;border-radius:14px;background:var(--srrm-surface,#fff)}
.srrm-browse-toolbar .srrm-browse-total{margin:0;font-weight:700;unicode-bidi:isolate}
.srrm-browse-sort-form{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
.srrm-browse-sort-form label{margin:0;white-space:nowrap;font-size:1rem}
.srrm-browse-sort-form .form-control{height:44px;min-width:200px;font-size:1rem}
.srrm-browse-sort-form .btn{min-height:44px}
@media(max-width:767px){.srrm-browse-toolbar,.srrm-browse-sort-form{width:100%}.srrm-browse-sort-form .form-control{flex:1;min-width:0}}

/* Shared rating status: one accessible state on desktop, mobile and WebView. */
.srrm-public-surface .srrm-rating-btn[disabled],.srrm-legacy-app-detail .srrm-rating-btn[disabled]{opacity:.55;cursor:wait;pointer-events:none}
.srrm-public-surface .srrm-rating-feedback,.srrm-legacy-app-detail .srrm-rating-feedback{display:block;min-height:1.4em;font-size:14px;line-height:1.5;margin-block-start:6px;overflow-wrap:anywhere}
.srrm-public-surface .srrm-browse-filter-warning{padding:12px 16px;border-inline-start:4px solid currentColor;border-radius:8px;margin:12px 0;font-size:16px;line-height:1.6}

/* Browser and verified App: real phone/email links only when parent controller
 * permits public contact. Do not transform archived or withheld contact rows. */
.srrm-public-surface .srrm-public-contact-link,.srrm-legacy-app-detail .srrm-public-contact-link{display:inline-flex;align-items:center;min-height:44px;max-width:100%;overflow-wrap:anywhere;text-underline-offset:3px}
.srrm-public-surface .srrm-public-contact-link:focus-visible,.srrm-legacy-app-detail .srrm-public-contact-link:focus-visible{outline:3px solid currentColor;outline-offset:3px}

/* Keyboard search, pending dependent facets and app-like mobile interactions. */
.srrm-public-surface .srrm-search-ui__search:focus-visible,
.srrm-public-surface .srrm-search-ui__option:focus-visible{outline:3px solid #075987;outline-offset:2px}
.srrm-public-surface .srrm-search-ui__combobox input:disabled{opacity:.68;cursor:progress}
.srrm-public-surface .srrm-search-ui__option[aria-selected="true"]{font-weight:800}
