/* ================================================================
   ASK AASHI — chat assistant + quick enquiry widget
   Reuses the brand tokens already defined on :root in style.css
   (--charcoal, --steel, --safety, --concrete, --font-display, --seam …)
   ================================================================ */

.acw-root{ font-family:var(--font-body); }

/* ---------------- Floating button cluster ---------------- */
/* Chat launcher sits bottom-right, on-brand (blueprint corner tick +
   precast-panel silhouette). The enquiry launcher is a separate vertical
   tab, fixed to the mid-right edge, out of the chat launcher's way. */
.acw-launcher{
  position:fixed; right:20px; bottom:20px; z-index:99990;
  width:54px; height:54px; border-radius:15px;
  color:var(--white); border:none; display:flex; align-items:center; justify-content:center;
  cursor:pointer; overflow:hidden;
  background:linear-gradient(135deg, var(--steel) 0%, var(--steel-dark) 100%);
  box-shadow:0 10px 26px rgba(166,58,46,.32), 0 2px 8px rgba(27,31,35,.3);
  transition:background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.acw-launcher::before{
  /* blueprint registration tick — same signature detail as the chat window,
     so the launcher itself reads as "Aashi", not a generic chat icon */
  content:""; position:absolute; top:7px; left:7px; width:9px; height:9px;
  border-top:2px solid rgba(255,255,255,.55); border-left:2px solid rgba(255,255,255,.55);
  pointer-events:none;
}
.acw-launcher::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
  background:radial-gradient(120% 140% at 15% 10%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%);
  pointer-events:none;
}
.acw-launcher:hover{ transform:translateY(-2px); box-shadow:0 14px 30px rgba(166,58,46,.4), 0 4px 10px rgba(27,31,35,.32); }
.acw-launcher:active{ transform:translateY(0) scale(.96); }
.acw-launcher i{ font-size:1.28rem; position:relative; z-index:1; }
.acw-launcher .acw-ic-close{ display:none; }
.acw-root.is-open .acw-launcher .acw-ic-open{ display:none; }
.acw-root.is-open .acw-launcher .acw-ic-close{ display:block; }
.acw-root.is-open .acw-launcher{ border-radius:50%; }

/* ---- Enquiry launcher: fixed vertical tab, mid-right edge ---- */
.acw-eq-launcher{
  --eqw:154px; --eqh:44px;
  position:fixed; top:50%; right:0; z-index:99988;
  width:var(--eqw); height:var(--eqh);
  background:var(--safety); color:var(--white); border:none;
  display:flex; align-items:center; justify-content:center; gap:8px;
  border-radius:10px 10px 0 0;
  cursor:pointer; box-shadow:0 8px 22px rgba(27,31,35,.28);
  font-family:var(--font-body); font-weight:600; font-size:.82rem; letter-spacing:.02em; white-space:nowrap;
  transform-origin:center center;
  transform:translate(calc((var(--eqw) - var(--eqh)) / 2), -50%) rotate(-90deg);
  transition:background .2s ease, box-shadow .2s ease;
}
.acw-eq-launcher:hover{ background:var(--safety-dark); box-shadow:0 10px 26px rgba(27,31,35,.32); }
.acw-eq-launcher:active{ background:var(--safety-dark); }
.acw-eq-launcher i{ font-size:1rem; }

.acw-ping{
  position:absolute; inset:0; border-radius:inherit;
  border:2px solid var(--safety); animation:acwPing 2.6s ease-out infinite;
}
.acw-root.is-open .acw-ping{ display:none; }

.acw-badge{
  position:absolute; top:-2px; right:-2px; width:14px; height:14px;
  background:var(--safety); border:2px solid var(--white); border-radius:50%;
}
.acw-root.is-open .acw-badge,
.acw-root.acw-interacted .acw-badge{ display:none; }

@keyframes acwPing{
  0%{ transform:scale(.92); opacity:.55; }
  70%{ transform:scale(1.7); opacity:0; }
  100%{ opacity:0; }
}

