/* Farhat Video Q&A - modern dark theme + smaller header icons + export button + Flashcards styling */

/* ---------- Theme tokens ---------- */
:root{
  --fvqa-bg-0:#060b16;
  --fvqa-bg-1:rgba(16,26,44,.96);
  --fvqa-bg-2:rgba(20,32,54,.88);
  --fvqa-bg-user:rgba(64,122,255,.25);
  --fvqa-bg-assist:rgba(12,22,40,.75);
  --fvqa-bg-meta:rgba(30,52,78,.6);
  --fvqa-chip-bg:linear-gradient(180deg, rgba(77,166,255,.18), rgba(34,211,238,.08));
  --fvqa-chip-border:rgba(120,162,255,.25);
  --fvqa-border:rgba(120,162,255,.22);
  --fvqa-border-soft:rgba(120,162,255,.14);
  --fvqa-shadow:0 24px 70px rgba(3,8,20,.55), 0 6px 18px rgba(3,10,24,.45);
  --fvqa-text:#e6f0ff;
  --fvqa-text-dim:#9bb2d6;
  --fvqa-text-faint:#7083a4;
  --fvqa-accent:#4da6ff;
  --fvqa-accent-strong:#22d3ee;
  --fvqa-radius-lg:18px;
  --fvqa-radius-md:12px;
  --fvqa-radius-sm:8px;
  --fvqa-edge-gap:18px;
  --fvqa-header-h:56px;
  --fvqa-send-bg:linear-gradient(135deg, #54b3ff, #3673ff);
  --fvqa-input-space:96px;

  /* smaller header buttons */
  --fvqa-ctl-size: clamp(20px, 2.4vw, 26px);
  --fvqa-font-sm: clamp(12px, 1.8vw, 14px);

  /* bubble sizing */
  --fvqa-bubble-h: clamp(42px, 7.5vw, 60px);
  --fvqa-bubble-px: clamp(12px, 3vw, 20px);
  --fvqa-bubble-ico: clamp(16px, 3.6vw, 22px);
  --fvqa-bubble-text: clamp(12px, 2.8vw, 14px);

  --fvqa-body-text:#edf4ff;
  --fvqa-head-text:#f8fbff;
  --fvqa-muted-text:#c7d7f5;
  --fvqa-code-text:#f2f7ff;
}

/* ---------- Widget shell ---------- */
.fvqa-widget{
  box-sizing:border-box;
  position:fixed;
  right:12px; bottom:12px;
  width:clamp(240px,24vw,320px);
  max-width:calc(100vw - (var(--fvqa-edge-gap) * 2));
  height:clamp(360px,56vh,520px);
  max-height:calc(100vh - (var(--fvqa-edge-gap) * 2));
  display:flex; flex-direction:column;
  background:linear-gradient(200deg, rgba(24,36,64,.96), rgba(9,16,30,.98));
  color:var(--fvqa-text);
  border:1px solid var(--fvqa-border);
  border-radius:14px; box-shadow:var(--fvqa-shadow);
  overflow:hidden; font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
  z-index:999999; font-size:13px;
}
.fvqa-widget *{ box-sizing:border-box; }
.fvqa-inline{ position:relative; right:auto; bottom:auto; margin:12px auto; width:min(100%,560px); }
.fvqa-hidden{ display:none !important; }

/* Fullscreen */
.fvqa-fullscreen-on{
  position:fixed !important; inset:0 !important;
  width:auto !important; max-width:none !important;
  max-height:none !important; height:100vh !important;
  border-radius:0 !important; right:0 !important; bottom:0 !important;
}

/* ---------- Header ---------- */
.fvqa-header{
  position:sticky; top:0; z-index:2;
  display:flex; align-items:center; justify-content:space-between;
  height:46px; padding:8px 10px;
  background:linear-gradient(180deg, rgba(30,46,78,.95), rgba(16,26,44,.92));
  border-bottom:1px solid var(--fvqa-border);
}
.fvqa-title{
  flex:1 1 auto; min-width:0; margin-right:10px;
  font-size:13px; font-weight:700; letter-spacing:.25px; color:var(--fvqa-text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.fvqa-header-btns{ position:relative; display:flex; gap:6px; align-items:center; }
.fvqa-header-btns .fvqa-btn{
  position:relative; width:var(--fvqa-ctl-size); height:var(--fvqa-ctl-size);
  min-width:var(--fvqa-ctl-size); min-height:var(--fvqa-ctl-size);
  border-radius:var(--fvqa-radius-md);
  border:1px solid var(--fvqa-border);
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  color:var(--fvqa-text); cursor:pointer; display:grid; place-items:center; font-size:0;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.fvqa-header-btns .fvqa-btn:hover{ filter:brightness(1.08); box-shadow:0 0 0 1px rgba(255,255,255,.2); }
.fvqa-header-btns .fvqa-btn:active{ transform:translateY(1px); }
.fvqa-header-btns .fvqa-btn:focus-visible{ outline:2px solid var(--fvqa-accent-strong); outline-offset:2px; }

/* Icons */
.fvqa-header-btns .fvqa-btn::before{ content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
.fvqa-header-btns .fvqa-close::before,
.fvqa-header-btns .fvqa-close::after{
  content:""; position:absolute; left:50%; top:50%; width:12px; height:2px; background:currentColor; border-radius:1px;
}
.fvqa-header-btns .fvqa-close::before{ transform:translate(-50%, -50%) rotate(45deg); }
.fvqa-header-btns .fvqa-close::after{  transform:translate(-50%, -50%) rotate(-45deg); }
.fvqa-header-btns .fvqa-fullscreen::before{
  width:16px; height:16px;
  background:
    linear-gradient(currentColor,currentColor) left top/10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left top/2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) right top/10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right top/2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/2px 10px no-repeat;
}

/* Single PDF button (compact icon) */
.fvqa-header-btns .fvqa-export-pdf[hidden]{ display:none !important; }
.fvqa-header-btns .fvqa-export-pdf::before,
.fvqa-header-btns .fvqa-export-pdf::after{
  content:""; position:absolute; left:50%; transform:translateX(-50%); background:currentColor;
}
.fvqa-header-btns .fvqa-export-pdf::before{
  top:5px; width:14px; height:16px; border:1px solid currentColor;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  border-radius:2px;
}
.fvqa-header-btns .fvqa-export-pdf::after{
  top:9px; width:10px; height:2px; border-radius:1px;
}

/* ---------- Body ---------- */
.fvqa-body{
  display:flex; flex-direction:column; flex:1 1 auto; min-height:240px; overflow:hidden;
  background:linear-gradient(180deg, rgba(12,22,40,.85), rgba(8,14,28,.95));
}
.fvqa-thinking{
  padding:10px 14px; color:var(--fvqa-accent-strong);
  background:linear-gradient(180deg, rgba(12,60,78,.45), rgba(12,44,66,.35));
  border-top:1px solid rgba(34,211,238,.35);
  border-bottom:1px solid rgba(34,211,238,.2);
  font-size: clamp(12px, 1.6vw, 14px); line-height:1.35;
}

/* Messages */
.fvqa-messages{
  flex:1 1 auto; min-height:0;
  padding:10px 12px calc(10px + var(--fvqa-input-space, 80px)) 12px;
  overflow-y:auto; display:flex; flex-direction:column; gap:8px;
  scroll-padding-bottom:calc(14px + var(--fvqa-input-space, 96px));
}
.fvqa-msg{
  padding:8px 12px; border-radius:var(--fvqa-radius-md);
  max-width:92%;
  border:1px solid var(--fvqa-border-soft); background:rgba(18,30,52,.6);
  color:var(--fvqa-body-text); line-height:1.55; box-shadow:0 8px 20px rgba(3,8,20,.25);
  font-size:13px; word-wrap:break-word;
}
.fvqa-user{ margin-left:auto; background:var(--fvqa-bg-user); border-color:rgba(77,166,255,.35); }
.fvqa-assistant{ background:var(--fvqa-bg-assist); }

.fvqa-msg a{ color:#7dc3ff; text-decoration:underline; text-underline-offset:2px; }
.fvqa-msg a:hover{ color:#a3d6ff; }
.fvqa-msg ul,.fvqa-msg ol{ margin:.5em 0 1em 1.25em; padding-left:1.25em; }
.fvqa-msg pre,.fvqa-msg code{
  color:var(--fvqa-code-text);
  font-family:"Fira Code","JetBrains Mono",Consolas,monospace;
  background:rgba(8,16,30,.9); border:1px solid rgba(120,162,255,.2);
  border-radius:var(--fvqa-radius-sm); padding:.2rem .45rem;
}

/* ---------- Quick actions ---------- */
.fvqa-actions{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(84px, 1fr));
  gap:6px; padding:6px 8px;
  border-bottom:1px solid var(--fvqa-border-soft);
  background:linear-gradient(180deg, rgba(24,38,64,.65), rgba(16,28,50,.55));
  max-height:110px; overflow:auto;
}
.fvqa-action-btn{
  width:100%; padding:6px 8px; border-radius:10px;
  border:1px solid var(--fvqa-chip-border); background:var(--fvqa-chip-bg);
  color:var(--fvqa-text); font-size:11px; line-height:1.1; cursor:pointer;
  text-align:center; white-space:normal; min-height:26px;
  display:flex; align-items:center; justify-content:center; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* Disabled while busy */
.fvqa-busy .fvqa-action-btn, .fvqa-busy .fvqa-send{ pointer-events:none; opacity:.55; cursor:not-allowed; }

/* ---------- Input ---------- */
.fvqa-input{
  position:sticky; bottom:0; z-index:2;
  display:flex; gap:8px; align-items:center;
  padding:8px 12px; border-top:1px solid var(--fvqa-border);
  background:linear-gradient(180deg, rgba(24,36,60,.94), rgba(12,20,36,.96));
}
.fvqa-text{
  flex:1 1 auto; resize:vertical; min-height:40px; max-height:180px;
  border-radius:var(--fvqa-radius-md); border:1px solid var(--fvqa-border);
  padding:8px 10px; color:var(--fvqa-text); background:rgba(11,18,32,.95);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04); font:inherit; font-size:13px;
}
.fvqa-text::placeholder{ color:var(--fvqa-text-faint); }
.fvqa-text:focus{ outline:2px solid rgba(77,166,255,.65); outline-offset:1px; background:rgba(11,18,32,.95); }
.fvqa-send{
  flex:0 0 auto; height:clamp(30px, 3.6vw, 38px); min-width:clamp(56px, 10vw, 92px);
  padding:0 clamp(10px, 2.2vw, 16px); border:0; border-radius:10px;
  font-weight:700; letter-spacing:.25px; color:#fff; font-size:var(--fvqa-font-sm);
  background:var(--fvqa-send-bg); cursor:pointer;
  box-shadow:0 12px 26px rgba(77,166,255,.38), 0 2px 8px rgba(0,0,0,.4);
  transition:transform .15s ease, filter .15s ease;
}
.fvqa-send:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.fvqa-send:active{ transform:translateY(0); }
.fvqa-send:focus-visible{ outline:2px solid var(--fvqa-accent-strong); outline-offset:2px; }

/* ---------- Launcher bubble ---------- */
.fvqa-bubble{
  position:fixed; right:var(--fvqa-edge-gap); bottom:var(--fvqa-edge-gap);
  display:none; align-items:center; gap:8px;
  height:var(--fvqa-bubble-h); padding:0 var(--fvqa-bubble-px);
  border-radius:999px; border:1px solid rgba(120,162,255,.35);
  background:linear-gradient(135deg, rgba(4,2,126,.9), rgba(22,151,190,.85));
  color:#fff; cursor:pointer; box-shadow:0 18px 40px rgba(34,120,255,.35); z-index:1000000;
}
.fvqa-bubble.show{ display:inline-flex; }
.fvqa-bubble:focus-visible{ outline:2px solid rgba(8,64,218,.8); outline-offset:2px; }
.fvqa-bubble-ico{ font-size:var(--fvqa-bubble-ico); line-height:1; }
.fvqa-bubble-label{ font-weight:700; font-size:var(--fvqa-bubble-text); }

/* ---------- Scrollbar ---------- */
.fvqa-messages::-webkit-scrollbar{ width:10px; }
.fvqa-messages::-webkit-scrollbar-thumb{
  border-radius:999px; border:2px solid transparent; background-clip:padding-box;
  background:linear-gradient(180deg, rgba(40,72,112,.8), rgba(24,46,84,.9));
}
.fvqa-messages::-webkit-scrollbar-track{ background:transparent; }

/* ---------- Flashcards styles ---------- */
.fvqa-flashcards{
  display:block; border:1px solid var(--fvqa-border-soft); border-radius:12px;
  padding:10px; background:rgba(10,18,34,.55);
}
.fvqa-fc-toolbar{
  display:flex; gap:8px; justify-content:flex-end; margin-bottom:6px;
}
.fvqa-fc-toolbar button{
  appearance:none; border:1px solid var(--fvqa-border); background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  color:var(--fvqa-text); font-size:12px; padding:6px 10px; border-radius:8px; cursor:pointer;
}
.fvqa-fc-item{
  border:1px solid var(--fvqa-border-soft); border-radius:10px; padding:10px; background:rgba(14,22,38,.6);
  box-shadow:0 8px 18px rgba(4,8,16,.25); margin:8px 0;
}
.fvqa-fc-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.fvqa-fc-index{
  display:inline-grid; place-items:center; width:22px; height:22px; border-radius:6px;
  background:rgba(77,166,255,.22); border:1px solid rgba(77,166,255,.4); color:#dceaff; font-weight:700; font-size:12px;
}
.fvqa-fc-toggle{
  appearance:none; border:1px solid var(--fvqa-border); background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  color:var(--fvqa-text); font-size:12px; padding:4px 8px; border-radius:8px; cursor:pointer;
}
.fvqa-fc-badge{
  display:inline-flex; align-items:center; justify-content:center;
  width:18px; height:18px; border-radius:6px; font-weight:800; font-size:11px;
  background:rgba(120,162,255,.24); border:1px solid rgba(120,162,255,.45); color:#eaf2ff; margin-right:6px;
}
.fvqa-fc-badge.a{ background:rgba(34,211,238,.18); border-color:rgba(34,211,238,.45); }
.fvqa-fc-q, .fvqa-fc-a{ display:flex; align-items:flex-start; gap:6px; }
.fvqa-fc-qtext, .fvqa-fc-atext{ flex:1 1 auto; }
.fvqa-fc-a[hidden]{ display:none; }

/* ---------- Responsive ---------- */
@media (max-width:900px){ .fvqa-widget{ width:clamp(240px,44vw,380px); } }
@media (max-width:600px){
  .fvqa-widget{ right:10px; left:10px; bottom:68px; width:auto; max-width:calc(100vw - 20px); height:clamp(320px,52vh,480px); }
  .fvqa-actions{ grid-template-columns:repeat(auto-fit, minmax(72px, 1fr)); max-height:96px; padding:6px 8px; gap:5px; }
  .fvqa-action-btn{ font-size:10.5px; min-height:24px; padding:5px 7px; }
  .fvqa-send{ min-width:62px; height:34px; }
}
@media (max-width:380px){ .fvqa-widget{ right:10px; left:10px; bottom:70px; } }
@media (max-height:680px){ .fvqa-widget{ bottom:12px; height:clamp(320px,52vh,480px); } }
@media (max-height:540px){ .fvqa-body{ min-height:220px; } .fvqa-text{ min-height:38px; } }

/* ---------- Fullscreen adjustments ---------- */
.fvqa-fullscreen-on .fvqa-header{ height:var(--fvqa-header-h); padding:12px 16px; }
.fvqa-fullscreen-on .fvqa-header-btns .fvqa-btn{ width: clamp(28px, 2.8vw, 34px); height: clamp(28px, 2.8vw, 34px); }
.fvqa-fullscreen-on .fvqa-input{ padding:12px 14px; gap:10px; }
.fvqa-fullscreen-on .fvqa-text{ min-height:52px; font-size:14px; }
.fvqa-fullscreen-on .fvqa-send{ height: clamp(40px, 4.2vw, 48px); min-width: clamp(84px, 14vw, 108px); font-size: clamp(13px, 2vw, 15px); padding: 0 clamp(14px, 2.6vw, 18px); }

/* ---------- Safe-area padding ---------- */
@supports (padding:max(0px)){
  .fvqa-fullscreen-on{
    padding-top:env(safe-area-inset-top,0px);
    padding-bottom:env(safe-area-inset-bottom,0px);
    padding-left:env(safe-area-inset-left,0px);
    padding-right:env(safe-area-inset-right,0px);
  }
}

/* ---------- Focus visibility ---------- */
.fvqa-widget button, .fvqa-widget textarea, .fvqa-widget a{ background-clip:padding-box; }
.fvqa-widget button:focus-visible, .fvqa-widget textarea:focus-visible, .fvqa-widget a:focus-visible{ outline:2px solid rgba(77,166,255,.6); outline-offset:2px; }

/* Anti-squash guarantees */
.fvqa-header, .fvqa-actions{ flex-shrink:0 !important; flex:0 0 auto !important; }
.fvqa-body{ flex:1 1 auto !important; min-height:0 !important; }

/* Desktop pill sizing */
@media (min-width:1024px){
  .fvqa-actions{ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; gap:8px !important; padding:8px 10px !important; }
  .fvqa-action-btn{
    padding:8px 10px !important; font-size:12px !important; line-height:1.2 !important; min-height:34px !important; border-radius:12px !important;
    display:flex !important; align-items:center !important; justify-content:center !important; text-align:center !important; white-space:normal !important; word-break:break-word !important;
    max-height:calc(1.2em * 2 + 12px) !important; overflow:hidden !important;
  }
}

/* Readable titles inside responses */
.fvqa-msg h1, .fvqa-msg h2, .fvqa-msg h3, .fvqa-msg h4, .fvqa-msg h5, .fvqa-msg h6{
  color:var(--fvqa-head-text) !important; font-weight:700;
}
/* === Smaller footer (send + textarea) on normal screen === */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-input{
  padding:6px 10px;      /* was 8px 12px */
  gap:6px;               /* was 8px */
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-text{
  min-height:34px;       /* was 40px */
  max-height:140px;      /* keep scroll manageable */
  padding:6px 8px;       /* was 8px 10px */
  font-size:12px;        /* was 13px */
  line-height:1.35;
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-send{
  height:30px;                 /* tighter button */
  min-width:64px;              /* was clamp(56px,10vw,92px) */
  padding:0 10px;              /* was 0 10–16px */
  font-size:12px;              /* was var(--fvqa-font-sm) */
  border-radius:8px;           /* slightly smaller radius */
  box-shadow:0 8px 18px rgba(77,166,255,.28), 0 2px 6px rgba(0,0,0,.35);
}
/* === Flashcards: compact controls in NORMAL (non-fullscreen) mode === */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-flashcards .fvqa-fc-toolbar{
  gap:6px;
  margin-bottom:4px;
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-flashcards .fvqa-fc-toolbar button{
  padding:4px 8px;        /* was 6px 10px */
  font-size:11px;         /* was 12px */
  line-height:1.1;
  border-radius:6px;      /* was 8px */
  min-height:26px;
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-flashcards .fvqa-fc-toggle{
  padding:3px 7px;        /* was 4px 8px */
  font-size:11px;         /* was 12px */
  line-height:1.1;
  border-radius:6px;      /* was 8px */
  min-height:26px;
}

/* ---- Summary table base styles ---- */
.fvqa-sumwrap{
  border:1px solid var(--fvqa-border-soft);
  border-radius:12px;
  padding:10px;
  background:rgba(10,18,34,.75);
  margin:8px 0;
}

.fvqa-sumtitle{
  margin:.2em 0 .4em;
  color:var(--fvqa-head-text);
  font-size:14px;
  font-weight:700;
}

.fvqa-sumtable-wrap{
  overflow:auto;
}

.fvqa-sumtbl{
  width:100%;
  border-collapse:collapse;
  background:rgba(14,22,38,.9);
}

.fvqa-sumtbl th,
.fvqa-sumtbl td{
  border:1px solid var(--fvqa-border-soft);
  padding:6px 8px;
  font-size:12px;
  vertical-align:top;
  color:var(--fvqa-body-text);
}

.fvqa-sumtbl thead th{
  background:rgba(77,166,255,.24);
  font-weight:700;
  color:#fdfdff;
}

.fvqa-sumtext{margin-top:8px;}
.fvqa-sources-row{margin-top:6px;}
.fvqa-srcchip{
  display:inline-block;
  margin:2px 6px 0 0;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid var(--fvqa-border);
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  font-size:11px;
  color:var(--fvqa-text);
}

/* === Compact “card” layout in SMALL widget (NOT fullscreen) === */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumwrap{
  padding:8px;
  margin:6px 0;
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtable-wrap{
  max-height:230px;
  overflow:auto;
}

.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl{
  width:100%;
  border-collapse:separate;
  border-spacing:0 6px;
  background:transparent;
}

/* Hide thead in compact mode (we add labels per cell) */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl thead{
  display:none;
}

/* Each row becomes a “card” */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl tr{
  display:block;
  border-radius:10px;
  border:1px solid var(--fvqa-border-soft);
  background:rgba(20,36,68,.96);
  overflow:hidden;
}

/* Cells stack vertically */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td{
  display:block;
  width:100%;
  border:0;
  border-top:1px solid var(--fvqa-border-soft);
  padding:6px 8px;
  font-size:11px;
}

/* First cell = concept header bar */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:first-child{
  border-top:0;
  background:rgba(77,166,255,.40);
  font-weight:600;
  color:#ffffff;
}

/* Labels for other cells */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:not(:first-child)::before{
  display:block;
  margin-bottom:2px;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:#fdfdff;
  font-weight:600;
}

/* Column-specific labels (match your 6 columns) */
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:nth-child(2)::before{
  content:"Core Idea / Definition";
}
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:nth-child(3)::before{
  content:"Key Rules / Conditions";
}
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:nth-child(4)::before{
  content:"Formulas / Calculations";
}
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:nth-child(5)::before{
  content:"Examples / Applications";
}
.fvqa-widget:not(.fvqa-fullscreen-on) .fvqa-sumtbl td:nth-child(6)::before{
  content:"Notes / Common Traps";
}

/* === Extra safety: override theme table header colors inside messages === */
.fvqa-msg table thead th{
  color:#fdfdff !important;
  background:rgba(77,166,255,.24) !important;
}




/* Voice mic button */
.fvqa-mic{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--fvqa-border);
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  color:var(--fvqa-text);
  cursor:pointer;
  display:grid;
  place-items:center;
  box-shadow:0 8px 18px rgba(3,8,20,.25);
}
.fvqa-mic:hover{ filter:brightness(1.08); }
.fvqa-mic.recording{
  background:linear-gradient(180deg, rgba(255,59,59,.95), rgba(255,59,59,.55));
  border-color:rgba(255,120,120,.75);
  color:#fff;
  box-shadow:0 0 0 2px rgba(255,59,59,.18), 0 12px 26px rgba(255,59,59,.25);
}


/* =========================================================
   Farhat.AI light assistant redesign (screenshot-matched)
   ========================================================= */
.fvqa-widget.fvqa-theme--farhat{
  --fvqa-panel-bg:#ffffff;
  --fvqa-panel-soft:#f5f6f8;
  --fvqa-panel-border:#dfe4ea;
  --fvqa-panel-shadow:0 22px 60px rgba(17,24,39,.18), 0 4px 16px rgba(17,24,39,.12);
  --fvqa-text-main:#2f3640;
  --fvqa-text-soft:#697386;
  --fvqa-pill-border:#8aa3ba;
  --fvqa-blue:#2f6ae6;
  --fvqa-blue-strong:#1e5bd8;
  right:18px;
  bottom:18px;
  width:min(420px, calc(100vw - 32px));
  height:min(620px, calc(100vh - 28px));
  max-height:calc(100vh - 28px);
  border-radius:24px;
  border:1px solid var(--fvqa-panel-border);
  background:var(--fvqa-panel-bg);
  box-shadow:var(--fvqa-panel-shadow);
  color:var(--fvqa-text-main);
  overflow:hidden;
}
.fvqa-theme--farhat .fvqa-header{
  position:sticky;
  top:0;
  z-index:2;
  height:58px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
  border-bottom:1px solid #e2e7ec;
}
.fvqa-theme--farhat .fvqa-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin-right:12px;
  font-size:15px;
  font-weight:700;
  letter-spacing:0;
  color:#3a4653;
}
.fvqa-theme--farhat .fvqa-title-bot{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:8px;
  background:#eef4ff;
  color:#2d6ae6;
  font-size:14px;
  box-shadow:inset 0 0 0 1px rgba(47,106,230,.14);
}
.fvqa-theme--farhat .fvqa-header-btns{
  position:relative;
  display:flex;
  gap:10px;
  align-items:center;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn{
  position:relative;
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  border-radius:999px;
  border:1px solid rgba(118,128,143,.2);
  background:linear-gradient(180deg, #9ca3af 0%, #828994 100%);
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn:hover{
  filter:brightness(1.04);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 4px 12px rgba(55,65,81,.12);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn:focus-visible{
  outline:2px solid rgba(47,106,230,.35);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-fullscreen::before{
  width:16px;
  height:16px;
  background:
    linear-gradient(currentColor,currentColor) left top/9px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left top/2px 9px no-repeat,
    linear-gradient(currentColor,currentColor) right top/9px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right top/2px 9px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/9px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/2px 9px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/9px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/2px 9px no-repeat;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::before,
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:12px;
  height:2px;
  background:currentColor;
  border-radius:1px;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::before{ transform:translate(-50%, -50%) rotate(45deg); }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::after{ transform:translate(-50%, -50%) rotate(-45deg); }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf::before{
  top:10px;
  width:12px;
  height:13px;
  border:2px solid currentColor;
  border-top:0;
  border-radius:2px 2px 3px 3px;
  background:none;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf::after{
  content:"";
  position:absolute;
  left:50%;
  top:8px;
  width:2px;
  height:11px;
  transform:translateX(-50%);
  background:currentColor;
  border-radius:2px;
  box-shadow:0 8px 0 0 currentColor;
}
.fvqa-theme--farhat .fvqa-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:240px;
  overflow:hidden;
  background:#ffffff;
}
.fvqa-theme--farhat .fvqa-messages{
  flex:1 1 auto;
  min-height:0;
  padding:18px 16px calc(16px + var(--fvqa-input-space, 88px));
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
  scroll-padding-bottom:calc(14px + var(--fvqa-input-space, 96px));
  background:#ffffff;
}
.fvqa-theme--farhat .fvqa-welcome{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  min-height:270px;
  padding-top:14px;
  text-align:center;
}
.fvqa-theme--farhat .fvqa-welcome-copy{
  max-width:290px;
}
.fvqa-theme--farhat .fvqa-welcome-title{
  margin:0;
  color:#323b44;
  font-size:24px;
  line-height:1.22;
  font-weight:600;
}
.fvqa-theme--farhat .fvqa-welcome-sub{
  margin:8px 0 0;
  color:#5d6775;
  font-size:20px;
  line-height:1.25;
  font-weight:500;
}
.fvqa-theme--farhat .fvqa-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  padding:0;
  border:0;
  background:transparent;
  max-height:none;
  overflow:visible;
}
.fvqa-theme--farhat .fvqa-action-btn{
  width:auto;
  min-height:0;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--fvqa-pill-border);
  background:#ffffff;
  color:#486273;
  font-size:13px;
  line-height:1.2;
  font-weight:500;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.fvqa-theme--farhat .fvqa-action-btn:hover{ background:#f7fafc; }
.fvqa-theme--farhat .fvqa-thinking{
  padding:10px 12px;
  margin:0 16px 8px;
  color:#2958c8;
  background:#eef4ff;
  border:1px solid rgba(47,106,230,.14);
  border-radius:14px;
  font-size:14px;
  line-height:1.35;
}
.fvqa-theme--farhat .fvqa-msg{
  padding:12px 14px;
  border-radius:20px;
  max-width:92%;
  border:1px solid #e4e8ef;
  background:#f7f8fb;
  color:#2f3640;
  line-height:1.6;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  font-size:14px;
  word-wrap:break-word;
}
.fvqa-theme--farhat .fvqa-user{
  margin-left:auto;
  background:#edf4ff;
  border-color:#cfe0ff;
}
.fvqa-theme--farhat .fvqa-assistant{
  background:#ffffff;
  border-color:#e4e8ef;
}
.fvqa-theme--farhat .fvqa-msg a{ color:#225ede; }
.fvqa-theme--farhat .fvqa-msg pre,
.fvqa-theme--farhat .fvqa-msg code{
  color:#1e293b;
  background:#eef2f7;
  border:1px solid #d8e0ea;
}
.fvqa-theme--farhat .fvqa-input{
  position:sticky;
  bottom:0;
  z-index:2;
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px 16px 16px;
  border-top:1px solid #eceff3;
  background:linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
}
.fvqa-theme--farhat .fvqa-text{
  flex:1 1 auto;
  resize:none;
  min-height:46px;
  max-height:140px;
  border-radius:999px;
  border:1px solid #d9e0e8;
  padding:12px 18px;
  color:#3d4653;
  background:#eef1f5;
  box-shadow:none;
  font:inherit;
  font-size:14px;
}
.fvqa-theme--farhat .fvqa-text::placeholder{ color:#8a93a3; }
.fvqa-theme--farhat .fvqa-text:focus{
  outline:none;
  border-color:#7da3ff;
  box-shadow:0 0 0 3px rgba(47,106,230,.12);
  background:#f4f7fb;
}
.fvqa-theme--farhat .fvqa-mic,
.fvqa-theme--farhat .fvqa-send{
  flex:0 0 auto;
  height:44px;
  min-width:44px;
  border-radius:999px;
  border:0;
  background:linear-gradient(180deg, #3a7dff 0%, #2767e8 100%);
  color:#ffffff;
  box-shadow:0 10px 18px rgba(47,106,230,.22);
}
.fvqa-theme--farhat .fvqa-mic{
  width:44px;
  padding:0;
  display:grid;
  place-items:center;
  font-size:18px;
}
.fvqa-theme--farhat .fvqa-mic.recording{
  background:linear-gradient(180deg, #ff6161 0%, #e13d3d 100%);
  box-shadow:0 10px 18px rgba(225,61,61,.25);
}
.fvqa-theme--farhat .fvqa-send{
  min-width:74px;
  padding:0 18px;
  font-size:15px;
  font-weight:700;
}
.fvqa-theme--farhat .fvqa-send:hover,
.fvqa-theme--farhat .fvqa-mic:hover{
  filter:brightness(1.04);
  transform:none;
}
.fvqa-theme--farhat .fvqa-flashcards,
.fvqa-theme--farhat .fvqa-sumwrap{
  background:#ffffff;
  border:1px solid #e4e8ef;
  border-radius:18px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.fvqa-theme--farhat .fvqa-fc-toolbar button,
.fvqa-theme--farhat .fvqa-fc-toggle{
  border:1px solid #d7dee7;
  background:#f8fafc;
  color:#3b4756;
}
.fvqa-theme--farhat .fvqa-sumtbl{
  background:#ffffff;
}
.fvqa-theme--farhat .fvqa-sumtbl th,
.fvqa-theme--farhat .fvqa-sumtbl td{
  color:#2f3640;
  border-color:#e2e8f0;
}
.fvqa-theme--farhat .fvqa-sumtbl thead th{
  background:#f5f8fc !important;
  color:#354152 !important;
}
.fvqa-theme--farhat .fvqa-srcchip{
  color:#4b5563;
  border-color:#dbe2ea;
  background:#f8fafc;
}
.fvqa-theme--farhat .fvqa-messages::-webkit-scrollbar{ width:8px; }
.fvqa-theme--farhat .fvqa-messages::-webkit-scrollbar-thumb{
  background:#d6dde6;
  border-radius:999px;
  border:2px solid transparent;
}
.fvqa-theme--farhat.fvqa-fullscreen-on{
  position:fixed !important;
  inset:14px !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  border-radius:26px !important;
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-header{
  height:64px;
  padding:10px 14px 10px 16px;
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-title{ font-size:16px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-messages{
  padding:28px 28px calc(24px + var(--fvqa-input-space, 92px));
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-welcome{
  min-height:320px;
  padding-top:18px;
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-welcome-copy{ max-width:460px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-welcome-title{ font-size:30px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-welcome-sub{ font-size:24px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-actions{ gap:10px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-input{ padding:14px 22px 20px; }
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-text{
  min-height:58px;
  font-size:16px;
  padding:16px 22px;
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-send{
  min-width:92px;
  height:46px;
}
.fvqa-theme--farhat.fvqa-fullscreen-on .fvqa-mic{
  width:46px;
  height:46px;
}
@media (max-width:600px){
  .fvqa-widget.fvqa-theme--farhat{
    right:10px;
    left:10px;
    bottom:10px;
    width:auto;
    height:min(640px, calc(100vh - 20px));
    border-radius:22px;
  }
  .fvqa-theme--farhat .fvqa-welcome-title{ font-size:22px; }
  .fvqa-theme--farhat .fvqa-welcome-sub{ font-size:18px; }
  .fvqa-theme--farhat .fvqa-header-btns{ gap:8px; }
  .fvqa-theme--farhat .fvqa-header-btns .fvqa-btn{
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
  }
}


/* ===== Launcher icon + dark readable text ===== */
.fvqa-bubble{
  padding:0 !important;
  width:68px !important;
  height:68px !important;
  border-radius:999px;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible;
}
.fvqa-bubble.show{ display:inline-flex; align-items:center; justify-content:center; }
.fvqa-bubble-ico{
  width:68px !important;
  height:68px !important;
  display:block;
  border-radius:999px;
  background-image:url('../img/farhat-bubble-icon.png');
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  font-size:0 !important;
  line-height:0 !important;
}
.fvqa-bubble-label{ display:none !important; }

.fvqa-theme--farhat .fvqa-msg h1,
.fvqa-theme--farhat .fvqa-msg h2,
.fvqa-theme--farhat .fvqa-msg h3,
.fvqa-theme--farhat .fvqa-msg h4,
.fvqa-theme--farhat .fvqa-msg h5,
.fvqa-theme--farhat .fvqa-msg h6,
.fvqa-theme--farhat .fvqa-msg strong,
.fvqa-theme--farhat .fvqa-sumtitle{
  color:#2f3640 !important;
}
.fvqa-theme--farhat .fvqa-msg,
.fvqa-theme--farhat .fvqa-msg p,
.fvqa-theme--farhat .fvqa-msg li,
.fvqa-theme--farhat .fvqa-msg td,
.fvqa-theme--farhat .fvqa-msg th,
.fvqa-theme--farhat .fvqa-msg blockquote,
.fvqa-theme--farhat .fvqa-msg small,
.fvqa-theme--farhat .fvqa-msg span{
  color:#3d4653 !important;
}
.fvqa-theme--farhat .fvqa-msg blockquote{
  background:#f5f7fb !important;
  border-left:3px solid #7da3ff !important;
}
.fvqa-theme--farhat .fvqa-msg em{ color:#4b5563 !important; }

/* ===== Header/titlebar refinement ===== */
.fvqa-theme--farhat .fvqa-header{
  height:44px;
  padding:6px 10px 6px 12px;
  background:linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}
.fvqa-theme--farhat .fvqa-title{
  gap:9px;
  font-size:16px;
  font-weight:700;
  color:#4b6277;
}
.fvqa-theme--farhat .fvqa-title-bot{
  width:28px;
  height:28px;
  border-radius:999px;
  background:
    radial-gradient(circle at 72% 28%, rgba(255,255,255,.95) 0 11%, transparent 12%),
    radial-gradient(circle at 50% 50%, #edf7fb 0 58%, #d8ebf3 59% 100%);
  box-shadow:
    inset 0 0 0 1px rgba(114,143,165,.28),
    0 1px 2px rgba(15,23,42,.10);
  position:relative;
}
.fvqa-theme--farhat .fvqa-title-bot::before{
  content:"";
  position:absolute;
  left:50%;
  top:52%;
  width:15px;
  height:11px;
  transform:translate(-50%,-50%);
  border-radius:5px;
  background:linear-gradient(180deg,#d9eef5 0%, #b7dbe8 100%);
  box-shadow:
    inset 0 0 0 1px rgba(88,122,148,.35),
    0 0 0 1px rgba(255,255,255,.45);
}
.fvqa-theme--farhat .fvqa-title-bot::after{
  content:"";
  position:absolute;
  left:50%;
  top:55%;
  width:10px;
  height:8px;
  transform:translate(-50%,-50%);
  background:
    radial-gradient(circle at 28% 45%, #597790 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 45%, #597790 0 1px, transparent 1.5px),
    linear-gradient(#6f8ca3,#6f8ca3) center 72%/5px 1.5px no-repeat;
}
.fvqa-theme--farhat .fvqa-header-btns{ gap:4px; }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn{
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  border-radius:0;
  border:0;
  background:transparent;
  color:#707b86;
  box-shadow:none;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn:hover{
  background:#e8edf3;
  color:#49525c;
  box-shadow:none;
  filter:none;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn:focus-visible{
  outline:2px solid rgba(47,106,230,.25);
  outline-offset:1px;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn::before,
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn::after{
  background:currentColor;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf::before{
  top:45%;
  width:2px;
  height:11px;
  border:0;
  border-radius:2px;
  background:currentColor;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf::after{
  content:"";
  position:absolute;
  left:50%;
  top:62%;
  width:8px;
  height:8px;
  transform:translate(-50%,-50%) rotate(45deg);
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  background:transparent;
  box-shadow:none;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf{ order:3; }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-fullscreen::before{
  width:10px;
  height:10px;
  border:2px solid currentColor;
  background:transparent;
  transform:translate(-30%,-30%);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-fullscreen::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:10px;
  height:10px;
  border:2px solid currentColor;
  transform:translate(-55%,-5%);
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::before,
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close::after{
  width:10px;
  height:1.5px;
  border-radius:1px;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close{ order:4; }

@media (max-width:600px){
  .fvqa-theme--farhat .fvqa-header{
    height:42px;
    padding:6px 8px 6px 10px;
  }
  .fvqa-theme--farhat .fvqa-title{
    font-size:15px;
  }
}


/* ===== Header AI icon uses same launcher art, refined to title-bar style ===== */
.fvqa-theme--farhat .fvqa-title-bot{
  width:30px !important;
  height:30px !important;
  border-radius:999px;
  background-color:#f4f8fb !important;
  background-image:url('../img/farhat-bubble-icon.png') !important;
  background-size:contain !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  box-shadow:
    inset 0 0 0 1px rgba(114,143,165,.18),
    0 1px 2px rgba(15,23,42,.08) !important;
  position:relative;
}
.fvqa-theme--farhat .fvqa-title-bot::before,
.fvqa-theme--farhat .fvqa-title-bot::after{
  content:none !important;
}


/* ===== Fix header button clickability ===== */
.fvqa-theme--farhat .fvqa-header{
  position:relative;
  z-index:30;
}
.fvqa-theme--farhat .fvqa-title{
  position:relative;
  z-index:1;
  pointer-events:none;
}
.fvqa-theme--farhat .fvqa-header-btns{
  position:relative;
  z-index:40;
  pointer-events:auto;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-btn{
  position:relative;
  z-index:41;
  pointer-events:auto !important;
}


/* ===== V9 exact top-bar avatar fix ===== */
.fvqa-theme--farhat .fvqa-header{
  background:#ffffff !important;
  border-bottom:1px solid #e6ebf1 !important;
}

.fvqa-theme--farhat .fvqa-title{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  color:#587089 !important;
}

.fvqa-theme--farhat .fvqa-title-bot{
  width:26px !important;
  height:22px !important;
  min-width:26px !important;
  border-radius:0 !important;
  background:transparent url('../img/farhat-topbar-avatar.png') center/contain no-repeat !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.fvqa-theme--farhat .fvqa-title-bot::before,
.fvqa-theme--farhat .fvqa-title-bot::after{
  content:none !important;
}


/* ===== V11 controls/avatar sizing and icon-only actions ===== */
.fvqa-theme--farhat .fvqa-header-btns{
  display:flex !important;
  align-items:center !important;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf{
  order:-10 !important;
  margin-right:auto !important;
}
.fvqa-theme--farhat .fvqa-title-bot{
  width:52px !important;
  height:44px !important;
  min-width:52px !important;
}
.fvqa-bubble{
  width:136px !important;
  height:136px !important;
}
.fvqa-bubble-ico{
  width:136px !important;
  height:136px !important;
}
.fvqa-theme--farhat .fvqa-send{
  min-width:46px !important;
  width:46px !important;
  padding:0 !important;
  font-size:0 !important;
  position:relative !important;
}
.fvqa-theme--farhat .fvqa-send::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:16px;
  height:16px;
  transform:translate(-45%,-50%) rotate(45deg);
  border-top:3px solid #fff;
  border-right:3px solid #fff;
}
.fvqa-theme--farhat .fvqa-send::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:12px;
  height:3px;
  transform:translate(-72%, 10%) rotate(45deg);
  background:#fff;
  border-radius:2px;
}
.fvqa-theme--farhat .fvqa-mic{
  position:relative !important;
  font-size:0 !important;
}
.fvqa-theme--farhat .fvqa-mic::before{
  content:"";
  position:absolute;
  left:50%;
  top:42%;
  width:10px;
  height:15px;
  transform:translate(-50%,-50%);
  border:2.5px solid #fff;
  border-bottom-width:3px;
  border-radius:10px;
  background:transparent;
}
.fvqa-theme--farhat .fvqa-mic::after{
  content:"";
  position:absolute;
  left:50%;
  top:62%;
  width:14px;
  height:12px;
  transform:translate(-50%,-50%);
  background:
    linear-gradient(#fff,#fff) center 0/2.5px 8px no-repeat,
    linear-gradient(#fff,#fff) center 100%/10px 2.5px no-repeat,
    radial-gradient(circle at center top, transparent 7px, #fff 7px 8.5px, transparent 8.5px);
}
.fvqa-theme--farhat .fvqa-text.fvqa-audio-analyzing{
  background:#f3f5f8 !important;
  color:#8a93a3 !important;
  cursor:wait !important;
}
.fvqa-theme--farhat .fvqa-send:disabled,
.fvqa-theme--farhat .fvqa-mic:disabled{
  opacity:.7;
  cursor:not-allowed;
}

.fvqa-bubble{
  bottom: 34px !important;
  transform: translateY(-88px) !important;
}

/* ===== Flashcards styling adjusted to fit the new light Farhat.AI design ===== */
.fvqa-theme--farhat .fvqa-flashcards{
  background: #f8fafc !important;
  border: 1px solid #e4e8ef !important;
  border-radius: 18px !important;
  padding: 12px !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.04) !important;
}

.fvqa-theme--farhat .fvqa-fc-toolbar{
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.fvqa-theme--farhat .fvqa-fc-toolbar button,
.fvqa-theme--farhat .fvqa-fc-toggle{
  background: #ffffff !important;
  color: #486273 !important;
  border: 1px solid #d7dee7 !important;
  border-radius: 999px !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04) !important;
}

.fvqa-theme--farhat .fvqa-fc-toolbar button:hover,
.fvqa-theme--farhat .fvqa-fc-toggle:hover{
  background: #f3f7fb !important;
  color: #3f596a !important;
}

.fvqa-theme--farhat .fvqa-fc-item{
  background: #ffffff !important;
  border: 1px solid #e4e8ef !important;
  border-radius: 16px !important;
  padding: 12px !important;
  box-shadow: 0 6px 14px rgba(15,23,42,.04) !important;
}

.fvqa-theme--farhat .fvqa-fc-head{
  margin-bottom: 8px !important;
}

.fvqa-theme--farhat .fvqa-fc-index{
  background: #edf4ff !important;
  border: 1px solid #cfe0ff !important;
  color: #2f6ae6 !important;
}

.fvqa-theme--farhat .fvqa-fc-badge{
  background: #eef4ff !important;
  border: 1px solid #cfe0ff !important;
  color: #2f6ae6 !important;
}

.fvqa-theme--farhat .fvqa-fc-badge.a{
  background: #ecfdf5 !important;
  border-color: #b7e4c7 !important;
  color: #1f7a52 !important;
}

.fvqa-theme--farhat .fvqa-fc-qtext,
.fvqa-theme--farhat .fvqa-fc-atext{
  color: #3d4653 !important;
}

.fvqa-theme--farhat .fvqa-fc-q{
  padding: 2px 0 !important;
}

.fvqa-theme--farhat .fvqa-fc-a{
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid #eef2f7 !important;
}

/* ===== Premium realistic robot launcher ===== */
.fvqa-bubble{
  display:none;
  align-items:center;
  justify-content:center;
  width:116px !important;
  height:116px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.fvqa-bubble.show{
  display:inline-flex !important;
}
.fvqa-bubble-ico{
  width:116px !important;
  height:116px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:999px !important;
  background:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
}
.fvqa-bubble-robot{
  width:116px;
  height:116px;
  display:block;
  object-fit:contain;
  filter: drop-shadow(0 10px 18px rgba(15,23,42,.20));
  animation: fvqaRobotFloat 2.8s ease-in-out infinite;
  transform-origin: center bottom;
  user-select:none;
  pointer-events:none;
}
.fvqa-bubble-label{
  display:none !important;
}
@keyframes fvqaRobotFloat{
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.015); }
}


/* ===== Premium launcher greeting bubble ===== */
.fvqa-bubble{
  display:none;
  align-items:flex-end;
  justify-content:center;
  width:116px !important;
  height:116px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
  isolation:isolate;
}

.fvqa-bubble.show{
  display:inline-flex !important;
}

.fvqa-bubble-ico{
  position:relative;
  width:116px !important;
  height:116px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:999px !important;
  background:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
}

.fvqa-bubble-ico::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(53,106,255,.20) 0%, rgba(53,106,255,.10) 42%, rgba(53,106,255,0) 72%);
  filter:blur(10px);
  z-index:-1;
  animation:fvqaRobotAura 4.2s ease-in-out infinite;
}

.fvqa-bubble-robot{
  width:116px;
  height:116px;
  display:block;
  object-fit:contain;
  filter:drop-shadow(0 14px 22px rgba(15,23,42,.22));
  animation:
    fvqaRobotFloat 2.8s ease-in-out infinite,
    fvqaRobotTilt 5.8s ease-in-out infinite;
  transform-origin:center bottom;
  user-select:none;
  pointer-events:none;
}

.fvqa-bubble-label{
  display:none !important;
}

.fvqa-bubble-greeting{
  position:absolute;
  right:82px;
  bottom:70px;
  min-height:46px;
  max-width:min(320px, calc(100vw - 150px));
  padding:14px 16px;
  border-radius:20px 20px 8px 20px;
  background:linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border:1px solid rgba(212,221,236,.95);
  box-shadow:
    0 16px 40px rgba(15,23,42,.14),
    0 4px 12px rgba(15,23,42,.06);
  color:#1f2a44;
  font-size:13px;
  line-height:1.45;
  text-align:left;
  white-space:normal;
  pointer-events:none;
  opacity:0;
  transform:translate3d(16px, 10px, 0) scale(.96);
  transition:
    opacity .42s ease,
    transform .48s cubic-bezier(.2,.8,.2,1);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.fvqa-bubble-greeting::after{
  content:"";
  position:absolute;
  right:18px;
  bottom:-9px;
  width:18px;
  height:18px;
  background:linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-right:1px solid rgba(212,221,236,.95);
  border-bottom:1px solid rgba(212,221,236,.95);
  transform:rotate(45deg);
  border-bottom-right-radius:4px;
}

.fvqa-bubble.fvqa-greeting-visible .fvqa-bubble-greeting{
  opacity:1;
  transform:translate3d(0, 0, 0) scale(1);
}

.fvqa-bubble.fvqa-greeting-fade .fvqa-bubble-greeting{
  opacity:0;
  transform:translate3d(12px, 6px, 0) scale(.98);
}

.fvqa-bubble-greeting-text{
  display:inline;
  font-weight:600;
  letter-spacing:.01em;
}

.fvqa-bubble-greeting-caret{
  display:inline-block;
  width:2px;
  height:1.05em;
  margin-left:3px;
  border-radius:2px;
  background:#2f5bda;
  vertical-align:-2px;
  animation:fvqaCaretBlink .85s steps(1) infinite;
}

.fvqa-bubble.fvqa-greeting-fade .fvqa-bubble-greeting-caret{
  opacity:0;
}

@keyframes fvqaRobotFloat{
  0%,100%{ transform:translateY(0) scale(1); }
  50%{ transform:translateY(-5px) scale(1.015); }
}

@keyframes fvqaRobotTilt{
  0%,100%{ rotate:0deg; }
  20%{ rotate:-1.2deg; }
  50%{ rotate:1.2deg; }
  80%{ rotate:-.7deg; }
}

@keyframes fvqaRobotAura{
  0%,100%{ opacity:.55; transform:scale(1); }
  50%{ opacity:.9; transform:scale(1.08); }
}

@keyframes fvqaCaretBlink{
  0%,49%{ opacity:1; }
  50%,100%{ opacity:0; }
}

@media (max-width: 640px){
  .fvqa-bubble-greeting{
    right:74px;
    bottom:66px;
    max-width:min(245px, calc(100vw - 118px));
    min-height:42px;
    padding:12px 13px;
    font-size:12px;
    line-height:1.4;
  }

  .fvqa-bubble-greeting::after{
    right:14px;
  }
}
/* External finance/accounting fallback sources */
.fvqa-external-sources a{
  color:var(--fvqa-accent, #6eb6ff);
  text-decoration:underline;
  overflow-wrap:anywhere;
}
.fvqa-external-sources a:hover{
  text-decoration:none;
}

/* ---------- Farhat Lectures course recommendation ---------- */
.fvqa-course-card{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:220px;
}
.fvqa-course-card__eyebrow{
  font-size:10px;
  line-height:1.25;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--fvqa-accent-strong);
}
.fvqa-course-card__title{
  font-size:14px;
  line-height:1.35;
  font-weight:750;
  color:var(--fvqa-text);
}
.fvqa-course-card__reason{
  margin:0;
  font-size:12px;
  line-height:1.45;
  color:var(--fvqa-body-text);
}
.fvqa-course-card__button{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  margin-top:2px;
  padding:7px 13px;
  border-radius:999px;
  border:1px solid rgba(77,166,255,.45);
  background:linear-gradient(135deg, #225ede, #2f6ae6);
  color:#ffffff !important;
  font-size:12px;
  line-height:1;
  font-weight:750;
  text-decoration:none !important;
  box-shadow:0 6px 14px rgba(34,94,222,.22);
}
.fvqa-course-card__button:hover{
  color:#ffffff !important;
  filter:brightness(1.06);
  transform:translateY(-1px);
}
.fvqa-theme--farhat .fvqa-course-card__eyebrow{
  color:#2958c8 !important;
}
.fvqa-theme--farhat .fvqa-course-card__title{
  color:#2f3640 !important;
  font-size:15px;
}
.fvqa-theme--farhat .fvqa-course-card__reason{
  color:#5a6472 !important;
}
.fvqa-theme--farhat .fvqa-course-card__button,
.fvqa-theme--farhat .fvqa-course-card__button:visited{
  color:#ffffff !important;
}
@media (max-width:600px){
  .fvqa-course-card{ min-width:0; width:100%; }
  .fvqa-course-card__button{ width:100%; }
}

/* Farhat.AI v3.1 — start-new-conversation control */
.fvqa-header-btns .fvqa-new-conversation::before{
  content:"";
  width:13px;
  height:13px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  background:transparent !important;
  box-sizing:border-box;
}
.fvqa-header-btns .fvqa-new-conversation::after{
  content:"";
  position:absolute;
  left:58%;
  top:25%;
  width:0;
  height:0;
  border-left:4px solid currentColor;
  border-top:3px solid transparent;
  border-bottom:3px solid transparent;
  transform:rotate(-18deg);
  background:transparent !important;
}
.fvqa-theme--farhat .fvqa-header-btns .fvqa-new-conversation{ order:2; }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-export-pdf{ order:3; }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-fullscreen{ order:4; }
.fvqa-theme--farhat .fvqa-header-btns .fvqa-close{ order:5; }
