/* =========================================================
   ARISE HOME — AI Consultant widget
   ========================================================= */
.ai-launcher {
  position: fixed; z-index: 55;
  right: 22px; bottom: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px;
  background: #1F1F1F;
  color: #FAF8F5;
  border-radius: 999px;
  border: 1px solid rgba(200,169,106,.35);
  box-shadow: 0 18px 40px -18px rgba(20,20,20,.5), 0 0 0 4px rgba(200,169,106,.1);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: .88rem; font-weight: 500; letter-spacing: .02em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.ai-launcher:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -18px rgba(20,20,20,.65), 0 0 0 6px rgba(200,169,106,.15); }
.ai-launcher i { color: var(--gold); font-size: 1rem; }
.ai-launcher__pulse {
  position: absolute; top: 12px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: #37D28A;
  box-shadow: 0 0 0 4px rgba(55,210,138,.22);
  animation: ai-pulse 1.8s ease-in-out infinite;
}
@keyframes ai-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(55,210,138,.22); } 50% { box-shadow: 0 0 0 8px rgba(55,210,138,.08); } }

.ai-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20,20,20,.5); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.ai-scrim.is-open { opacity: 1; pointer-events: auto; }

.ai-widget {
  position: fixed; z-index: 61;
  right: 22px; bottom: 22px;
  width: min(430px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 44px));
  background: var(--bg);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(20,20,20,.35);
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(.97);
  opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
  overflow: hidden;
}
.ai-widget.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
@media (max-width: 640px) {
  .ai-widget { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); border-radius: 18px; }
  .ai-launcher__label { display: none; }
  .ai-launcher { padding: 12px; }
  .ai-launcher i { font-size: 1.1rem; }
}

.ai-widget__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px;
  background: #1F1F1F;
  color: #FAF8F5;
  border-bottom: 1px solid #2a2a2a;
}
.ai-widget__head-brand { display: flex; align-items: center; gap: 12px; }
.ai-widget__avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: #0f0f0f; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(200,169,106,.3);
}
.ai-widget__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.05rem; }
.ai-widget__status { font-size: .72rem; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ai-widget__dot { width: 6px; height: 6px; border-radius: 50%; background: #37D28A; }
.ai-widget__close {
  width: 36px; height: 36px; border-radius: 50%;
  color: rgba(255,255,255,.7); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  cursor: pointer; transition: all .3s var(--ease);
}
.ai-widget__close:hover { background: rgba(255,255,255,.15); color: #fff; }

.ai-widget__tabs {
  display: flex; padding: 6px; gap: 4px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.ai-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .8rem; font-weight: 500;
  color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.ai-tab i { font-size: .82rem; }
.ai-tab.is-active { background: #1F1F1F; color: #FAF8F5; }
.ai-tab:hover:not(.is-active) { background: rgba(31,31,31,.06); color: var(--heading); }

.ai-pane {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.ai-pane.is-active { display: flex; }

/* ---- chat mode ---- */
.ai-thread {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 12px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.ai-bubble {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: .92rem;
  line-height: 1.55;
  animation: ai-fade .35s var(--ease);
}
@keyframes ai-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.ai-bubble p + p { margin-top: 8px; }
.ai-bubble--assistant { background: var(--card); border: 1px solid var(--border-soft); color: var(--heading); align-self: flex-start; border-top-left-radius: 6px; }
.ai-bubble--user      { background: #1F1F1F; color: #FAF8F5; align-self: flex-end; border-top-right-radius: 6px; }
.ai-bubble--typing { display: inline-flex; gap: 4px; padding: 16px; }
.ai-bubble--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .3; animation: ai-typing 1s ease-in-out infinite; }
.ai-bubble--typing span:nth-child(2) { animation-delay: .15s; }
.ai-bubble--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-typing { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.ai-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: .78rem;
  color: var(--heading);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.ai-chip:hover { background: var(--gold); color: #1F1F1F; border-color: var(--gold); }

.ai-composer {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.ai-composer input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: .92rem;
  color: var(--heading);
  outline: none;
  transition: border-color .3s var(--ease);
  min-width: 0;
}
.ai-composer input:focus { border-color: var(--gold); }
.ai-composer__voice, .ai-composer__tts {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-alt); color: var(--heading);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
  flex-shrink: 0;
}
.ai-composer__voice:hover, .ai-composer__tts:hover { background: var(--border); }
.ai-composer__voice.is-listening {
  background: var(--hot, #D9463C); color: #fff; border-color: transparent;
  animation: ai-mic-pulse 1.4s ease-in-out infinite;
}
@keyframes ai-mic-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,70,60,.45); } 50% { box-shadow: 0 0 0 10px rgba(217,70,60,0); } }
.ai-composer__tts.is-on { background: var(--emerald); color: #fff; border-color: transparent; }
.ai-composer__tts.is-speaking i {
  animation: ai-vol 1.1s ease-in-out infinite;
}
@keyframes ai-vol { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.ai-composer__send {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--cta); color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .3s var(--ease), transform .3s var(--ease);
  flex-shrink: 0;
}
.ai-composer__send:hover { background: var(--cta-deep); transform: translateY(-1px); }
.ai-live-caption {
  font-size: .78rem; color: var(--gold-deep); padding: 4px 18px 0; font-style: italic;
  min-height: 20px;
}
.ai-live-caption.is-active::before { content: "🎙 "; }

/* ---- recommend / compare forms ---- */
.ai-rec, .ai-cmp {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 22px;
}
.ai-rec__form, .ai-cmp__form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.ai-field { display: flex; flex-direction: column; gap: 6px; }
.ai-field--full { grid-column: 1 / -1; }
.ai-field label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); font-weight: 600; }
.ai-field input, .ai-field select {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--heading);
  outline: none;
}
.ai-field input:focus, .ai-field select:focus { border-color: var(--gold); }
.ai-rec__form .btn, .ai-cmp__form .btn { grid-column: 1 / -1; justify-content: center; margin-top: 4px; }

.ai-rec__result[hidden], .ai-cmp__result[hidden], .ai-lead__thanks[hidden] { display: none !important; }
.ai-rec__result, .ai-cmp__result { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); animation: ai-fade .5s var(--ease); }
.ai-rec-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--card);
  margin-bottom: 12px;
  display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: flex-start;
  transition: border-color .3s var(--ease);
}
.ai-rec-card:hover { border-color: var(--gold); }
.ai-rec-card__img { width: 80px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.ai-rec-card__name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--heading); }
.ai-rec-card__meta { font-size: .78rem; color: var(--text-soft); margin: 2px 0 6px; }
.ai-rec-card__why  { font-size: .86rem; color: var(--text); line-height: 1.55; }
.ai-rec-card__cta  { display: flex; gap: 8px; margin-top: 8px; }
.ai-rec-card__cta a { padding: 6px 12px; border-radius: 999px; background: var(--bg-alt); font-size: .74rem; color: var(--heading); }
.ai-rec-card__cta a:hover { background: var(--gold); color: #1F1F1F; }
.ai-cta-shortlist {
  padding: 14px;
  background: linear-gradient(120deg, rgba(200,169,106,.12), rgba(47,107,85,.08));
  border-radius: 12px;
  margin-top: 6px;
  text-align: center;
}
.ai-cta-shortlist p { font-size: .88rem; color: var(--heading); margin-bottom: 10px; }
.ai-cta-shortlist button {
  padding: 10px 20px; border-radius: 999px; background: var(--cta); color: #fff;
  font-size: .82rem; font-weight: 500; cursor: pointer;
}
.ai-cta-shortlist button:hover { background: var(--cta-deep); }

/* Compare table */
.ai-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.ai-cmp-table th, .ai-cmp-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
}
.ai-cmp-table th { font-family: var(--font-serif); font-weight: 500; color: var(--heading); font-size: .88rem; background: var(--bg-alt); position: sticky; top: 0; }
.ai-cmp-table td:first-child { font-weight: 500; color: var(--heading); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; width: 120px; }
.ai-cmp-verdict {
  padding: 16px;
  background: #1F1F1F;
  color: #FAF8F5;
  border-radius: 14px;
  margin-top: 14px;
}
.ai-cmp-verdict h4 { font-family: var(--font-serif); font-size: 1.1rem; color: var(--gold); margin-bottom: 8px; }
.ai-cmp-verdict p { font-size: .88rem; color: rgba(255,255,255,.85); }

