/**
 * Property ficha only — enqueued when body.loca-property-single.
 * Does not affect Home, listing, or other routes.
 */

/* Hello reset.css sets `a { color: #c36 }` at rest and
   `button:hover, button:focus { background: #c36 }`, so the accent
   shows without a real hover and sticks after click. On the ficha,
   resting color is ink and #e98f6c applies only while hovering. */
body.loca-property-single .loca-property a:where(:not([class*="leaflet-"])) {
  color: #213545;
}

body.loca-property-single .loca-property a:where(:not([class*="leaflet-"])):focus,
body.loca-property-single .loca-property a:where(:not([class*="leaflet-"])):active {
  color: #213545;
}

body.loca-property-single .loca-property a:where(:not([class*="leaflet-"])):hover {
  color: #e98f6c;
}

body.loca-property-single button,
body.loca-property-single [type="button"],
body.loca-property-single [type="submit"] {
  border-color: transparent;
}

body.loca-property-single button:hover,
body.loca-property-single button:focus,
body.loca-property-single [type="button"]:hover,
body.loca-property-single [type="button"]:focus,
body.loca-property-single [type="submit"]:hover,
body.loca-property-single [type="submit"]:focus {
  background-color: transparent;
  border-color: transparent;
}

body.loca-property-single .loca-lang__button:hover,
body.loca-property-single .loca-lang__button:focus-visible {
  background: #2d3d49;
  background-color: #2d3d49;
  color: #fff;
}

body.loca-property-single .loca-property__head-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

@media (min-width: 1024px) {
  body.loca-property-single .loca-property__head-tools {
    align-self: center;
  }
}

body.loca-property-single .loca-property__head-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 45px;
  height: 45px;
  min-width: 45px;
  min-height: 45px;
  margin: 1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #213545;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

body.loca-property-single .loca-property__head-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.loca-property-single .loca-property__head-tool-icon svg {
  display: block;
  width: auto;
  height: 30px;
  fill: currentColor;
}

body.loca-property-single .loca-property__head-tool--share .loca-property__head-tool-icon svg {
  transform: rotateY(180deg);
}

body.loca-property-single .loca-property__head-tool-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.loca-property-single .loca-property__head-tool:hover,
body.loca-property-single .loca-property__head-tool:focus,
body.loca-property-single .loca-property__head-tool:active {
  color: #fad67d;
  background: #fff;
  background-color: #fff;
  border-color: transparent;
}

body.loca-property-single .loca-property__head-tool:focus-visible {
  color: #213545;
  background: #fff;
  background-color: #fff;
  outline: 2px solid #fad67d;
  outline-offset: 2px;
}

body.loca-property-single .loca-property__gallery-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
}

body.loca-property-single .loca-property__gallery {
  position: relative;
  background: #e8e4dc;
}

body.loca-property-single .loca-property__gallery-grid {
  display: none;
}

body.loca-property-single .loca-property__gallery-carousel {
  position: relative;
  overflow: hidden;
}

body.loca-property-single .loca-property__gallery-stage {
  aspect-ratio: 16 / 10;
  max-height: 520px;
}

body.loca-property-single .loca-property__gallery-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.loca-property-single .loca-property__gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: #1f2b34;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

body.loca-property-single .loca-property__gallery-nav:hover,
body.loca-property-single .loca-property__gallery-nav:focus-visible {
  background: #1f2b34;
  background-color: #1f2b34;
  color: #fff;
  border-color: transparent;
  outline: 2px solid #fad67d;
  outline-offset: 2px;
}

body.loca-property-single .loca-property__gallery-nav--prev {
  left: 12px;
}

body.loca-property-single .loca-property__gallery-nav--next {
  right: 12px;
}

