/*
 * Plain CSS, deliberately not SCSS.
 *
 * main.css is a webpack build artifact and rebuilding it is blocked (Sage 9 + webpack,
 * no node/yarn on the host, and @fortawesome/fontawesome-pro is a licensed npm package
 * with no auth token in the theme). This file is enqueued after main.css so it can
 * override compiled rules without a build. If the theme is ever rebuilt, fold these
 * rules into resources/assets/styles/ and delete this file.
 */

/* Inline SVG icons that replaced the Font Awesome glyph fonts. */
.ymp-icon {
  display: inline-block;
  vertical-align: -0.125em;
  line-height: 1;
}

.ymp-icon--pipe {
  opacity: 0.6;
  padding: 0 0.15em;
}

/*
 * Nav dropdown carets.
 *
 * _global.scss defines .up-caret / .down-caret via an fa-pseudo mixin (content: "\f0d8"
 * at weight 700), and _header.scss @extends them onto li.menu-item-has-children. No menu
 * item currently has children, so these never paint today - but if the client adds a
 * submenu the FA glyph would re-trigger the 266 KB fa-solid-900 download that this work
 * removed. Draw the caret with borders instead so that cannot happen.
 */
.banner li.menu-item-has-children > a::after,
.sideNav li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 0.3em solid transparent;
  border-right: 0.3em solid transparent;
  border-top: 0.35em solid currentColor;
  vertical-align: middle;
}

.banner li.menu-item-has-children.open > a::after,
.sideNav li.menu-item-has-children.open > a::after {
  border-top: 0;
  border-bottom: 0.35em solid currentColor;
}

/*
 * "Rental Application" external-link indicator.
 *
 * _global.scss sets .tenant-login.menu-item a::after to the Font Awesome glyph \f08e
 * (external-link) at weight 400, which on its own kept the 342 KB fa-regular-400 webfont
 * downloading after every other FA glyph had been removed. The link does open in a new
 * tab, so the indicator is meaningful and is kept - redrawn as a masked SVG
 * (Bootstrap Icons "box-arrow-up-right", MIT) tinted with currentColor to match the
 * original `color: inherit`. Sized 14px with a 5px gap, as before.
 */
.tenant-login.menu-item a:after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 5px;
  padding-left: 0;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5'/%3E%3Cpath d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5'/%3E%3Cpath d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/*
 * The actual trigger for the 342 KB fa-regular-400 download.
 *
 * Emptying `content` on the pseudo-elements above is not enough: the compiled rules still
 * declare font-family "Font Awesome 7 Pro" on those generated boxes, and Chrome resolves
 * (and therefore downloads) the declared family even when no glyph is painted. Verified in
 * the browser - six a::after boxes matched, all weight 400, all with content "". Resetting
 * the family here is what finally stops the fetch.
 */
.tenant-login.menu-item a:after,
.banner li.menu-item-has-children > a::after,
.banner li.menu-item-has-children.open > a::after,
.sideNav li.menu-item-has-children > a::after,
.sideNav li.menu-item-has-children.open > a::after,
.up-caret:after,
.down-caret:after {
  font-family: inherit;
  font-weight: inherit;
}

/* ---------------------------------------------------------------------------
   AppFolio rental listings (links-appfolio-listings mu-plugin)
   Added 2026-08-18 when the server-rendered CPT replaced [apfl_listings].
   Plain CSS on purpose - this theme cannot be rebuilt (no node/yarn on the
   host, and FA Pro is a licensed npm package with no auth token), so SCSS
   changes are not an option. Loaded after sage/main.css at priority 200.
   --------------------------------------------------------------------------- */

.ymp-listings { margin: 0 0 1.5rem; }
.ymp-listing-col { margin-bottom: 1.75rem; display: flex; }

.ymp-listing-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .18s ease, transform .18s ease;
}
.ymp-listing-card:hover,
.ymp-listing-card:focus-within {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}

.ymp-listing-card__media { display: block; line-height: 0; }
.ymp-listing-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
/* Listings whose only image was the branding placeholder render no <img> at all. */
.ymp-listing-card__noimg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f0f0ee;
}

