/* Houzez Price Estimator widget */
.houzez-pe-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 10002;
}
.houzez-pe-modal[aria-hidden="false"] {
  display: block;
}

.houzez-pe-sheet {
  position: absolute;
  right: 20px;
  bottom: 100px;
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10003;
}

.houzez-pe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: none;
  background: linear-gradient(135deg, #1a5f4a 0%, #2d8a6a 100%);
  color: #fff;
}
.houzez-pe-header strong {
  font-size: 15px;
}
.houzez-pe-header button {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.houzez-pe-results {
  padding: 14px 16px 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 420px;
}

.houzez-pe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hz-pe-chip {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef7f3;
  color: #1a5f4a;
  border: 1px solid #c5e6d6;
  line-height: 1.3;
}

/* —— Estimate card —— */
.houzez-pe-estimate-card {
  background: linear-gradient(180deg, #f4fbf7 0%, #ffffff 42%);
  border: 1px solid #cfe8dc;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 95, 74, 0.08);
}

.houzez-pe-estimate-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 18px 16px 14px;
  background: linear-gradient(135deg, #1a5f4a 0%, #2a7a5f 100%);
  color: #fff;
}

.houzez-pe-estimate-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.houzez-pe-price-period {
  font-size: 0.55em;
  font-weight: 600;
  opacity: 0.92;
  margin-inline-start: 0.15em;
}

.houzez-pe-suggested {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.houzez-pe-confidence {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.houzez-pe-confidence--high {
  background: rgba(255, 255, 255, 0.28);
}
.houzez-pe-confidence--medium {
  background: rgba(255, 236, 179, 0.35);
  border-color: rgba(255, 220, 120, 0.5);
}
.houzez-pe-confidence--low,
.houzez-pe-confidence--none {
  background: rgba(0, 0, 0, 0.15);
}

.houzez-pe-range-block {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e8f2ed;
}

.houzez-pe-range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.houzez-pe-range-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a5f4a;
}

.houzez-pe-range-values {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

.houzez-pe-range-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e2eee8;
  margin-bottom: 8px;
}

.houzez-pe-range-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #a8d5c4 0%, #2d8a6a 100%);
  opacity: 0.45;
}

.houzez-pe-range-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-inline-start: -7px;
  border-radius: 50%;
  background: #1a5f4a;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.houzez-pe-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #666;
}

.houzez-pe-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 14px;
}

.houzez-pe-stat {
  background: #fff;
  border: 1px solid #e8f0ec;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.houzez-pe-stat-label {
  font-size: 11px;
  color: #777;
  line-height: 1.3;
}

.houzez-pe-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a5f4a;
  line-height: 1.2;
}

/* —— Similar listings —— */
.houzez-pe-comps-section {
  margin-top: 4px;
}

.houzez-pe-comps-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #333;
}

.hz-pe-card {
  display: block;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #e6ece9;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hz-pe-card:hover {
  border-color: #b8dcc8;
  box-shadow: 0 2px 10px rgba(26, 95, 74, 0.1);
}

.hz-pe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.hz-pe-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  flex: 1;
}

.hz-pe-sim-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef7f3;
  color: #1a5f4a;
  border: 1px solid #c5e6d6;
}

.hz-pe-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hz-pe-metric {
  font-size: 12px;
  color: #444;
  background: #f6f8f7;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.3;
}
.hz-pe-metric em {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: #888;
  margin-bottom: 2px;
}
.hz-pe-metric--adj {
  background: #eef7f3;
  color: #1a5f4a;
  font-weight: 600;
}

.houzez-pe-notes {
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fff8e6 0%, #fffdf5 100%);
  border-block: 1px solid #f0d78c;
  line-height: 1.55;
}

.houzez-pe-notes-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9a6b00;
  margin-bottom: 8px;
}

.houzez-pe-notes-list {
  margin: 0;
  padding: 0 18px 0 0;
  list-style: disc;
}

.houzez-pe-notes-list li {
  font-size: 12px;
  color: #6b5420;
  margin-bottom: 4px;
}

.houzez-pe-notes-list li:last-child {
  margin-bottom: 0;
}
.houzez-pe-msg {
  padding: 8px;
  color: #444;
}

.houzez-pe-size-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.houzez-pe-size-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.houzez-pe-size-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

.houzez-pe-size-submit {
  background: #1a5f4a;
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.houzez-pe-size-submit:hover {
  background: #164d3d;
}

.houzez-pe-login-prompt {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
  text-align: center;
}

.houzez-pe-login-msg {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

.houzez-pe-login-btn {
  width: 100%;
}

#houzez-pe-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eee;
}
#houzez-pe-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
#houzez-pe-form button {
  background: #1a5f4a;
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
#houzez-pe-form button:hover {
  background: #164d3d;
}

/* Inline button next to property price */
.houzez-pe-price-actions {
  min-width: 140px;
  flex-shrink: 0;
}

.property-header-wrap .houzez-pe-price-actions,
.page-title-wrap .houzez-pe-price-actions {
  text-align: end;
}

.houzez-pe-trigger--inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, #1a5f4a 0%, #2d8a6a 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 95, 74, 0.35);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.houzez-pe-trigger--inline:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.houzez-pe-trigger--inline:disabled,
.houzez-pe-trigger--inline.is-loading {
  opacity: 0.65;
  cursor: wait;
}

.mobile-property-title .houzez-pe-trigger--inline {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .houzez-pe-sheet {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 20px;
  }
}