@media (min-width: 768px) {
  body.loca-property-single .loca-property__gallery--grid .loca-property__gallery-grid {
    display: flex;
    flex-direction: row;
    gap: 4px;
    min-height: 500px;
    max-height: 520px;
  }

  body.loca-property-single .loca-property__gallery--grid .loca-property__gallery-carousel {
    display: none;
  }

  body.loca-property-single .loca-property__gallery-left {
    flex: 1 1 57%;
    min-width: 0;
    min-height: 500px;
  }

  body.loca-property-single .loca-property__gallery-right {
    flex: 1 1 43%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    min-width: 0;
    min-height: 500px;
  }

  body.loca-property-single .loca-property__gallery-cell {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    text-decoration: none;
    color: inherit;
  }

  body.loca-property-single .loca-property__gallery-cell:focus-visible {
    outline: 2px solid #fad67d;
    outline-offset: -2px;
    z-index: 1;
  }

  body.loca-property-single .loca-property__gallery-media {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 248px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  body.loca-property-single .loca-property__gallery-left .loca-property__gallery-media {
    min-height: 500px;
  }

  body.loca-property-single .loca-property__gallery-more {
    display: none;
  }
}

body.loca-property-single .loca-property__body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

body.loca-property-single .loca-property__layout {
  padding-top: 28px;
}

@media (min-width: 960px) {
  body.loca-property-single .loca-property__sidebar-wrap {
    position: sticky;
    top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.loca-property-single .loca-property__gallery-nav {
    transition: none;
  }
}

/* Sidebar help inside price card (live .loca_contact_widget: 1px rule + 40px gap) */
body.loca-property-single .loca-property__sidebar-card-help {
  margin-top: 0;
  padding-top: 40px;
  border-top: 1px solid #ccc;
}

body.loca-property-single .loca-property__sidebar-help-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

/* ITP tooltip (live .price-itp) */
body.loca-property-single .loca-property__sidebar-itp {
  position: relative;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.2;
  color: #213545;
}

body.loca-property-single .loca-property__price-tooltip-marker {
  margin-left: 0.5rem;
  width: 24px;
  height: 24px;
  border: 2px solid #213644;
  border-radius: 25px;
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  line-height: 22px;
  vertical-align: middle;
  cursor: help;
}

body.loca-property-single .loca-property__price-tooltip {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  z-index: 100;
  width: min(300px, 88vw);
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 0 1px #899093;
  pointer-events: none;
  opacity: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  color: #213545;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

body.loca-property-single .loca-property__price-tooltip::before {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -13px;
  border-top: 10px solid #cccfd0;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  content: " ";
}

body.loca-property-single .loca-property__price-tooltip::after {
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -12px;
  border-top: 10px solid #fff;
  border-right: 9px solid transparent;
  border-left: 9px solid transparent;
  content: " ";
}

body.loca-property-single .loca-property__sidebar-itp:has(.loca-property__price-tooltip-marker:hover) .loca-property__price-tooltip,
body.loca-property-single .loca-property__sidebar-itp:has(.loca-property__price-tooltip-marker:focus-visible) .loca-property__price-tooltip {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.loca-property-single .loca-property__sidebar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 25px;
  background: #f3f5f3;
  color: #213545;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

body.loca-property-single .loca-property__sidebar-btn:hover {
  background: #f3f5f3;
  background-color: #f3f5f3;
  color: #e98f6c;
}

body.loca-property-single .loca-property__sidebar-btn:focus-visible {
  background: #f3f5f3;
  background-color: #f3f5f3;
  color: #213545;
  outline: 2px solid #fad67d;
  outline-offset: 2px;
}

body.loca-property-single .loca-property__sidebar-btn-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

body.loca-property-single .loca-property__sidebar-help-links {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

body.loca-property-single .loca-property__sidebar-help-links li + li {
  margin-top: 15px;
}

body.loca-property-single .loca-property__sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #213545;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

body.loca-property-single .loca-property__sidebar-link:hover {
  color: #e98f6c;
  text-decoration: underline;
}

body.loca-property-single .loca-property__sidebar-link:focus-visible {
  color: #213545;
  outline: 2px solid #fad67d;
  outline-offset: 2px;
}

body.loca-property-single .loca-property__sidebar-link-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Energy performance badge (live rh_property__feature_wrap / .energy-class parity) */
body.loca-property-single .loca-property__energy-class {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

body.loca-property-single .loca-property__energy-badge {
  --loca-energy: #595c5e;
  position: relative;
  z-index: 0;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

/* Live .energy-class-icon: drop rotated 135deg so the point faces right; letter stays upright. */
body.loca-property-single .loca-property__energy-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 0 50% 50% 50%;
  background: var(--loca-energy);
  transform: rotate(135deg);
}

body.loca-property-single .loca-property__energy-badge--a { --loca-energy: #1d8a3e; }
body.loca-property-single .loca-property__energy-badge--b { --loca-energy: #4cae4c; }
body.loca-property-single .loca-property__energy-badge--c { --loca-energy: #a3c614; }
body.loca-property-single .loca-property__energy-badge--d { --loca-energy: #fcd116; color: #1f2b34; }
body.loca-property-single .loca-property__energy-badge--e { --loca-energy: #f5b34d; }
body.loca-property-single .loca-property__energy-badge--f { --loca-energy: #ef7d22; }
body.loca-property-single .loca-property__energy-badge--g { --loca-energy: #e2231a; }

body.loca-property-single .loca-property__energy-caption {
  font-size: 15px;
  color: #213545;
  text-transform: lowercase;
}