.ymp-listing-card__body { padding: 1rem 1.15rem 1.25rem; flex: 1 1 auto; }
.ymp-listing-card__title { font-size: 1.05rem; line-height: 1.35; margin: 0 0 .4rem; }
.ymp-listing-card__title a { text-decoration: none; }
.ymp-listing-card__title a:hover { text-decoration: underline; }
.ymp-listing-card__specs { margin: 0 0 .5rem; opacity: .8; font-size: .92rem; }
.ymp-listing-card__rent { margin: 0; font-weight: 700; font-size: 1.15rem; }
.ymp-listing-card__avail { margin: .35rem 0 0; font-size: .88rem; opacity: .8; }

.ymp-listings-empty { margin: 1.5rem 0; }

/* --- single listing --- */

.ymp-listing__header { margin-bottom: 1.5rem; }
.ymp-listing__title { margin: 0 0 .35rem; }
.ymp-listing__specs { margin: 0 0 .6rem; opacity: .8; }
.ymp-listing__rent { font-size: 1.6rem; font-weight: 700; margin: 0; }


.ymp-listing__description { margin-bottom: 1.5rem; }

.ymp-listing__facts { width: 100%; border-collapse: collapse; margin: 0 0 1.75rem; }
.ymp-listing__facts th,
.ymp-listing__facts td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid #e2e2e2; vertical-align: top; }
.ymp-listing__facts th { width: 40%; max-width: 240px; font-weight: 600; opacity: .8; }

.ymp-listing__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }

@media (max-width: 575px) {
  .ymp-listing__rent { font-size: 1.35rem; }
  .ymp-listing__facts th { width: 45%; }
  .ymp-listing__cta .btn { width: 100%; text-align: center; }
}

/* ---------------------------------------------------------------------------
   Listing photo gallery + breadcrumbs           added 2026-08-18
   Brand green #275a20 / #1d4318, matching the theme's existing buttons.
   --------------------------------------------------------------------------- */

:root {
  --ymp-green: #275a20;
  --ymp-green-dk: #1d4318;
  --ymp-line: #e2e2e2;
  --ymp-ink: #212529;
}

/* --- breadcrumbs --- */

.ymp-breadcrumbs { margin: 0 0 1.25rem; font-size: .875rem; }
.ymp-breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem;
}
.ymp-breadcrumbs li { display: flex; align-items: center; gap: .55rem; }
.ymp-breadcrumbs li + li::before {
  content: ""; width: .42em; height: .42em; flex: none;
  border-right: 1.6px solid #adb5bd; border-bottom: 1.6px solid #adb5bd;
  transform: rotate(-45deg); margin-right: .1rem;
}
.ymp-breadcrumbs a { color: var(--ymp-green); text-decoration: none; }
.ymp-breadcrumbs a:hover,
.ymp-breadcrumbs a:focus-visible { text-decoration: underline; }
.ymp-breadcrumbs [aria-current="page"] {
  color: #6c757d;
  /* long addresses must not push the trail into a second awkward line on mobile */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch;
}

/* --- gallery: no-JS fallback (also what crawlers see) --- */

.ymp-gallery { margin: 0 0 1.75rem; }
.ymp-gallery__thumbs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem;
}
.ymp-gallery__thumb { display: block; line-height: 0; border-radius: 6px; overflow: hidden; }
.ymp-gallery__thumb img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  background: #f0f0ee;
}

/* --- gallery: enhanced --- */

.ymp-gallery.is-enhanced .ymp-gallery__thumbs {
  display: flex; gap: .5rem; margin-top: .6rem;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding-bottom: .35rem;
  scrollbar-width: thin;
}
.ymp-gallery.is-enhanced .ymp-gallery__thumbs li { flex: 0 0 auto; scroll-snap-align: start; }
.ymp-gallery.is-enhanced .ymp-gallery__thumb {
  width: 104px; border-radius: 5px; position: relative;
  outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color .16s ease, opacity .16s ease, transform .16s ease;
  opacity: .62;
}
.ymp-gallery.is-enhanced .ymp-gallery__thumb img { aspect-ratio: 4 / 3; }
.ymp-gallery.is-enhanced .ymp-gallery__thumb:hover,
.ymp-gallery.is-enhanced .ymp-gallery__thumb:focus-visible { opacity: 1; transform: translateY(-2px); }
.ymp-gallery.is-enhanced .ymp-gallery__thumb.is-active { opacity: 1; outline-color: var(--ymp-green); }
.ymp-gallery.is-single .ymp-gallery__thumbs { display: none; }

/* stage */

.ymp-gallery__stage {
  position: relative; border-radius: 8px; overflow: hidden; background: #10130f;
  aspect-ratio: 3 / 2;
}
.ymp-gallery__open {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; margin: 0;
  background: none; cursor: zoom-in; position: relative;
}
/* Photos mix portrait and landscape. The image is contained so nothing is cropped, over a
   blurred copy of itself so the frame is still filled at any aspect ratio. */