/* ---------------- Teaser bubble ---------------- */
.acw-teaser{
  position:fixed; right:20px; bottom:82px; z-index:99989;
  max-width:220px; background:var(--white); color:var(--charcoal);
  border:1px solid var(--concrete-dark); border-radius:14px 14px 4px 14px;
  padding:11px 28px 11px 13px; font-size:.82rem; line-height:1.4;
  box-shadow:0 12px 30px rgba(27,31,35,.18);
  opacity:0; transform:translateY(10px) scale(.96); pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
}
.acw-teaser.is-visible{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.acw-teaser-close{
  position:absolute; top:5px; right:7px; border:none; background:none;
  color:var(--slate); font-size:.95rem; line-height:1; cursor:pointer; padding:4px;
}
.acw-teaser-close:hover{ color:var(--steel); }

/* ---------------- Chat window ---------------- */
.acw-window{
  position:fixed; right:20px; bottom:82px; z-index:99991;
  width:min(360px, calc(100vw - 28px));
  height:min(540px, 74vh);
  background:var(--white); border-radius:16px; overflow:hidden;
  box-shadow:0 22px 54px rgba(27,31,35,.26);
  display:flex; flex-direction:column;
  opacity:0; transform:translateY(16px) scale(.94); transform-origin:bottom right;
  pointer-events:none; transition:opacity .26s cubic-bezier(.2,.8,.3,1), transform .26s cubic-bezier(.2,.8,.3,1);
}
.acw-root.is-open .acw-window{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }

/* blueprint registration marks — shared signature detail, reused on the enquiry popup too */
.acw-corner{ position:absolute; width:12px; height:12px; border:2px solid var(--steel); opacity:.5; pointer-events:none; z-index:5; }
.acw-corner.tl{ top:6px; left:6px; border-right:none; border-bottom:none; }
.acw-corner.tr{ top:6px; right:6px; border-left:none; border-bottom:none; }
.acw-corner.bl{ bottom:6px; left:6px; border-right:none; border-top:none; }
.acw-corner.br{ bottom:6px; right:6px; border-left:none; border-top:none; }

/* ---------------- Header (light, not the old dark charcoal) ---------------- */
.acw-header{
  position:relative; flex:none; display:flex; align-items:center; gap:11px;
  padding:13px 14px; background:var(--white); color:var(--charcoal);
  border-bottom:1px solid var(--concrete-dark); overflow:hidden;
}
.acw-header::before{
  content:""; position:absolute; inset:0; background:var(--seam); opacity:.6; pointer-events:none;
}
.acw-avatar{
  position:relative; z-index:1; flex:none; width:34px; height:34px; border-radius:50%;
  background:var(--steel); display:flex; align-items:center; justify-content:center; color:var(--white); font-size:.95rem;
}
.acw-header-text{ position:relative; z-index:1; flex:1; min-width:0; }
.acw-title{ font-family:var(--font-display); font-weight:700; font-size:.96rem; line-height:1.2; color:var(--charcoal); }
.acw-subtitle{ display:flex; align-items:center; gap:6px; font-size:.72rem; color:var(--slate); margin-top:2px; }
.acw-status-dot{ width:6px; height:6px; border-radius:50%; background:var(--safety); box-shadow:0 0 0 rgba(0,58,112,.6); animation:acwDot 2s ease-in-out infinite; flex:none; }
@keyframes acwDot{ 0%,100%{ box-shadow:0 0 0 0 rgba(0,58,112,.55);} 50%{ box-shadow:0 0 0 5px rgba(0,58,112,0);} }
.acw-minimize{
  position:relative; z-index:1; flex:none; width:26px; height:26px; border-radius:50%; border:none;
  background:rgba(27,31,35,.06); color:var(--charcoal); display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:background .2s ease; font-size:.8rem;
}
.acw-minimize:hover{ background:rgba(27,31,35,.12); }

/* ---------------- Body ---------------- */
.acw-body{
  flex:1; overflow-y:auto; padding:14px 14px 4px;
  background-color:var(--concrete);
  background-image:
    linear-gradient(rgba(166,58,46,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166,58,46,.045) 1px, transparent 1px);
  background-size:22px 22px;
}
.acw-body::-webkit-scrollbar{ width:7px; }
.acw-body::-webkit-scrollbar-track{ background:transparent; }
.acw-body::-webkit-scrollbar-thumb{ background:var(--concrete-dark); border-radius:10px; }
.acw-body::-webkit-scrollbar-thumb:hover{ background:var(--steel); }

.acw-msg{ display:flex; margin-bottom:11px; animation:acwPop .28s ease both; }
@keyframes acwPop{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:translateY(0);} }

.acw-bubble{ max-width:84%; padding:9px 12px; font-size:.85rem; line-height:1.46; }
.acw-msg-bot .acw-bubble{
  background:var(--white); color:var(--charcoal);
  border-left:3px solid var(--steel); border-radius:3px 12px 12px 12px;
  box-shadow:0 2px 8px rgba(27,31,35,.06);
}
.acw-msg-bot .acw-bubble strong{ color:var(--steel-dark); }
.acw-msg-user{ justify-content:flex-end; }
.acw-msg-user .acw-bubble{
  background:var(--steel); color:var(--white); margin-left:auto;
  border-radius:12px 3px 12px 12px;
}
.acw-bubble a{ color:inherit; text-decoration:underline; text-underline-offset:2px; }
.acw-msg-bot .acw-bubble a{ color:var(--steel); font-weight:600; }

.acw-typing .acw-bubble{ display:flex; align-items:center; gap:4px; padding:11px 13px; }
.acw-typing-dot{ width:6px; height:6px; border-radius:50%; background:var(--steel); animation:acwBounce 1.1s ease-in-out infinite; }
.acw-typing-dot:nth-child(2){ animation-delay:.15s; }
.acw-typing-dot:nth-child(3){ animation-delay:.3s; }
@keyframes acwBounce{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-4px); opacity:1; } }

