/* Consistent controls and compact mobile layouts across the public TND UI. */
.home-portal .portal-select,
.sort select,
.home-main select:not([multiple]):not([size]) {
  box-sizing: border-box;
  min-height: 38px;
  line-height: 1.25;
  padding: 8px 34px 8px 12px;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  vertical-align: middle;
}
.sort select { min-height: 38px !important; line-height: 1.25 !important; padding: 8px 34px 8px 12px !important; appearance: none !important; -webkit-appearance: none !important; background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%) !important; background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px !important; background-size: 5px 5px, 5px 5px !important; background-repeat: no-repeat !important; }
.detail-map-frame-wrapper { background: #f6f8fb !important; }
.detail-map-frame-wrapper iframe { background: #f6f8fb; color-scheme: light; filter: none !important; }
.form-field:has(input[type="date"]) { position: relative; }
.form-field:has(input[type="date"])::after {
  position: absolute;
  right: 14px;
  bottom: 13px;
  width: 16px;
  height: 16px;
  color: #64748b;
  pointer-events: none;
  content: "";
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
}
.form-field:has(input[type="date"]) input[type="date"] { padding-right: 38px; }
.tnd-inline-validation { margin: 5px 0 0; color: #b42318; font-size: 12px; line-height: 1.4; }
.tnd-invalid-field { border-color: #d92d20 !important; box-shadow: 0 0 0 2px rgb(217 45 32 / 12%) !important; }
input, select, textarea { scroll-margin-top: 104px; }
html body #tnd-chat-bootstrap-host { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .home-portal .portal-search-tabs { flex-wrap: wrap !important; justify-content: flex-start; gap: 4px 8px !important; overflow: visible !important; padding: 2px 2px 8px; }
  .home-portal .portal-search-tabs .portal-tab-cta { flex: 0 0 100% !important; width: 100% !important; margin: 0 !important; text-align: right; white-space: normal !important; }
  .home-portal .portal-tab { flex: 0 0 auto; }
  .listings-hero .search-bar input, .hero .search-bar input { min-width: 0 !important; }
  .category-strip { margin-top: 16px !important; }
  .property-detail-page [role="tablist"] { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: 16px; }
  .property-detail-page [role="tablist"] > * { flex: 0 0 auto; }
  .property-detail-page .detail-nav-tabs { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: 16px; }
  .property-detail-page .detail-nav-tabs .nav-tab-btn { flex: 0 0 auto; }
  .property-detail-page { padding-bottom: 96px; }
  .home-main { padding-bottom: 92px; }
  .home-main > .filters { gap: 14px; margin-top: 14px; }
  .saved-button span { display: inline-flex !important; align-items: center; font-size: 11px; line-height: 1; }
  .category-strip, .popular-searches { max-width: 100%; }
  .popular-searches { flex-wrap: wrap; overflow: visible; }
  .home-portal .portal-hero-chips { box-sizing: border-box; width: 100%; max-width: 100%; padding-right: 78px; flex-wrap: wrap !important; overflow: visible !important; }
  .search-bar, .listings-hero .search-bar { box-sizing: border-box; max-width: 100%; z-index: 2; }
  #tnd-chat-bootstrap-launcher { width: 52px !important; height: 52px !important; }
  #tnd-chat-bootstrap-halo, #tnd-chat-bootstrap-orb { width: 44px !important; height: 44px !important; }
  #tnd-chat-bootstrap-halo::before { inset: -5px; }
}

/* Public selects use their wrapper's icon or one background caret. */
.home-portal select.portal-select {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
}
.sort { align-items: center; }
.sort select { height: 38px; padding-block: 0 !important; }
.property-detail-page .detail-map-overlay-card {
  position: static;
  background: #fff;
  margin-top: 8px;
  box-shadow: none;
}
@media (max-width: 760px) {
  body:has(#tnd-chat-bootstrap-host) #root {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  body:has(#tnd-chat-bootstrap-host) :is(.home-portal, .listings-hero) {
    scroll-margin-bottom: 72px;
  }
}

/* Keep all landing page property card photos uniform in height and aspect ratio. */
.property-card .property-photo {
  height: 225px;
  min-height: 225px;
  max-height: 225px;
  overflow: hidden;
}
.property-card .property-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 760px) {
  .property-card .property-photo {
    height: 210px;
    min-height: 210px;
    max-height: 210px;
  }
}

/* Keep Featured Projects cards and thumbnails uniform in height on desktop & mobile. */
.portal-project-card {
  height: 205px;
  min-height: 205px;
  max-height: 205px;
}
.portal-project-thumb {
  height: 100% !important;
  min-height: 0 !important;
  flex-shrink: 0;
}
.portal-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 760px) {
  .portal-project-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .portal-project-thumb {
    width: 100%;
    height: 190px !important;
  }
}
