/* ============================================================
   Fastora engagement components v3.5.3
   Lead-capture popup + chat widget. Additive only: no existing
   selectors are overridden here.
   Palette: navy / indigo / cyan (theme tokens). Type: Sora.
   ============================================================ */

/* ---------- shared ---------- */
.feng-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border:0;border-radius:50%;
  background:rgba(14,27,51,.06);color:var(--ink,#0E1B33);cursor:pointer;
  transition:background .2s,transform .2s;
}
.feng-close:hover{background:rgba(14,27,51,.12);transform:rotate(90deg)}
.feng-close svg{width:16px;height:16px}

/* ---------- popup ---------- */
.feng-veil{
  position:fixed;inset:0;z-index:400;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  background:rgba(8,19,48,.55);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  opacity:0;visibility:hidden;
  transition:opacity .3s ease,visibility 0s linear .3s;
}
.feng-veil[data-open="true"]{opacity:1;visibility:visible;transition-delay:0s}
.feng-card{
  position:relative;width:min(560px,100%);max-height:calc(100vh - 40px);
  overflow:auto;border-radius:var(--r-xl,28px);
  background:var(--g-bg-2,rgba(255,255,255,.92));
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  border:1px solid var(--g-bd,rgba(255,255,255,.9));
  box-shadow:var(--g-sh,0 24px 48px -20px rgba(11,27,61,.28));
  padding:clamp(24px,4vw,40px);
  transform:translateY(24px) scale(.98);
  transition:transform .35s cubic-bezier(.22,1,.36,1);
  font-family:"Sora",system-ui,sans-serif;
}
.feng-veil[data-open="true"] .feng-card{transform:none}
.feng-card .feng-close{position:absolute;top:14px;right:14px}
.feng-eyebrow{
  margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--cyan,#0FB3A6);
}
.feng-title{
  margin:0 0 10px;font-size:clamp(22px,3.4vw,30px);line-height:1.2;
  font-weight:700;color:var(--navy,#0B1B3D);letter-spacing:-.01em;
}
.feng-sub{margin:0 0 20px;font-size:15px;line-height:1.6;color:var(--body,#475674)}
.feng-card-body .wpcf7{font-family:inherit}

/* fallback form (also styles CF7 fields when present) */
.feng-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.feng-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--ink,#0E1B33)}
.feng-field-wide{grid-column:1/-1}
.feng-field input,.feng-field select,.feng-field textarea,
.feng-card-body .wpcf7 input[type="text"],
.feng-card-body .wpcf7 input[type="email"],
.feng-card-body .wpcf7 input[type="tel"],
.feng-card-body .wpcf7 select,
.feng-card-body .wpcf7 textarea{
  width:100%;padding:12px 14px;border:1.5px solid var(--line-2,#CCD6E8);
  border-radius:var(--r-sm,10px);font-size:14px;font-family:inherit;
  color:var(--ink,#0E1B33);background:#fff;
  transition:border-color .2s,box-shadow .2s;
}
.feng-field input:focus,.feng-field select:focus,.feng-field textarea:focus,
.feng-card-body .wpcf7 input:focus,.feng-card-body .wpcf7 select:focus,.feng-card-body .wpcf7 textarea:focus{
  outline:none;border-color:var(--indigo,#2246C7);
  box-shadow:0 0 0 3px rgba(34,70,199,.14);
}
.feng-submit{width:100%;min-height:52px;font-size:16px}
.feng-note{margin:12px 0 0;font-size:13px;color:var(--muted,#5E6C88);text-align:center}

/* ---------- chat widget ---------- */
.feng-chat{position:fixed;right:20px;bottom:96px;z-index:390;font-family:"Sora",system-ui,sans-serif}
.feng-chat-fab{
  display:inline-flex;align-items:center;justify-content:center;
  width:60px;height:60px;border:0;border-radius:50%;cursor:pointer;
  background:var(--grad,linear-gradient(135deg,#2246C7,#0FB3A6));color:#fff;
  box-shadow:var(--sh-glow,0 18px 40px -16px rgba(34,70,199,.45));
  transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s;
}
.feng-chat-fab:hover{transform:translateY(-3px) scale(1.04)}
.feng-chat-fab svg{width:26px;height:26px}
.feng-fab-x{display:none}
.feng-chat[data-open="true"] .feng-fab-chat{display:none}
.feng-chat[data-open="true"] .feng-fab-x{display:block}
.feng-chat-panel{
  position:absolute;right:0;bottom:72px;width:min(340px,calc(100vw - 40px));
  border-radius:var(--r-lg,20px);overflow:hidden;
  background:var(--g-bg-2,rgba(255,255,255,.92));
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  border:1px solid var(--g-bd,rgba(255,255,255,.9));
  box-shadow:var(--g-sh,0 24px 48px -20px rgba(11,27,61,.28));
  opacity:0;visibility:hidden;transform:translateY(12px) scale(.98);
  transform-origin:bottom right;
  transition:opacity .25s,transform .3s cubic-bezier(.22,1,.36,1),visibility 0s linear .3s;
}
.feng-chat[data-open="true"] .feng-chat-panel{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.feng-chat-head{
  display:flex;align-items:center;gap:12px;padding:16px;
  background:var(--grad-dark,linear-gradient(165deg,#0B1B3D,#081330));color:#fff;
}
.feng-chat-avatar{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:50%;flex:none;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);
}
.feng-chat-avatar svg{width:24px;height:24px}
.feng-chat-title{margin:0;font-size:15px;font-weight:700}
.feng-chat-sub{margin:2px 0 0;font-size:12.5px;opacity:.75}
.feng-chat-head .feng-close{margin-left:auto;background:rgba(255,255,255,.12);color:#fff}
.feng-chat-head .feng-close:hover{background:rgba(255,255,255,.22)}
.feng-chat-body{padding:12px;display:flex;flex-direction:column;gap:8px;max-height:60vh;overflow:auto}
.feng-chat-opt{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:12px 14px;border:1px solid var(--line,#E2E8F3);border-radius:var(--r,14px);
  background:#fff;color:var(--ink,#0E1B33);text-decoration:none;cursor:pointer;
  font-family:inherit;font-size:14px;text-align:left;
  transition:border-color .2s,box-shadow .2s,transform .2s;
}
.feng-chat-opt:hover{border-color:var(--indigo,#2246C7);box-shadow:var(--sh-1);transform:translateY(-1px)}
.feng-chat-opt strong{display:block;font-size:14px}
.feng-chat-opt small{display:block;font-size:12px;color:var(--muted,#5E6C88);font-weight:400}
.feng-chat-ic{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:40px;height:40px;border-radius:12px;
  background:rgba(34,70,199,.08);color:var(--indigo,#2246C7);
}
.feng-chat-ic svg{width:20px;height:20px}
.feng-chat-form{padding:4px 2px}
.feng-chat-form .wpcf7 input,.feng-chat-form .wpcf7 textarea,.feng-chat-form .wpcf7 select{
  width:100%;margin-bottom:8px;padding:10px 12px;font-size:13.5px;
  border:1.5px solid var(--line-2,#CCD6E8);border-radius:10px;font-family:inherit;
}

/* ---------- responsive ---------- */
@media (max-width:640px){
  .feng-grid{grid-template-columns:1fr}
  .feng-chat{right:16px;bottom:92px}
  .feng-chat-fab{width:54px;height:54px}
  .feng-chat-panel{bottom:64px}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .feng-veil,.feng-card,.feng-chat-panel,.feng-chat-fab,.feng-close,.feng-chat-opt{transition:none}
}

/* ---------- print: never show overlays ---------- */
@media print{
  .feng-veil,.feng-chat{display:none!important}
}