/* ---------------- Quick replies ---------------- */
.acw-quick-replies{ flex:none; display:flex; flex-wrap:wrap; gap:6px; padding:2px 14px 11px; background:var(--concrete); }
.acw-chip{
  border:1px solid var(--concrete-dark); background:var(--white); color:var(--charcoal);
  border-radius:999px; padding:6px 11px; font-size:.75rem; font-weight:500; cursor:pointer;
  transition:border-color .18s ease, color .18s ease, transform .18s ease; white-space:nowrap;
}
.acw-chip:hover{ border-color:var(--steel); color:var(--steel-dark); transform:translateY(-1px); }
.acw-chip:active{ transform:translateY(0); }

/* ---------------- Input row ---------------- */
.acw-input-row{ flex:none; display:flex; gap:7px; padding:10px 12px; border-top:1px solid var(--concrete-dark); background:var(--white); }
.acw-input{
  flex:1; min-width:0; border:1px solid var(--concrete-dark); border-radius:999px; padding:9px 14px;
  font-family:var(--font-body); font-size:.83rem; color:var(--charcoal); background:var(--concrete);
  transition:border-color .18s ease, background .18s ease;
}
.acw-input:focus{ outline:none; border-color:var(--steel); background:var(--white); }
.acw-send{
  flex:none; width:34px; height:34px; border-radius:50%; border:none; background:var(--steel);
  color:var(--white); display:flex; align-items:center; justify-content:center; cursor:pointer;
  font-size:.85rem; transition:background .18s ease, transform .18s ease;
}
.acw-send:hover{ background:var(--steel-dark); transform:scale(1.05); }
.acw-send:disabled{ opacity:.4; pointer-events:none; }

.acw-footer-note{ flex:none; text-align:center; font-size:.66rem; color:var(--slate); padding:0 10px 9px; }
.acw-footer-note a{ color:var(--steel); font-weight:600; text-decoration:none; }
.acw-footer-note a:hover{ text-decoration:underline; }

/* ================================================================
   Quick Enquiry popup
   ================================================================ */
.acw-eq-overlay{
  position:fixed; inset:0; z-index:99995; background:rgba(27,31,35,.6);
  display:none; align-items:center; justify-content:center; padding:18px;
}
.acw-eq-overlay.is-open{ display:flex; }
.acw-eq-modal{
  position:relative; background:var(--white); width:min(420px, 100%);
  max-height:88vh; overflow-y:auto; border-radius:16px; padding:26px 24px 24px;
  box-shadow:0 30px 70px rgba(27,31,35,.35);
  scrollbar-width:thin; scrollbar-color:var(--steel) var(--concrete);
}
.acw-eq-modal::-webkit-scrollbar{ width:7px; }
.acw-eq-modal::-webkit-scrollbar-thumb{ background:var(--concrete-dark); border-radius:10px; }
.acw-eq-close{
  position:absolute; top:12px; right:12px; width:30px; height:30px; border-radius:50%;
  border:none; background:var(--concrete); color:var(--charcoal); cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:.95rem;
  transition:background .18s ease;
}
.acw-eq-close:hover{ background:var(--concrete-dark); }
.acw-eq-head{ margin:2px 26px 18px 0; }
.acw-eq-icon{
  width:42px; height:42px; border-radius:50%; background:var(--safety); color:var(--white);
  display:flex; align-items:center; justify-content:center; font-size:1.1rem; margin-bottom:10px;
}
.acw-eq-head h3{ font-family:var(--font-display); font-size:1.15rem; font-weight:700; color:var(--charcoal); margin:0 0 4px; }
.acw-eq-head p{ font-size:.85rem; color:var(--slate); margin:0; line-height:1.45; }
.acw-eq-form .form-floating-aashi{ margin-bottom:14px; }
.acw-eq-submit{ width:100%; justify-content:center; }

.acw-eq-success{ text-align:center; padding:8px 4px 4px; }
.acw-eq-success i{ font-size:2.4rem; color:var(--safety); margin-bottom:10px; display:block; }
.acw-eq-success p{ color:var(--charcoal); font-size:.92rem; line-height:1.5; margin:0 0 14px; }
.acw-eq-success a{ color:var(--steel); font-weight:600; font-size:.85rem; text-decoration:none; }
.acw-eq-success a:hover{ text-decoration:underline; }

/* ---------------- Mobile ---------------- */
@media (max-width:480px){
  .acw-window{
    right:10px; left:10px; bottom:10px; top:10px; width:auto; height:auto; border-radius:16px;
  }
  .acw-launcher{ right:14px; bottom:14px; }
  .acw-eq-launcher{ --eqw:128px; --eqh:38px; font-size:.76rem; }
  .acw-teaser{ right:14px; left:14px; max-width:none; bottom:76px; }
}

@media (prefers-reduced-motion:reduce){
  .acw-ping, .acw-status-dot, .acw-typing-dot, .acw-msg{ animation:none !important; }
  .acw-window, .acw-teaser, .acw-launcher, .acw-eq-launcher{ transition:none !important; }
}