.rental-categories,
.rental-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: 1rem;
}

.rental-categories [aria-pressed="true"],
#rental-filters button[type="submit"] {
  color: var(--deep);
  background: var(--gold);
}

.rental-fields,
.rental-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .9rem;
}

.rental-card,
#rental-filters {
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--paper);
}

#rental-filters label {
  display: grid;
  gap: .3rem;
}

#rental-filters :is(select, input) {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  color: var(--white);
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .4rem;
  font: inherit;
}

.rental-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
}

.rental-card h2 {
  font-size: 1.35rem;
  margin-bottom: .6rem;
}

.rental-price {
  margin-top: .5rem;
  color: var(--gold);
  font-weight: 700;
}

.rental-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem .6rem;
}

.rental-facts dd {
  margin: 0;
  text-align: right;
}

.rental-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-block: .9rem;
}

.rental-status,
.rental-more {
  margin-block: 1rem;
}

.rental-more[hidden] {
  display: none;
}

.rental-categories button,
.rental-actions button,
.rental-more {
  font: inherit;
  cursor: pointer;
  background-color: transparent;
}

.rental-results {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.rental-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .5rem;
  margin-block: .8rem;
}

.rental-gallery img,
.rental-gallery video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--deep);
}

.rental-gallery video {
  grid-column: 1 / -1;
  object-fit: contain;
}

.rental-map {
  margin-block: .8rem;
}

.rental-map summary {
  cursor: pointer;
  color: var(--gold);
}

.rental-map iframe {
  display: block;
  width: 100%;
  height: clamp(25rem, 62vh, 36rem);
  margin-block: .5rem;
  border: 0;
}

.rental-media-editor {
  min-width: 0;
  margin: 1rem 0;
  padding: .8rem;
  border: 1px solid var(--line);
}

#rental-map-picker {
  height: clamp(15rem, 40vh, 25rem);
  margin-block: .75rem;
  background: #E9E0BF;
}

.rental-map-view {
  height: clamp(25rem, 62vh, 36rem);
  margin-block: .5rem;
  background: #E9E0BF;
}

.rental-pin span {
  display: block;
  width: 28px;
  height: 36px;
  background: url("/rental-pin.svg") center / contain no-repeat;
}

.rental-back {
  margin-bottom: 1rem;
}

.rental-back .button {
  display: inline-flex;
  align-items: center;
}

#rental-pending-media li {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .45rem;
  overflow-wrap: anywhere;
}

.rental-filter-panel > summary {
  margin-bottom: .75rem;
  padding: .65rem;
  color: var(--gold);
  cursor: pointer;
}

.rental-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: .65rem;
}

.rental-photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.rental-photo-viewer {
  box-sizing: border-box;
  width: min(72rem, 100%);
  max-width: 100%;
  max-height: 100dvh;
  height: min(54rem, 100dvh);
  padding: .75rem;
  color: #F9F7EE;
  background: #083226;
  border: 1px solid #C4AD745e;
}

.rental-photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .5rem;
}

.rental-photo-viewer::backdrop {
  background: #000c;
}

.rental-photo-top,
.rental-photo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.rental-photo-controls[hidden] {
  display: none;
}

.rental-photo-viewer button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid #C4AD747a;
  border-radius: 6px;
  color: #F9F7EE;
  background: #083226;
  cursor: pointer;
  font: 1.7rem/1 system-ui, sans-serif;
}

.rental-photo-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  touch-action: pan-y pinch-zoom;
}

.rental-photo-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

@media (max-width: 660px) {
  .rental-card,
  #rental-filters {
    padding: .75rem;
  }

  .rental-card {
    min-width: 0;
  }

  .rental-fields,
  .rental-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .rental-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .2rem .2rem .55rem;
  }

  .rental-categories button {
    flex: none;
    min-height: 44px;
  }

  #rental-filters :is(select, input) {
    min-height: 44px;
    font-size: 16px;
  }

  .rental-map-links > a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .rental-photo-viewer {
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: max(.65rem, env(safe-area-inset-top)) .65rem max(.65rem, env(safe-area-inset-bottom));
    border: 0;
  }
}

.rental-compass {
  background: #F9F7EE;
}

.rental-compass button,
.admin-main .rental-compass button {
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #F9F7EE;
  color: #083226;
  cursor: pointer;
  font: 700 1.25rem/1 system-ui, sans-serif;
}

