/* Rosevale property gallery: a photo mosaic on desktop, a swipe strip on phones, and a full-screen viewer.
   Markup comes from the property importer; rv-gallery.js adds the viewer. Components follow the site's own
   language (the HMO page and the Properties to let cards): square corners, uppercase buttons with the arrow,
   navy panels with coral serif prices. Navy #152C47, coral #EC627E, Temeraire headings, Roboto text. */

.rv-gallery{
  --rv-navy:#152C47; --rv-navy-deep:#0C1A2B; --rv-coral:#EC627E; --rv-mist:#EEF1F5; --rv-ink:#152C47;
  --rv-radius:4px; --rv-gap:8px;
  max-width:1120px; margin:24px auto 0; font-family:'Roboto',"Helvetica Neue",Arial,sans-serif; color:var(--rv-ink);
}
.rv-gallery *,.rv-viewer *,.rv-sticky *{box-sizing:border-box}

/* Tiles keep the photos' own 3:2 shape, so a standard photo is shown whole: with an 8px gap, a 2.03 : 1 column
   split and a 2.254 : 1 frame give a 3:2 large tile and two 3:2 small ones. */
.rv-gallery__photos{position:relative;list-style:none;margin:0;padding:0;display:grid;gap:var(--rv-gap);
  grid-template-columns:2.03fr 1fr;grid-template-rows:1fr 1fr;aspect-ratio:2.254/1;border-radius:var(--rv-radius);overflow:hidden;background:var(--rv-mist)}
.rv-gallery__photo{margin:0;min-width:0;min-height:0;position:relative}
.rv-gallery__photo:first-child{grid-row:1 / span 2}
.rv-gallery__photo:nth-child(n+4){display:none}
/* A single photo shows at its own shape. */
.rv-gallery[data-count="1"] .rv-gallery__photos{display:block;aspect-ratio:auto;max-width:760px}
.rv-gallery[data-count="1"] .rv-gallery__photo img{height:auto}
.rv-gallery[data-count="2"] .rv-gallery__photos{grid-template-columns:1fr 1fr;grid-template-rows:1fr}
.rv-gallery[data-count="2"] .rv-gallery__photo:first-child{grid-row:auto}

.rv-gallery__photo a{display:block;width:100%;height:100%;cursor:zoom-in;outline:none;touch-action:manipulation}
.rv-gallery__photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;
  transition:filter .25s cubic-bezier(.16,1,.3,1)}
.rv-gallery__photo a:hover img{filter:brightness(1.06)}
.rv-gallery__photo a:focus-visible::after{content:"";position:absolute;inset:4px;border:3px solid var(--rv-coral);pointer-events:none}

.rv-gallery__count{display:none}

