/* Property photo mosaic and gallery viewer. */
.ip-review { max-width: 1440px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #536079; font: 13px/1.4 Roboto, Arial, sans-serif; }
.ip-review a { color: #455682; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.ip-gallery { position: relative; margin: 0 auto 28px; scroll-margin-top: 24px; }
.ip-empty {
  display: grid;
  min-height: clamp(176px, 23vw, 320px);
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  background: #eef1f6;
  color: #4c6078;
  text-align: center;
}
.ip-empty .fa { font-size: 30px; }
.ip-empty p { margin: 0; font-size: 16px; }
.ip-mosaic { position: relative; display: grid; width: 100%; aspect-ratio: 8 / 3; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; overflow: hidden; border-radius: 10px; background: #fff; }
.ip-gallery .ip-tile { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; border-radius: 0; padding: 0; margin: 0; overflow: hidden; background: #eef1f6; cursor: zoom-in; }
.ip-tile:first-child { grid-row: 1 / 3; }
.ip-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
.ip-tile:nth-child(3) { grid-column: 3; grid-row: 1; }
.ip-tile:nth-child(4) { grid-column: 2; grid-row: 2; }
.ip-tile:nth-child(5) { grid-column: 3; grid-row: 2; }
.ip-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, filter .25s ease; }
.ip-tile:hover img { transform: scale(1.025); filter: brightness(.96); }
.ip-gallery .ip-all { position: absolute; bottom: 22px; inset-inline-end: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 12px 18px; border: 1px solid #dfe3eb; border-radius: 6px; background: #fff; color: #243248; font: 500 14px/1.3 Roboto, Arial, sans-serif; box-shadow: 0 2px 10px #0002; cursor: pointer; }
.ip-gallery :is(button,input,select,textarea,a):focus-visible { outline: 3px solid var(--invista-brand-blue); outline-offset: 2px; }
.ip-gallery .ip-tile:focus-visible { outline-offset: -4px; }
.ip-mosaic[data-ip-count="1"] { grid-template-columns: 1fr; }
.ip-mosaic[data-ip-count="2"] { grid-template-columns: 1fr 1fr; }
.ip-mosaic[data-ip-count="2"] .ip-tile:nth-child(2) { grid-row: 1 / 3; }
.ip-mosaic[data-ip-count="3"] { grid-template-columns: 1fr 1fr; }
.ip-mosaic[data-ip-count="3"] .ip-tile:nth-child(3) { grid-column: 2; grid-row: 2; }
.ip-mosaic[data-ip-count="4"] .ip-tile:nth-child(3) { grid-row: 1 / 3; }

.ip-lightbox { position: fixed; inset: 0; width: min(1450px, 100%); max-width: 1450px; height: min(800px, calc(100dvh - 40px)); max-height: none; margin: auto; padding: 0; border: 0; border-radius: 10px; overflow: hidden; color: #fff; background: #142139; box-shadow: 0 12px 60px #0003; font: 14px/1.45 Roboto, Arial, sans-serif; }
.ip-lightbox[open] { display: block; }
.ip-lightbox::backdrop { background: rgb(0 0 0 / .46); }
.ip-lightbox-image { position: relative; display: flex; height: 100%; align-items: center; justify-content: center; overflow: hidden; }
.ip-lightbox-image > img { display: block; width: 100%; height: 100%; object-fit: contain; touch-action: pan-y pinch-zoom; }
@media (min-width: 768px) {
  .ip-lightbox[data-ip-image-fit="cover"] .ip-lightbox-image > img { object-fit: cover; }
}
.ip-lightbox .ip-photo-fit { position: absolute; inset-inline-end: 15px; bottom: 15px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: rgb(0 0 0 / .45); color: #fff; font-size: 16px; cursor: pointer; }
.ip-photo-fit:hover { background: rgb(0 0 0 / .65); }
.ip-lightbox .ip-photo-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 4px; background: rgb(0 0 0 / .36); color: #fff; font-size: 18px; cursor: pointer; }
.ip-photo-arrow[data-ip-previous] { inset-inline-start: 15px; }
.ip-photo-arrow[data-ip-next] { inset-inline-end: 15px; }
.ip-photo-arrow:hover { background: rgb(0 0 0 / .6); }
.ip-photo-arrow:disabled { display: none; }
.ip-photo-counter { position: absolute; bottom: 15px; inset-inline-start: 15px; padding: 4px 10px; border-radius: 4px; background: rgb(0 0 0 / .5); color: white; font-size: 12px; pointer-events: none; }
.ip-lightbox .ip-lightbox-close { position: absolute; z-index: 3; top: 8px; inset-inline-end: 8px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: rgb(0 0 0 / .55); color: #fff; font-size: 16px; cursor: pointer; }
.ip-lightbox .ip-lightbox-close:hover { background: rgb(0 0 0 / .72); }
.ip-lightbox button:focus-visible { outline-color: #fff; }
@media (max-width: 767px) {
  .ip-review { padding: 10px 16px; font-size: 11px; }
  .ip-review > span { max-width: 55%; }
  .ip-review a { text-align: right; }
  .ip-mosaic {
    --ip-mobile-row: clamp(90px, 32vw, 175px);
    aspect-ratio: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: calc(2 * var(--ip-mobile-row)) repeat(2, var(--ip-mobile-row));
  }
  .ip-mosaic .ip-tile:first-child { grid-column: 1 / -1; grid-row: 1; }
  .ip-mosaic .ip-tile:nth-child(2) { grid-column: 1; grid-row: 2; }
  .ip-mosaic .ip-tile:nth-child(3) { grid-column: 2; grid-row: 2; }
  .ip-mosaic .ip-tile:nth-child(4) { grid-column: 1; grid-row: 3; }
  .ip-mosaic .ip-tile:nth-child(5) { grid-column: 2; grid-row: 3; }
  .ip-gallery .ip-all { bottom: 12px; inset-inline-start: 12px; inset-inline-end: auto; min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .ip-mosaic[data-ip-count="1"] { grid-template-rows: calc(2 * var(--ip-mobile-row)); }
  .ip-mosaic[data-ip-count="2"] { grid-template-rows: repeat(2, calc(2 * var(--ip-mobile-row))); }
  .ip-mosaic[data-ip-count="2"] .ip-tile:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .ip-mosaic[data-ip-count="3"] { grid-template-rows: calc(2 * var(--ip-mobile-row)) var(--ip-mobile-row); }
  .ip-mosaic[data-ip-count="4"] .ip-tile:nth-child(3) { grid-row: 2; }
  .ip-mosaic[data-ip-count="4"] .ip-tile:nth-child(4) { grid-column: 1 / -1; }
  .ip-lightbox { width: calc(100% - 24px); height: calc(100dvh - 24px); }
  .ip-lightbox .ip-photo-fit { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ip-tile img { transition: none; } }

html[dir="rtl"] .ip-photo-arrow i { transform: scaleX(-1); }