.rental-compass button + button,
.admin-main .rental-compass button + button {
  border-top: 1px solid #E9E0BF;
}

.rental-compass button:hover,
.admin-main .rental-compass button:hover {
  background: #E9E0BF;
}

.rental-compass-needle {
  display: block;
  color: #ba252d;
}

@media (pointer: coarse) {
  .rental-compass button,
  .admin-main .rental-compass button {
    width: 44px;
    height: 44px;
  }
}

.rental-list-view[hidden],
.rental-detail-view[hidden] {
  display: none;
}

.rental-list-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.rental-list-layout .rental-fields,
.rental-list-layout .rental-results {
  grid-template-columns: minmax(0, 1fr);
}

.rental-list-column,
.rental-detail-main {
  min-width: 0;
}

.rental-list-column .rental-status:empty {
  display: none;
}

.rental-preview {
  padding: 0;
  overflow: hidden;
  border-radius: .75rem;
}

.rental-preview-link {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 12rem;
  color: inherit;
  text-decoration: none;
}

.rental-preview-link:hover h2 {
  color: var(--gold);
  text-decoration: underline;
}

.rental-preview-link:focus-visible {
  outline-offset: -4px;
}

.rental-preview-media,
.rental-detail-photo {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  background: var(--deep);
  color: var(--gold);
}

.rental-preview-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rental-preview-count {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  padding: .25rem .55rem;
  color: white;
  background: #000b;
  border-radius: 1rem;
  pointer-events: none;
}

.rental-preview-info {
  padding: 1rem;
  overflow-wrap: anywhere;
}

.rental-preview-info h2 {
  margin-top: .55rem;
}

.rental-preview-info .rental-price,
.rental-detail-contact .rental-price {
  margin-top: 0;
  font-size: 1.25rem;
}

.rental-location,
.rental-preview-facts {
  margin-top: .4rem;
}

.rental-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
  gap: 1.5rem;
  align-items: start;
}

.rental-back-link {
  margin-bottom: 1rem;
}

.rental-detail-view > h1 {
  overflow-wrap: anywhere;
}

.rental-detail-contact {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: .65rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .75rem;
}

.rental-detail-contact a {
  justify-content: center;
}

.rental-detail-gallery {
  margin-block: 1rem 1.5rem;
}

.rental-detail-photo {
  border-radius: .75rem;
  overflow: hidden;
}

.rental-detail-photo img {
  display: block;
  width: 100%;
  height: clamp(16rem, 56vw, 34rem);
  object-fit: contain;
}

.rental-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  color: white;
  background: #083226e8;
  border: 1px solid var(--gold);
  border-radius: .45rem;
  cursor: pointer;
  font: 1.6rem/1 system-ui, sans-serif;
}

.rental-gallery-arrow:nth-last-child(2) {
  left: .65rem;
}

.rental-gallery-arrow:last-child {
  right: .65rem;
}

.rental-detail-thumbs {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding-block: .65rem;
}

.rental-detail-thumbs button {
  flex: 0 0 4.75rem;
  border: 2px solid transparent;
  border-radius: .4rem;
  overflow: hidden;
}

.rental-detail-thumbs [aria-pressed="true"] {
  border-color: var(--gold);
}

.rental-detail-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rental-detail-main .rental-facts {
  padding: 1rem;
  border: 1px solid var(--line);
}

.rental-detail-main > h2,
.rental-related > h2 {
  margin-block: 1.1rem .7rem;
  font-size: 1.35rem;
}

.rental-related {
  margin-top: 2rem;
}

.rental-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .85rem;
}

.rental-related-grid .rental-preview-link {
  grid-template-columns: 1fr;
}

.rental-related-grid .rental-preview-media {
  min-height: 9rem;
}

@media (max-width: 760px) {
  .rental-list-layout,
  .rental-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rental-detail-contact {
    position: static;
    grid-row: 1;
  }

  .rental-preview-link {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    min-height: 9.5rem;
  }

  .rental-preview-info {
    padding: .65rem;
  }

  .rental-preview-info h2 {
    font-size: 1.05rem;
  }

  .rental-card.rental-preview {
    padding: 0;
  }
}

.rental-detail-main .rental-map {
  margin-block: 1.25rem;
}