.ai-error {
  padding: 12px 14px;
  background: rgba(216,155,61,.1);
  border: 1px solid rgba(216,155,61,.3);
  border-radius: 10px;
  color: var(--cta-deep);
  font-size: .86rem;
  margin: 10px 0;
}

/* ---- Lead overlay ---- */
.ai-lead[hidden] { display: none !important; }
.ai-lead {
  position: absolute; inset: 0; z-index: 5;
  background: var(--bg);
  padding: 20px 22px 26px;
  display: flex; flex-direction: column; gap: 12px;
  animation: ai-slide-up .35s var(--ease);
}
@keyframes ai-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ai-lead__back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-alt); color: var(--heading); align-self: flex-start; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ai-lead h3 { font-size: 1.4rem; margin-top: 4px; }
.ai-lead__desc { color: var(--text-soft); font-size: .92rem; }
.ai-lead__form { display: grid; gap: 12px; margin-top: 6px; }
.ai-lead__form .btn { justify-content: center; margin-top: 4px; }
.ai-lead__legal { font-size: .72rem; color: var(--text-soft); text-align: center; }
.ai-lead__thanks { text-align: center; padding: 30px 20px; animation: ai-fade .4s var(--ease); }
.ai-lead__thanks i { font-size: 3rem; color: var(--emerald); margin-bottom: 16px; }
.ai-lead__thanks h4 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 8px; }

/* Hide floating call/wa on desktop when AI launcher is present */
@media (min-width: 900px) {
  .float-actions__btn--call { display: none; }
}

/* ============ INVESTMENT INSIGHTS on project detail ============ */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.insight-card {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.insight-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.insight-card h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--heading);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.insight-card h4 i { color: var(--emerald); font-size: .95rem; }
.insight-card p { font-size: .9rem; line-height: 1.65; color: var(--text); }
.insight-suits {
  margin-top: 22px;
  padding: 22px 26px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(200,169,106,.14), rgba(47,107,85,.09));
  border: 1px solid rgba(200,169,106,.28);
}
.insight-suits__label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin-bottom: 8px; }
.insight-suits p { font-family: var(--font-cormo); font-size: 1.2rem; color: var(--heading); font-style: italic; line-height: 1.6; }
.insights-disclaimer { margin-top: 14px; font-size: .78rem; color: var(--text-soft); font-style: italic; }

.insights-skeleton .sk {
  height: 118px; border-radius: 14px;
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border-soft) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s linear infinite;
}
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 640px) {
  .insights-grid { grid-template-columns: 1fr; }
  .ai-rec__form, .ai-cmp__form { grid-template-columns: 1fr; }
  .ai-rec-card { grid-template-columns: 64px 1fr; }
  .ai-rec-card__img { width: 64px; }
}
