/* Photographs reach the edges of their media card; the card clips its corners. */
body[data-att-photo-edges] main :is(.tour-unified-hero__media,.guide-hero-media,.series-card-photo,.beach-card-photo,.hero-visual,.home-tour-photo,.aerial-flight-photo,.page-hero-img,.hero-media,.hero-image,.tour-card-media) {
  overflow: hidden;
}
body[data-att-photo-edges] main :is(.tour-unified-hero__media img,.guide-card img,.guide-hero-media img,.series-card-photo img,.beach-card-photo img,.beach-hero-picture img,.series-hero figure img,.hero-visual img,.home-tour-photo img,.warrin-photo img,.aerial-flight-photo img,.page-hero-img img,.hero-media img,.hero-image img,.tour-card-media img) {
  display: block;
  object-fit: cover !important;
  border-radius: 0 !important;
  clip-path: none !important;
  box-shadow: none;
}
body[data-att-photo-edges] main img[data-att-photo-edge] {
  transition: none !important;
  transform: none !important;
}

/* Cover images use the same inset as the existing shared tour card. */
body[data-att-photo-edges] .tour-unified-hero {
  --att-photo-inset: clamp(.85rem,2vw,1.4rem);
}
body[data-att-photo-edges] .tour-unified-hero > .tour-unified-hero__media,
body[data-att-photo-edges] .warrin-hero > figure:first-child {
  width: calc(100% + 2 * var(--att-photo-inset)) !important;
  max-width: none !important;
  margin-top: calc(-1 * var(--att-photo-inset)) !important;
  margin-left: calc(-1 * var(--att-photo-inset)) !important;
  margin-right: calc(-1 * var(--att-photo-inset)) !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
body[data-att-photo-edges] .tour-unified-main > article.prose:has(> img:first-child) {
  overflow: hidden;
}
body[data-att-photo-edges] .tour-unified-main > article.prose > img:first-child {
  width: calc(100% + 3rem) !important;
  max-width: none !important;
  margin-top: -1.5rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  border-radius: 0 !important;
}

/* Padded guide covers become a full photo column, keeping their captions. */
body[data-att-photo-edges] :is(.series-hero figure,.beach-hero-picture) {
  position: relative;
  align-self: stretch;
  overflow: hidden;
  padding: 0 !important;
  margin: 0;
  min-height: 260px;
}
body[data-att-photo-edges] :is(.series-hero figure,.beach-hero-picture) > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0 !important;
}
body[data-att-photo-edges] :is(.series-hero figure,.beach-hero-picture) > figcaption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fffffff0;
  color: #21445c;
}

/* Space for the existing native selects; keyboard and touch behaviour stays native. */
body[data-att-photo-edges] #quickFinder .field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%2321445c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 10px;
}
@media (max-width:767px) {
  body[data-att-photo-edges] .warrin-hero { --att-photo-inset:16px; }
}
@media (max-width:700px) {
  body[data-att-photo-edges] :is(.series-hero figure,.beach-hero-picture) {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 10;
  }
}
@media (forced-colors: active) {
  body[data-att-photo-edges] #quickFinder .field select {
    appearance: auto;
    background-image: none;
  }
}