.rental-detail-main .rental-map summary {
  padding-block: .3rem;
  color: var(--white);
  font-weight: 650;
}

.rental-detail-main :is(.rental-map-view, .rental-map iframe) {
  overflow: hidden;
  border-radius: .8rem;
  box-shadow: 0 0 0 1px var(--line);
}

.rental-detail-main .rental-map .leaflet-control {
  margin-right: .65rem;
}

.rental-detail-main .rental-map .leaflet-bar,
.rental-detail-main .rental-map .leaflet-control-layers {
  border: 1px solid #25473555;
  border-radius: .45rem;
  box-shadow: 0 2px 6px #0004;
}

.rental-detail-main .rental-map .leaflet-bar {
  overflow: hidden;
}

.rental-layer-toggle button,
.admin-main .rental-layer-toggle button {
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #083226;
  background: #F9F7EE;
  cursor: pointer;
}

.rental-layer-toggle button:hover,
.admin-main .rental-layer-toggle button:hover {
  background: #E9E0BF;
}

@media (pointer: coarse) {
  .rental-layer-toggle button,
  .admin-main .rental-layer-toggle button {
    width: 44px;
    height: 44px;
  }
}

.rental-video-section {
  margin-block: 1rem;
}

.rental-video-section h2 {
  margin-bottom: .65rem;
  font-size: 1.3rem;
}

.rental-video-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 17rem));
  gap: .65rem;
}

.rental-video-preview {
  display: grid;
  position: relative;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--paper);
  cursor: pointer;
}

.rental-video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.rental-video-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  color: #F9F7EE;
  background: #083226dd;
  border: 1px solid #F9F7EE99;
  border-radius: 50%;
  font-size: 1.15rem;
}

.rental-video-preview:hover .rental-video-play {
  background: #254735;
}

.rental-video-viewer {
  width: min(64rem, calc(100% - 1rem));
  max-height: calc(100dvh - 1rem);
  padding: .7rem;
  color: #F9F7EE;
  background: #083226;
  border: 1px solid #C4AD7459;
  border-radius: .75rem;
  box-sizing: border-box;
}

.rental-video-viewer::backdrop {
  background: #000c;
}

.rental-video-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 .5rem .35rem;
}

.rental-video-viewer-header button {
  width: 44px;
  height: 44px;
  color: #F9F7EE;
  background: #083226;
  border: 1px solid #C4AD747a;
  border-radius: .4rem;
  cursor: pointer;
  font-size: 1.5rem;
}

.rental-video-viewer video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 5.5rem);
  background: #000;
}

.rental-page:has(.rental-detail-view:not([hidden])) {
  width: 100%;
  background: #F9F7EE;
  color: #083226;
  color-scheme: light;
  --paper: #F9F7EE;
  --gold: #254735;
  --white: #083226;
  --line: #E9E0BF;
}

.rental-page:has(.rental-detail-view:not([hidden])) > section {
  width: min(1200px, calc(100% - 56px));
  margin-inline: auto;
}

.rental-detail-view > .page-title,
.rental-detail-view h2 {
  color: #083226;
}

.rental-detail-view > .page-title {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

.rental-detail-view :is(.rental-detail-photo, .rental-preview-media) {
  background: #E9E0BF;
}

.rental-detail-view .hero-link:hover {
  color: #F9F7EE;
}

.rental-detail-contact a[href^="https://wa.me/"] {
  color: #F9F7EE;
  background: #254735;
}

.rental-detail-contact a[href^="https://wa.me/"]:hover {
  background: #083226;
}

.rental-detail-main .rental-map {
  max-width: 652px;
}

.rental-detail-main :is(.rental-map-view, .rental-map iframe) {
  width: 100%;
  height: auto;
  aspect-ratio: 652 / 300;
  min-height: 200px;
}

@media (max-width: 660px) {
  .rental-page:has(.rental-detail-view:not([hidden])) > section {
    width: calc(100% - 32px);
  }
}

.rental-back-link {
  gap: .55rem;
}

.rental-back-arrow {
  font-size: 1.25em;
  line-height: 1;
}

.admin-main #rental-delete {
  border-color: #a32930;
  color: #a32930;
  margin-block: .5rem;
}

.admin-main #rental-delete:hover {
  background: #a32930;
  color: #F9F7EE;
}
