/* Property Match wizard modal. */

/* FAB pill is now a <button>: strip native chrome (visual styling lives in footer.css). */
button.te-fab__pill { font: inherit; cursor: pointer; }

.te-match { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .te-match { align-items: center; padding: 24px; } }
.te-match[hidden] { display: none; }
.te-match__backdrop { position: absolute; inset: 0; background: rgba(10, 12, 16, 0.55); backdrop-filter: blur(3px); }

.te-match__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 720px;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--te-surface, #fff); color: var(--te-ink, #14171c);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 24px 70px rgba(8, 10, 14, 0.4);
  overflow: hidden;
  animation: te-match-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 640px) { .te-match__panel { border-radius: 22px; } }
@keyframes te-match-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.te-match__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--te-ink-deepest, #0b0c0e); color: #fff; }
.te-match__brand { display: flex; align-items: center; gap: 12px; }
.te-match__spark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: var(--te-accent, #2f6bff); font-size: 16px; }
.te-match__brand strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.te-match__brand em { display: block; font-style: normal; font-size: 12px; opacity: 0.6; }
.te-match__x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 15px; cursor: pointer; transition: background 0.15s ease; }
.te-match__x:hover { background: rgba(255, 255, 255, 0.22); }

.te-match__prog { height: 3px; background: var(--te-border, #e7e9ee); }
.te-match__progbar { display: block; height: 100%; width: 0; background: var(--te-accent, #2f6bff); transition: width 0.3s ease; }

.te-match__body { padding: 26px 24px 8px; overflow-y: auto; flex: 1; }
.te-match__foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px 22px; border-top: 1px solid var(--te-border, #e7e9ee); }
.te-match__foot .te-match__next { margin-left: auto; }

.te-match__h { font-size: clamp(20px, 3.2vw, 25px); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 18px; }
.te-match__hint { display: inline; font-size: 0.68em; font-weight: 500; color: var(--te-muted, #6b7280); }
.te-match__intro { text-align: center; padding: 16px 4px 8px; }
.te-match__lead { font-size: 16px; line-height: 1.6; color: var(--te-muted, #6b7280); max-width: 460px; margin: 10px auto 0; }
.te-match__go { margin: 0 auto; min-width: 200px; }

.te-match__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .te-match__grid { grid-template-columns: 1fr; } }
.te-match__grid--areas { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.te-match__opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 15px 16px; border: 1.5px solid var(--te-border, #e7e9ee); border-radius: 14px;
  background: var(--te-surface, #fff); color: var(--te-ink, #14171c); cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.te-match__opt:hover { border-color: var(--te-border-hover, #c9ccd4); }
.te-match__opt.is-on { border-color: var(--te-accent, #2f6bff); background: var(--te-accent-tint, #eef3ff); box-shadow: inset 0 0 0 1px var(--te-accent, #2f6bff); }
.te-match__opt--wide { grid-column: 1 / -1; }
.te-match__emoji { font-size: 22px; flex: none; }
.te-match__opttext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.te-match__optlabel { font-weight: 600; font-size: 15px; }
.te-match__optsub { font-size: 12.5px; color: var(--te-muted, #6b7280); line-height: 1.4; }
.te-match__tick { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; background: var(--te-accent, #2f6bff); opacity: 0; transform: scale(0.6); transition: opacity 0.14s ease, transform 0.14s ease; }
.te-match__opt.is-on .te-match__tick { opacity: 1; transform: none; }

/* Area chips: compact */
.te-match__chip { flex-direction: row; padding: 12px 14px; }
.te-match__chip .te-match__optsub { margin-left: auto; opacity: 0.6; font-weight: 600; }
.te-match__search { width: 100%; padding: 12px 15px; margin-bottom: 14px; border: 1.5px solid var(--te-border, #e7e9ee); border-radius: 12px; font: inherit; background: var(--te-surface, #fff); color: var(--te-ink, #14171c); }
.te-match__search:focus { outline: none; border-color: var(--te-accent, #2f6bff); }
.te-match__loading { color: var(--te-muted, #6b7280); padding: 20px 0; }

.te-match__back { border: 0; background: none; color: var(--te-muted, #6b7280); font: inherit; font-weight: 500; cursor: pointer; padding: 8px 4px; }
.te-match__back:hover { color: var(--te-ink, #14171c); }
.te-match__next:disabled { opacity: 0.45; cursor: not-allowed; }

/* Results */
.te-match__resulthead { margin-bottom: 18px; }
.te-match__resultsub { font-size: 14px; color: var(--te-muted, #6b7280); margin: 6px 0 0; line-height: 1.55; }
.te-match__results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .te-match__results { grid-template-columns: 1fr; } }
.te-match__card { display: flex; flex-direction: column; border: 1px solid var(--te-border, #e7e9ee); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease; }
.te-match__card:hover { border-color: var(--te-border-hover, #c9ccd4); box-shadow: 0 10px 26px rgba(16, 18, 20, 0.1); transform: translateY(-2px); }
.te-match__cardimg { position: relative; aspect-ratio: 16 / 10; background: var(--te-photo-base, #dfe3ea) center / cover no-repeat; }
.te-match__badge { position: absolute; top: 10px; left: 10px; background: var(--te-accent, #2f6bff); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.te-match__cardbody { padding: 13px 14px 15px; }
.te-match__cardtitle { font-size: 15px; font-weight: 700; margin: 0 0 3px; line-height: 1.25; }
.te-match__cardmeta { font-size: 12.5px; color: var(--te-muted, #6b7280); margin: 0 0 8px; }
.te-match__cardprice { font-size: 13.5px; margin: 0 0 8px; }
.te-match__cardprice strong { color: var(--te-accent, #2f6bff); }
.te-match__cardnote { display: inline-block; font-size: 11.5px; color: var(--te-muted, #6b7280); background: var(--te-fill, #f4f6f9); padding: 3px 9px; border-radius: 999px; }

/* Lead capture on results */
.te-match__lead { margin-top: 22px; padding: 20px; border-radius: 16px; background: var(--te-accent-tint, #eef3ff); border: 1px solid var(--te-accent-tint-border, #d6e0ff); }
.te-match__leadh { font-size: 16px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.te-match__leadsub { font-size: 13.5px; color: var(--te-muted, #6b7280); margin: 0 0 14px; line-height: 1.5; }
.te-match__leadform { display: flex; flex-direction: column; gap: 10px; }
.te-match__leadrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .te-match__leadrow { grid-template-columns: 1fr; } }
.te-match__leadform input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--te-border, #e7e9ee); border-radius: 11px; font: inherit; background: var(--te-surface, #fff); color: var(--te-ink, #14171c); }
.te-match__leadform input:focus { outline: none; border-color: var(--te-accent, #2f6bff); }
.te-match__leadform button { justify-content: center; margin-top: 2px; }
.te-match__hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.te-match__leadmsg { font-size: 13px; margin: 4px 0 0; }
.te-match__leadmsg.is-err { color: #c0392b; }
.te-match__leaddone { text-align: center; padding: 8px 4px; }
.te-match__leadtick { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--te-accent, #2f6bff); color: #fff; font-size: 20px; margin-bottom: 10px; }

.te-match__alt { text-align: center; font-size: 13.5px; color: var(--te-muted, #6b7280); margin: 16px 0 2px; }
.te-match__alt a { color: var(--te-accent, #2f6bff); font-weight: 600; text-decoration: none; }
.te-match__alt a:hover { text-decoration: underline; }
.te-match__restart { margin-left: auto; border: 0; background: none; color: var(--te-muted, #6b7280); font: inherit; font-weight: 500; cursor: pointer; }
.te-match__restart:hover { color: var(--te-ink, #14171c); }