.ymp-gallery__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(26px) saturate(1.35) brightness(.62);
  transform: scale(1.15); pointer-events: none;
}
.ymp-gallery__main {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity .28s ease;
}
.ymp-gallery__main.is-in { opacity: 1; }

.ymp-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ymp-ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
  transition: background .16s ease, transform .16s ease;
}
.ymp-gallery__nav svg { width: 21px; height: 21px; }
.ymp-gallery__nav:hover { background: #fff; transform: translateY(-50%) scale(1.07); }
.ymp-gallery__nav--prev { left: .75rem; }
.ymp-gallery__nav--next { right: .75rem; }

.ymp-gallery__count {
  position: absolute; left: .85rem; bottom: .8rem; margin: 0;
  background: rgba(0, 0, 0, .62); color: #fff;
  font-size: .8rem; line-height: 1; padding: .38rem .6rem; border-radius: 999px;
  letter-spacing: .02em;
}
.ymp-gallery__expand {
  position: absolute; right: .85rem; bottom: .8rem;
  width: 34px; height: 34px; border-radius: 6px;
  background: rgba(0, 0, 0, .62); color: #fff;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.ymp-gallery__expand svg { width: 17px; height: 17px; }

.ymp-gallery__open:focus-visible { outline: 3px solid var(--ymp-green); outline-offset: -3px; }
.ymp-gallery__nav:focus-visible,
.ymp-gallery__thumb:focus-visible { outline: 3px solid var(--ymp-green); outline-offset: 2px; }

/* --- lightbox --- */

body.ymp-lightbox-open { overflow: hidden; }

.ymp-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(6, 8, 5, .975);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s ease;
}
.ymp-lightbox.is-open { opacity: 1; }
.ymp-lightbox__figure {
  margin: 0; max-width: 92vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.ymp-lightbox__img {
  max-width: 92vw; max-height: 88vh; width: auto; height: auto;
  display: block; border-radius: 4px;
  transform: scale(.97); transition: transform .18s ease;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.ymp-lightbox.is-open .ymp-lightbox__img { transform: scale(1); }

.ymp-lightbox__close,
.ymp-lightbox__nav {
  position: absolute; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s ease, transform .16s ease;
}
.ymp-lightbox__close {
  top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%;
}
.ymp-lightbox__nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; }
.ymp-lightbox__nav--prev { left: 1.25rem; }
.ymp-lightbox__nav--next { right: 1.25rem; }
.ymp-lightbox__close:hover,
.ymp-lightbox__nav:hover { background: rgba(255, 255, 255, .26); }
.ymp-lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.ymp-lightbox__close svg { width: 22px; height: 22px; }
.ymp-lightbox__nav svg { width: 24px; height: 24px; }
.ymp-lightbox__close:focus-visible,
.ymp-lightbox__nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.ymp-lightbox__count {
  position: absolute; bottom: 1.15rem; left: 50%; transform: translateX(-50%);
  margin: 0; color: #fff; background: rgba(255, 255, 255, .12);
  font-size: .85rem; padding: .4rem .8rem; border-radius: 999px;
}

@media (max-width: 767px) {
  .ymp-gallery__stage { aspect-ratio: 4 / 3; border-radius: 6px; }
  .ymp-gallery__nav { width: 36px; height: 36px; }
  .ymp-gallery__nav--prev { left: .5rem; }
  .ymp-gallery__nav--next { right: .5rem; }
  .ymp-gallery.is-enhanced .ymp-gallery__thumb { width: 84px; }
  .ymp-lightbox__nav { width: 42px; height: 42px; }
  .ymp-lightbox__nav--prev { left: .5rem; }
  .ymp-lightbox__nav--next { right: .5rem; }
  .ymp-breadcrumbs [aria-current="page"] { max-width: 22ch; }
}

@media (prefers-reduced-motion: reduce) {
  .ymp-gallery__main,
  .ymp-gallery__thumb,
  .ymp-gallery__nav,
  .ymp-lightbox,
  .ymp-lightbox__img,
  .ymp-lightbox__close,
  .ymp-lightbox__nav { transition: none; }
  .ymp-lightbox__img { transform: none; }
}

/* ---------------------------------------------------------------------------
   Town archives (/rentals-in/<town>/)
   Added 2026-08-21 with the Properties by Location dropdown.
   --------------------------------------------------------------------------- */

.ymp-town__header { margin-bottom: 1.75rem; }
.ymp-town__title { margin-bottom: .5rem; }
.ymp-town__intro { font-size: 1.075rem; max-width: 62ch; }
.ymp-town__intro p:last-child { margin-bottom: 0; }

.ymp-town__about { margin-top: 2.5rem; max-width: 68ch; }
.ymp-town__about h2 { margin-bottom: .75rem; }

.ymp-town__siblings { margin-top: 2.5rem; }
.ymp-town__siblings h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.ymp-town__siblings ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.ymp-town__siblings li { margin: 0; }

.ymp-town__cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------------------------------------------------------------------------
   Sub-menu fixes for the Properties by Location dropdown.
   Added 2026-08-21. Both of these are latent defects in main.css that have
   never shown up, because until now no menu item on this site had children.
   --------------------------------------------------------------------------- */

/*
 * Defect 1: _header.scss sets `.sub-menu a { color: #f7f7f7 }` while
 * `.banner .nav-primary .sub-menu` is `background-color: white`. Near-white on
 * white - the dropdown links would be effectively invisible.
 */
.banner .sub-menu a,
.sideNav .sub-menu a {
  color: #333;
}

.banner .sub-menu a:hover,
.banner .sub-menu a:focus,
.sideNav .sub-menu a:hover,
.sideNav .sub-menu a:focus {
  color: #000;
  text-decoration: underline;
}

/* The banner's animated underline pseudo-element is sized for the top-level row and
   sits across sub-menu text. Not wanted inside a dropdown. */
.banner .nav-primary .sub-menu li a:before {
  content: none;
}

.banner .sub-menu { padding: 8px 0; }
.banner .sub-menu li { display: block; width: 100%; }
.banner .sub-menu li a { display: block; white-space: nowrap; }

/*
 * Defect 2: the base `.sub-menu` rule is `visibility: hidden`, not `display: none`,
 * and it is not scoped to .banner. The footer renders the same primary menu, so it
 * would reserve full layout space for an invisible list: a block of blank space.
 *
 * Fixed by showing the town links in the footer as an ordinary nested list. That is
 * better for visitors than hiding them, and it gives crawlers plain anchors to every
 * town page that do not depend on the dropdown.
 */
footer.content-info .sub-menu {
  visibility: visible;
  opacity: 1;
  position: static;
  display: inline;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border: 0;
  background: none;
  min-width: 0;
  width: auto;
}

footer.content-info .sub-menu li { display: inline-block; }

/* The caret is a dropdown affordance. In the footer nothing opens, so it would be a lie. */
footer.content-info li.menu-item-has-children > a::after { content: none; }

/*
 * The town list now hangs under the existing "Apartments for rent" item instead of a new
 * top-level item (a 6th top-level item left zero slack in the nav row). "Apartments by
 * Location" is a heading, not a link - given an empty url, WP core's Walker_Nav_Menu omits
 * the href attribute entirely, so it is already unclickable and unfocusable. Styled here as
 * small, muted, and visually inert so it doesn't read as a dead link. The footer renders the
 * same menu as an ordinary inline list of real links (see the Defect 2 fix above), so without
 * its own rule the heading would look identical to the working links beside it there - a
 * link with no href reads as broken, not as a label.
 */
.banner .sub-menu li.ymp-town-heading > a,
.sideNav .sub-menu li.ymp-town-heading > a,
footer.content-info .sub-menu li.ymp-town-heading > a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #999;
  cursor: default;
  pointer-events: none;
}

/* No hover/focus affordance on the heading - it isn't interactive. */
.banner .sub-menu li.ymp-town-heading > a:hover,
.banner .sub-menu li.ymp-town-heading > a:focus,
.sideNav .sub-menu li.ymp-town-heading > a:hover,
.sideNav .sub-menu li.ymp-town-heading > a:focus,
footer.content-info .sub-menu li.ymp-town-heading > a:hover,
footer.content-info .sub-menu li.ymp-town-heading > a:focus {
  color: #999;
  text-decoration: none;
}

/* "About the Area" block on a listing page. */
.ymp-listing__area { margin-top: 2.25rem; max-width: 68ch; }
.ymp-listing__area h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.ymp-listing__area p:last-child { margin-bottom: 0; }
.ymp-listing__area-link { margin-top: .75rem; font-weight: 600; }