/* The buttons under the photos: square, uppercase, navy, as the site's outline buttons. */
.rv-gallery__bar{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.rv-gallery a.rv-gallery__btn,.rv-gallery a.rv-gallery__btn:visited{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;
  border:1px solid var(--rv-navy);border-radius:2px;background:#fff;color:var(--rv-navy);font:500 13px/1 'Roboto',"Helvetica Neue",Arial,sans-serif;
  letter-spacing:.06em;text-transform:uppercase;text-decoration:none;cursor:pointer;touch-action:manipulation;transition:background-color .2s,color .2s}
.rv-gallery a.rv-gallery__btn:hover{background:var(--rv-navy);color:#fff}
.rv-gallery a.rv-gallery__btn--all,.rv-gallery a.rv-gallery__btn--all:visited{background:var(--rv-navy);color:#fff}
.rv-gallery a.rv-gallery__btn--all:hover{background:#0C1A2B;color:#fff}
.rv-gallery a.rv-gallery__btn:focus-visible{outline:3px solid var(--rv-coral);outline-offset:2px}
.rv-gallery__btn svg{display:none}
.rv-gallery__btn small{font-size:inherit;letter-spacing:inherit;opacity:.7}
.rv-gallery__note{margin:0;align-self:center;padding:0 4px;font-size:15px;color:#4A5463}

/* Phones: one photo at a time, swiped sideways, with a counter. */
@media (max-width:767px){
  .rv-gallery{max-width:none}
  .rv-gallery__frame{position:relative;margin-inline:calc(50% - 50vw)}
  .rv-gallery__photos{display:flex;aspect-ratio:auto;border-radius:0;gap:0;overflow-x:auto;scroll-snap-type:x mandatory;
    overscroll-behavior-x:contain;scrollbar-width:none;background:var(--rv-mist)}
  .rv-gallery__photos::-webkit-scrollbar{display:none}
  .rv-gallery__photo,.rv-gallery__photo:nth-child(n+4){display:block;flex:0 0 100%;aspect-ratio:3/2;scroll-snap-align:start;scroll-snap-stop:always}
  .rv-gallery__photo:first-child{grid-row:auto}
  .rv-gallery__count{display:block;position:absolute;right:12px;bottom:12px;margin:0;padding:6px 10px;border-radius:2px;
    background:var(--rv-navy);color:#fff;font:500 13px/1 'Roboto',sans-serif;letter-spacing:.04em;font-variant-numeric:tabular-nums;pointer-events:none}
  .rv-gallery[data-count="1"] .rv-gallery__count{display:none}
  .rv-gallery[data-count="1"] .rv-gallery__photos{display:block;max-width:none}
  .rv-gallery[data-count="1"] .rv-gallery__photo{aspect-ratio:auto}
  .rv-gallery__bar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  .rv-gallery__note{flex:none;font-size:14px}
  .rv-gallery__bar::-webkit-scrollbar{display:none}
  .rv-gallery a.rv-gallery__btn{flex:none;padding:0 14px}
}

/* Summary under the photos: a navy panel like the Properties to let cards, with the status as a spaced coral
   label, the address in Temeraire, the price in coral and the site's coral and outline buttons. */
.rv-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px 40px;margin-top:12px;padding:24px 28px;
  border-radius:var(--rv-radius);background:var(--rv-navy);color:#fff}
.rv-summary__text{min-width:0}
.rv-summary p{margin:0}
.rv-summary__status{font:500 13px/1.2 'Roboto',"Helvetica Neue",Arial,sans-serif;letter-spacing:.25em;text-transform:uppercase;color:var(--rv-coral);margin-bottom:10px!important}
.rv-summary__facts{margin-top:8px!important;font-size:15px;color:rgba(255,255,255,.85)}
.rv-summary__facts strong{font-weight:500;color:#F48DA2}
.rv-summary__side{display:flex;flex-direction:column;align-items:flex-end;gap:14px}
.rv-summary__price{font:400 34px/1 temeraire,Georgia,serif;color:var(--rv-coral);font-variant-numeric:lining-nums;white-space:nowrap}
.rv-summary__price span{font-size:20px}
.rv-summary__actions{display:flex;flex-wrap:wrap;gap:10px}
.rv-gallery a.rv-summary__cta,.rv-gallery a.rv-summary__call{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:48px;padding:0 24px;
  border-radius:2px;white-space:nowrap;touch-action:manipulation;font:400 15px/1 'Roboto',"Helvetica Neue",Arial,sans-serif;letter-spacing:.03em;
  text-transform:uppercase;text-decoration:none;transition:background-color .2s,color .2s,border-color .2s}
.rv-gallery a.rv-summary__cta,.rv-gallery a.rv-summary__cta:visited{background:var(--rv-coral);color:#fff;border:1px solid var(--rv-coral)}
.rv-gallery a.rv-summary__cta:hover{background:#E04C6B;border-color:#E04C6B;color:#fff}
.rv-gallery a.rv-summary__call,.rv-gallery a.rv-summary__call:visited{border:1px solid #fff;background:transparent;color:#fff}
.rv-gallery a.rv-summary__call:hover{background:#fff;color:var(--rv-navy)}
.rv-gallery a.rv-summary__cta:focus-visible,.rv-gallery a.rv-summary__call:focus-visible{outline:3px solid #fff;outline-offset:3px}
.rv-arrow{display:inline-block;width:13px;height:13px;flex:none;vertical-align:-1px}

/* Phones: a navy bar with the price and Enquire once the summary has scrolled away, until the form is on screen. */
.rv-sticky{position:fixed;left:0;right:0;bottom:0;z-index:999;display:none;align-items:center;justify-content:space-between;gap:12px;
  padding:10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background:#152C47;color:#fff;font-family:'Roboto',"Helvetica Neue",Arial,sans-serif;
  transform:translateY(110%);transition:transform .28s cubic-bezier(.16,1,.3,1)}
.rv-sticky.is-on{transform:none}
.rv-sticky p{margin:0;font:400 24px/1 temeraire,Georgia,serif;color:#EC627E;white-space:nowrap}
.rv-sticky p span{font-size:16px}
.rv-sticky a,.rv-sticky a:visited{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 20px;border-radius:2px;background:#EC627E;color:#fff;
  font:400 14px/1 'Roboto',"Helvetica Neue",Arial,sans-serif;letter-spacing:.04em;text-transform:uppercase;text-decoration:none;touch-action:manipulation}
.rv-sticky a:focus-visible{outline:3px solid #fff;outline-offset:2px}

@media (max-width:767px){
  .rv-summary{grid-template-columns:minmax(0,1fr);margin-top:14px;padding:20px 18px}
  .rv-summary__side{align-items:stretch}
  .rv-summary__actions{width:100%}
  .rv-gallery a.rv-summary__cta,.rv-gallery a.rv-summary__call{flex:1 1 100%}
  .rv-sticky{display:flex}
}
@media (prefers-reduced-motion:reduce){ .rv-sticky{transition:none} }

/* Full-screen viewer, built by rv-gallery.js. */
.rv-viewer{--rv-coral:#EC627E;position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;
  background:#0C1A2B;color:#fff;font-family:'Roboto',"Helvetica Neue",Arial,sans-serif;overflow:clip}
.rv-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr)}
.rv-viewer__top,.rv-viewer__stage,.rv-viewer__thumbs{min-width:0}
.rv-viewer::backdrop{background:#0C1A2B}
.rv-viewer[open]{animation:rv-in .28s cubic-bezier(.16,1,.3,1)}
@keyframes rv-in{from{opacity:0}to{opacity:1}}

.rv-viewer__top{display:flex;align-items:center;gap:16px;padding:10px 12px 10px 20px;min-height:64px}
.rv-viewer__count{margin:0;font-weight:500;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.rv-viewer__title{margin:0;flex:1;min-width:0;font-size:15px;color:#B9C4D3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rv-viewer__close{margin-left:auto}

/* Prefixed with .rv-viewer so the theme's button padding, borders and hover colours can't reach these. */
.rv-viewer .rv-viewer__icon{touch-action:manipulation;display:inline-grid;place-items:center;width:48px;height:48px;padding:0;margin:0;border:0;border-radius:50%;line-height:0;
  background:rgba(255,255,255,.08);color:#fff;box-shadow:none;cursor:pointer;transition:background-color .2s}
.rv-viewer .rv-viewer__icon:hover,.rv-viewer .rv-viewer__icon:focus{background:rgba(255,255,255,.18);color:#fff}
.rv-viewer .rv-viewer__icon:focus-visible{outline:3px solid var(--rv-coral);outline-offset:2px}
.rv-viewer .rv-viewer__icon[disabled]{opacity:.3;cursor:default;background:rgba(255,255,255,.08)}
.rv-viewer .rv-viewer__icon svg{width:22px;height:22px;flex:none}

.rv-viewer__stage{position:relative;min-height:0}
.rv-viewer__track{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior:contain;scrollbar-width:none;outline:none}
.rv-viewer__track::-webkit-scrollbar{display:none}
/* Flex, not grid: the photo's max-height has to resolve against the slide's height, or tall photos run under the thumbnails. */
.rv-viewer__slide{flex:0 0 100%;height:100%;min-height:0;margin:0;display:flex;align-items:center;justify-content:center;padding:16px 72px;scroll-snap-align:center;scroll-snap-stop:always}
.rv-viewer__slide img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;min-width:0;min-height:0;object-fit:contain;border-radius:2px;user-select:none}
.rv-viewer__slide--plan img{background:#fff;padding:12px}
.rv-viewer__prev,.rv-viewer__next{position:absolute;top:50%;transform:translateY(-50%)}
.rv-viewer__prev{left:12px}
.rv-viewer__next{right:12px}

.rv-viewer__thumbs{display:flex;gap:6px;padding:12px 20px 16px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#3A4D66 transparent;justify-content:safe center}
.rv-viewer .rv-viewer__thumb{flex:none;width:84px;aspect-ratio:3/2;padding:0;margin:0;border:0;box-shadow:none;border-radius:4px;overflow:hidden;background:#1B2C42;cursor:pointer;opacity:.55;
  transition:opacity .2s;position:relative}
.rv-viewer__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.rv-viewer .rv-viewer__thumb:hover{opacity:.85}
.rv-viewer .rv-viewer__thumb[aria-current="true"]{opacity:1;box-shadow:inset 0 0 0 2px #fff}
.rv-viewer .rv-viewer__thumb:focus-visible{outline:3px solid var(--rv-coral);outline-offset:2px}
.rv-viewer__thumb span{position:absolute;inset:0;display:grid;place-items:center;background:#fff;color:#152C47;font-size:12px;font-weight:500}

@media (max-width:767px), (max-height:560px){
  .rv-viewer__top{padding:8px 8px 8px 16px;min-height:56px}
  .rv-viewer__slide{padding:0}
  .rv-viewer__slide img{border-radius:0}
  .rv-viewer__thumbs{display:none}
  .rv-viewer__stage{display:grid}
  .rv-viewer__prev,.rv-viewer__next{top:auto;bottom:16px;transform:none}
  .rv-viewer__prev{left:16px}
  .rv-viewer__next{right:16px}
  .rv-viewer[open]{grid-template-rows:auto minmax(0,1fr)}
  .rv-viewer__stage{padding-bottom:80px}
}
@media (prefers-reduced-motion:reduce){
  .rv-viewer[open]{animation:none}
  .rv-gallery__photo img{transition:none}
}
