/* =============================================================================
   Match House — Smart Link prototype · part 2
   Chat · Story tour · Match summary · Share sheet
   ============================================================================= */

/* ---------------------------------------------------------------------------
   CHAT — conversational AI
   --------------------------------------------------------------------------- */
.sl-chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg-1, #f1f1f1); }
.sl-chat__head {
  padding: 50px 16px 14px; display: flex; align-items: center; gap: 12px;
  background: var(--bg-2, #fff); border-bottom: 1px solid var(--border-subtle, #e4e5ea);
}
.sl-chat__back, .sl-chat__menu {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-3, #f1f1f1); color: var(--fg-1, #00073e);
  display: grid; place-items: center; font-size: 17px;
}
.sl-chat__id { flex: 1; display: flex; align-items: center; gap: 10px; }
.sl-chat__orb { width: 38px; height: 38px; border-radius: 50%; background: var(--mh-gradient-symbol); position: relative; }
.sl-chat__orb::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--mh-cyan); border: 2px solid var(--bg-2, #fff); }
.sl-chat__name { font-size: 15px; font-weight: 600; color: var(--fg-1, #00073e); display: flex; align-items: center; gap: 5px; }
.sl-chat__name i { font-size: 13px; color: var(--mh-blue); }
.sl-chat__status { font-size: 11px; color: var(--fg-3, #6c7081); }

.sl-chat__body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.sl-chat__body::-webkit-scrollbar { display: none; }
.sl-chat__note {
  align-self: center; text-align: center; max-width: 280px;
  font-size: 10.5px; line-height: 1.4; color: var(--fg-3, #6c7081);
  background: rgba(0,239,255,0.1); padding: 7px 12px; border-radius: 12px; margin-bottom: 4px;
}
.sl-msg { display: flex; max-width: 84%; animation: slMsgIn 280ms var(--ease-out); }
@keyframes slMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sl-msg--you { align-self: flex-end; }
.sl-msg--ai { align-self: flex-start; }
.sl-bubble { padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.sl-bubble--ai { background: var(--bg-2, #fff); color: var(--fg-1, #00073e); box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; }
.sl-bubble--you { background: var(--mh-blue); color: #fff; border-bottom-right-radius: 6px; }

/* inline property match in chat */
.sl-chatcard {
  align-self: flex-start; width: 78%;
  background: var(--bg-2, #fff); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-md); cursor: pointer; border: none; padding: 0; text-align: left;
  animation: slMsgIn 320ms var(--ease-out);
}
.sl-chatcard__img { height: 120px; position: relative; }
.sl-chatcard__match { position: absolute; top: 10px; left: 10px; background: rgba(0,239,255,0.92); color: var(--mh-navy); font-family: var(--font-display); font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.sl-chatcard__body { padding: 11px 13px 13px; }
.sl-chatcard__title { font-size: 14px; font-weight: 600; color: var(--fg-1, #00073e); }
.sl-chatcard__price { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--mh-blue); margin-top: 2px; }
.sl-chatcard__cta { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--mh-blue); display: flex; align-items: center; gap: 4px; }

.sl-typing { align-self: flex-start; padding: 12px 15px; background: var(--bg-2, #fff); border-radius: 18px; border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); display: inline-flex; gap: 4px; }
.sl-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mh-cyan); animation: slBob 1.2s var(--ease-in-out) infinite; }
.sl-typing span:nth-child(2) { animation-delay: 0.15s; }
.sl-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes slBob { 0%,60%,100%{transform:translateY(0);opacity:0.5;} 30%{transform:translateY(-4px);opacity:1;} }

.sl-chat__quick { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
.sl-chat__quick::-webkit-scrollbar { display: none; }
.sl-chat__chip {
  flex-shrink: 0; background: var(--bg-2, #fff); border: 1px solid var(--border-subtle, #e4e5ea);
  border-radius: 999px; padding: 8px 14px; font: 500 12.5px var(--font-sans);
  color: var(--fg-1, #00073e); cursor: pointer; white-space: nowrap;
}
.sl-chat__chip:active { background: var(--mh-cyan); }
.sl-composer { display: flex; gap: 8px; padding: 10px 14px 26px; background: var(--bg-2, #fff); border-top: 1px solid var(--border-subtle, #e4e5ea); }
.sl-composer input { flex: 1; border: none; outline: none; background: var(--bg-3, #f1f1f1); border-radius: 999px; padding: 11px 16px; font: 400 14px var(--font-sans); color: var(--fg-1, #00073e); }
.sl-composer button { width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--mh-blue); color: #fff; font-size: 17px; cursor: pointer; flex-shrink: 0; }

/* ---------------------------------------------------------------------------
   STORY — immersive vertical property tour
   --------------------------------------------------------------------------- */
.sl-story { position: absolute; inset: 0; background: #000; overflow: hidden; }
.sl-story__bg { position: absolute; inset: 0; transition: background 500ms var(--ease-out); }
.sl-story__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,7,62,0.5) 0%, transparent 26%, transparent 44%, rgba(0,7,62,0.92) 78%, rgba(0,7,62,0.98) 100%); }
.sl-story__bars { position: absolute; top: 48px; left: 14px; right: 14px; display: flex; gap: 5px; z-index: 10; }
.sl-story__bar { flex: 1; height: 3px; border-radius: 999px; background: rgba(255,255,255,0.3); overflow: hidden; }
.sl-story__barfill { height: 100%; background: #fff; width: 0; }
.sl-story__barfill.is-done { width: 100%; }
.sl-story__barfill.is-active { width: 100%; transition: width 4s linear; }
.sl-story__top { position: absolute; top: 62px; left: 16px; right: 16px; z-index: 10; display: flex; align-items: center; gap: 10px; }
.sl-story__av { width: 34px; height: 34px; border-radius: 50%; background: var(--mh-gradient-symbol); border: 2px solid rgba(255,255,255,0.6); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; }
.sl-story__who { flex: 1; color: #fff; }
.sl-story__who b { font-size: 13px; font-weight: 600; display: block; line-height: 1.2; }
.sl-story__who span { font-size: 11px; opacity: 0.8; }
.sl-story__close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.sl-story__seglabel { position: absolute; top: 110px; left: 16px; z-index: 10; color: #fff; font-size: 12px; font-weight: 500; background: rgba(0,0,0,0.25); padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px); }

.sl-story__nav { position: absolute; inset: 0; z-index: 5; display: flex; }
.sl-story__nav button { flex: 1; background: none; border: none; cursor: pointer; }

.sl-story__info { position: absolute; left: 18px; right: 18px; bottom: 110px; z-index: 10; color: #fff; }
.sl-story__match { display: inline-flex; align-items: center; gap: 5px; background: rgba(0,239,255,0.92); color: var(--mh-navy); font-family: var(--font-display); font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 999px; margin-bottom: 12px; }
.sl-story__title { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.sl-story__bairro { font-size: 13px; color: rgba(255,255,255,0.9); margin: 6px 0 0; text-shadow: 0 1px 8px rgba(0,7,62,0.5); }
.sl-story__price { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--mh-cyan); margin-top: 12px; }
.sl-story__specs { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; }
.sl-story__specs i { font-size: 15px; margin-right: 3px; vertical-align: -2px; }
.sl-story__pitch { font-size: 13.5px; line-height: 1.5; margin: 14px 0 0; color: rgba(255,255,255,0.92); max-width: 300px; text-shadow: 0 1px 8px rgba(0,7,62,0.5); }

.sl-story__actions { position: absolute; left: 16px; right: 16px; bottom: 30px; z-index: 12; display: flex; gap: 10px; }
.sl-story__wpp { flex: 1; border: none; cursor: pointer; background: var(--mh-cyan); color: var(--mh-navy); border-radius: 999px; padding: 14px; font: 700 14px var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sl-story__sharebtn { width: 50px; border: none; cursor: pointer; background: rgba(255,255,255,0.18); backdrop-filter: blur(8px); color: #fff; border-radius: 999px; font-size: 19px; display: grid; place-items: center; }

/* ---------------------------------------------------------------------------
   SHARE SHEET — the shareable 9:16 card + actions
   --------------------------------------------------------------------------- */
.sl-sheet { position: absolute; inset: 0; z-index: 70; background: rgba(0,7,62,0.7); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease-out); }
.sl-sheet.is-open { opacity: 1; pointer-events: auto; }
.sl-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-1, #f1f1f1); border-radius: 30px 30px 0 0;
  padding: 12px 18px 28px; transform: translateY(100%); transition: transform 360ms var(--ease-emphasized);
  max-height: 92%; overflow-y: auto; scrollbar-width: none;
}
.sl-sheet.is-open .sl-sheet__panel { transform: none; }
.sl-sheet__grab { width: 42px; height: 5px; border-radius: 999px; background: var(--mh-gray-300); margin: 0 auto 14px; }
.sl-sheet__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; text-align: center; margin: 0 0 4px; color: var(--fg-1, #00073e); }
.sl-sheet__sub { text-align: center; font-size: 12.5px; color: var(--fg-3, #6c7081); margin: 0 0 18px; }

/* the actual shareable card (9:16 vibe, scaled) */
.sl-storycard {
  width: 230px; aspect-ratio: 9/16; margin: 0 auto 18px;
  border-radius: 22px; overflow: hidden; position: relative;
  box-shadow: var(--shadow-xl); color: #fff;
}
.sl-storycard__bg { position: absolute; inset: 0; }
.sl-storycard__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,7,62,0.5) 0%, transparent 30%, transparent 55%, rgba(0,7,62,0.92) 100%); }
.sl-storycard__top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.sl-storycard__top img { height: 15px; filter: brightness(0) invert(1); }
.sl-storycard__top span { font-size: 10px; font-weight: 600; opacity: 0.9; }
.sl-storycard__match { position: absolute; top: 52px; left: 16px; z-index: 2; background: var(--mh-cyan); color: var(--mh-navy); font-family: var(--font-display); font-weight: 800; font-size: 11px; padding: 4px 9px; border-radius: 999px; }
.sl-storycard__body { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; }
.sl-storycard__title { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
.sl-storycard__price { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--mh-cyan); margin: 6px 0 10px; }
.sl-storycard__foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.2); }
.sl-storycard__qr { width: 38px; height: 38px; border-radius: 7px; background: #fff; padding: 3px; flex-shrink: 0; }
.sl-storycard__qr svg { display: block; width: 100%; height: 100%; }
.sl-storycard__handle { font-size: 10px; line-height: 1.3; }
.sl-storycard__handle b { display: block; font-size: 11px; }
.sl-storycard__handle span { opacity: 0.8; }

/* share actions */
.sl-share__actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.sl-share__act { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font: 500 10.5px var(--font-sans); color: var(--fg-2, #2c3043); }
.sl-share__ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #fff; }
.sl-share__copy { display: flex; align-items: center; gap: 10px; background: var(--bg-2, #fff); border: 1px solid var(--border-subtle, #e4e5ea); border-radius: 14px; padding: 12px 14px; }
.sl-share__copy i { color: var(--mh-blue); font-size: 17px; }
.sl-share__copy span { flex: 1; font-size: 13px; color: var(--fg-1, #00073e); font-weight: 500; }
.sl-share__copy button { border: none; background: var(--mh-navy); color: #fff; border-radius: 999px; padding: 7px 14px; font: 600 12px var(--font-sans); cursor: pointer; }

/* ---------------------------------------------------------------------------
   MATCH SUMMARY — AI-generated recap (shareable)
   --------------------------------------------------------------------------- */
.sl-summary { position: absolute; inset: 0; background: var(--mh-gradient-brand); color: #fff; padding: 56px 22px 28px; overflow-y: auto; scrollbar-width: none; }
.sl-summary::-webkit-scrollbar { display: none; }
.sl-summary__close { position: absolute; top: 52px; right: 18px; background: rgba(255,255,255,0.16); border: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 17px; cursor: pointer; z-index: 5; }
.sl-summary__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; display: flex; align-items: center; gap: 6px; }
.sl-summary__h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.06; letter-spacing: -0.02em; margin: 12px 0 6px; }
.sl-summary__by { font-size: 12.5px; opacity: 0.82; margin-bottom: 22px; }
.sl-summary__pref { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.sl-summary__chip { background: rgba(255,255,255,0.16); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 500; }
.sl-summary__list { display: flex; flex-direction: column; gap: 10px; }
.sl-summary__item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.1); border-radius: 16px; padding: 11px; backdrop-filter: blur(6px); }
.sl-summary__rank { font-family: var(--font-display); font-weight: 800; font-size: 18px; width: 26px; text-align: center; color: var(--mh-cyan); }
.sl-summary__thumb { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.sl-summary__info { flex: 1; }
.sl-summary__info b { font-size: 13.5px; font-weight: 600; display: block; }
.sl-summary__info span { font-size: 11.5px; opacity: 0.8; }
.sl-summary__pct { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--mh-cyan); }
.sl-summary__cta { margin-top: 22px; width: 100%; border: none; cursor: pointer; background: #fff; color: var(--mh-navy); border-radius: 999px; padding: 15px; font: 700 14.5px var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------------------------------------------------------------------------
   Toast
   --------------------------------------------------------------------------- */
.sl-toast {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--mh-navy); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; z-index: 90; opacity: 0; pointer-events: none;
  transition: all 280ms var(--ease-out); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  box-shadow: var(--shadow-lg);
}
.sl-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sl-toast i { color: var(--mh-cyan); font-size: 16px; }
