/* OpenPeptide widget — matches the DosagePeptide design language (cream / slate-blue #3C6076 / Schibsted+IBM Plex). */
:root{
  --op-cream:#FAF9F5; --op-ink:#1A2027; --op-ink2:#272D34; --op-muted:#5A636B;
  --op-teal:#3C6076; --op-teal2:#4E7189; --op-line:#E6EAEE; --op-line2:#EEF1F4;
  --op-user:#20323f; --op-shadow:0 24px 60px -18px rgba(20,32,45,.45);
  --op-disp:'Schibsted Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --op-body:'IBM Plex Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --op-mono:'IBM Plex Mono',ui-monospace,monospace;
}
html.op-lock{overflow:hidden}

/* ---------- launcher ---------- */
.op-launcher{
  position:fixed; right:24px; bottom:24px; z-index:2147483000;
  display:inline-flex; align-items:center; gap:9px; white-space:nowrap;
  padding:12px 18px 12px 15px; border:none; cursor:pointer;
  font-family:var(--op-disp); font-weight:600; font-size:15px; letter-spacing:.1px; color:#fff;
  background:linear-gradient(135deg,#4E7189,#3C6076); border-radius:99px;
  box-shadow:0 14px 30px -10px rgba(60,96,118,.6),0 3px 8px rgba(20,32,45,.18);
  transition:transform .18s ease,box-shadow .18s ease;
}
.op-launcher:hover{transform:translateY(-2px); box-shadow:0 20px 38px -10px rgba(60,96,118,.7)}
.op-launcher:active{transform:translateY(0)}
/* Hello Elementor reset.css paints bare [type=button] magenta (#c36) and ties .op-launcher on
   specificity; on custom templates (no home.css neutralizer) the reset wins. Pin the launcher with a
   higher-specificity selector so OpenPeptide's own styling always wins, on every page. */
/* Elementor's kit (.elementor-kit-5 button, 0,1,1) and Hello Elementor's reset ([type=button], 0,1,0)
   both override our button styling on custom templates. The launcher carries id="op-launcher", so an
   id selector (1,x,x) beats them all cleanly — no !important needed. */
button#op-launcher,button#op-launcher:hover,button#op-launcher:focus{display:inline-flex; align-items:center; justify-content:center; gap:9px; white-space:nowrap; width:auto; padding:12px 18px 12px 15px; border:0; border-radius:99px; line-height:normal; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076); font-family:var(--op-disp); font-weight:600; font-size:15px; letter-spacing:.1px; text-transform:none; -webkit-font-smoothing:subpixel-antialiased; -moz-osx-font-smoothing:auto}
#op-launcher .op-launcher__spark{display:inline-flex; align-items:center; justify-content:center}
.op-launcher__spark{display:inline-flex}
.op-launcher__spark svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))}

/* ---------- drawer ---------- */
.op-drawer{position:fixed; inset:0; z-index:2147483001; visibility:hidden; pointer-events:none}
.op-drawer.is-open{visibility:visible; pointer-events:auto}
.op-scrim{position:absolute; inset:0; background:rgba(20,32,45,.34); opacity:0; transition:opacity .28s ease; -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px)}
.op-drawer.is-open .op-scrim{opacity:1}
.op-panel{
  position:absolute; top:0; right:0; height:100%; width:min(444px,100%);
  display:flex; flex-direction:column; background:var(--op-cream);
  box-shadow:var(--op-shadow); transform:translateX(102%); transition:transform .34s cubic-bezier(.22,.61,.36,1);
  font-family:var(--op-body); color:var(--op-ink);
  /* Hello Elementor reset forces -webkit-font-smoothing:antialiased on <body> of custom templates; it's
     inherited, so the drawer text renders grayscale (lighter/greyer, slightly thinner) vs the home's
     subpixel. Pin subpixel here so the panel reads identically dark/dense on every page. */
  -webkit-font-smoothing:subpixel-antialiased; -moz-osx-font-smoothing:auto;
}
.op-drawer.is-open .op-panel{transform:translateX(0)}

/* head */
.op-head{display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--op-line); background:#fff}
.op-brand{display:flex; align-items:center; gap:9px}
.op-brand__mark{display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:9px; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076)}
.op-brand__name{font-family:var(--op-disp); font-weight:700; font-size:18px; letter-spacing:-.2px; color:var(--op-ink)}
.op-head__actions{display:flex; gap:4px}
.op-iconbtn{display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:none; background:none; color:var(--op-muted); border-radius:8px; cursor:pointer; transition:background .15s,color .15s}
.op-iconbtn:hover{background:var(--op-line2); color:var(--op-ink)}

/* thread */
.op-thread{flex:1; overflow-y:auto; padding:20px 18px; display:flex; flex-direction:column; gap:16px; scroll-behavior:smooth}
.op-greet{padding-top:2px}
.op-greet__eyebrow{font-family:var(--op-mono); font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--op-teal2); margin:0 0 11px}
.op-greet__title{font-family:var(--op-disp); font-weight:700; font-size:21px; line-height:1.24; letter-spacing:-.3px; color:var(--op-ink); margin:0 0 10px; text-wrap:balance}
.op-greet__hi{margin:0 0 15px; font-size:15px; line-height:1.62; color:var(--op-ink2)}
.op-greet__feats{list-style:none; margin:0; padding:15px 0 2px; border-top:1px solid var(--op-line); display:flex; flex-direction:column; gap:11px}
.op-greet__feat{display:flex; align-items:flex-start; gap:10px; font-size:13.5px; line-height:1.45; color:var(--op-ink2)}
.op-greet__feat svg{color:var(--op-teal2); flex-shrink:0; margin-top:2px}
.op-chips{display:flex; flex-direction:column; gap:8px}
.op-chip{text-align:left; padding:11px 14px; border:1px solid var(--op-line); background:#fff; border-radius:12px; font-family:var(--op-body); font-size:14px; color:var(--op-teal); cursor:pointer; transition:border-color .15s,background .15s,transform .1s}
.op-chip:hover{border-color:var(--op-teal2); background:#eef3f7}
.op-chip:active{transform:scale(.99)}
/* --- Neutralize the Elementor kit + theme reset that leak onto the widget's controls on custom-template
   pages (which don't load home.css). `.elementor-kit-5 button` (0,1,1) injects font-family (Schibsted),
   font-weight AND border-radius:30px onto EVERY <button>, and the reset lets button line-height inherit
   the page's 1.5 — all of which beat the widget's single-class rules (0,1,0). Result on those pages:
   suggestion chips render in Schibsted, taller (lh 21 vs normal) and pill-round (30 vs 12), and the send
   button becomes a padded circle with a shrunken icon. Re-pin each control's real box at 0,2,0 (scoped
   under .op-panel/.op-inline) so every page matches the home exactly. Textareas aren't buttons, so the
   composer input is unaffected. --- */
.op-panel .op-chip{font-family:var(--op-body); font-weight:400; line-height:normal; border-radius:12px}
.op-panel .op-copy,.op-inline .op-copy{font-family:var(--op-body); font-weight:400; line-height:normal; border-radius:8px}
.op-panel .op-send{border-radius:11px; padding:0; line-height:normal}
.op-panel .op-iconbtn{border-radius:8px; padding:0; line-height:normal}
.op-inline .op-ichat__send,[data-op-inline] .op-ichat__send{border-radius:10px; padding:0; line-height:normal}
.op-inline .op-inline__chip,[data-op-inline] .op-inline__chip{font-family:var(--op-body); font-weight:400; line-height:normal; border-radius:99px}
.op-inline .op-inline__open,[data-op-inline] .op-inline__open{font-family:var(--op-body); font-weight:400; line-height:normal; border-radius:13px}

/* messages */
.op-msg{display:flex}
.op-msg--user{justify-content:flex-end}
.op-bubble{max-width:86%; padding:11px 15px; background:var(--op-user); color:#fff; border-radius:16px 16px 4px 16px; font-size:14.5px; line-height:1.5}
.op-msg--ai{justify-content:flex-start}
.op-answer{max-width:100%; width:100%}
.op-status{display:flex; align-items:center; gap:9px; color:var(--op-muted); font-size:13.5px; padding:4px 0}
.op-dots{display:inline-flex; gap:4px}
.op-dots i{width:6px; height:6px; border-radius:50%; background:var(--op-teal2); animation:op-bounce 1.2s infinite ease-in-out}
.op-dots i:nth-child(2){animation-delay:.16s}
.op-dots i:nth-child(3){animation-delay:.32s}
@keyframes op-bounce{0%,80%,100%{transform:scale(.5);opacity:.4}40%{transform:scale(1);opacity:1}}

/* markdown answer */
.op-md{font-size:14.6px; line-height:1.65; color:var(--op-ink2)}
.op-md>*:first-child{margin-top:0}
.op-md>*:last-child{margin-bottom:0}
.op-md h3,.op-md h4,.op-md h5{font-family:var(--op-disp); color:var(--op-ink); line-height:1.3; margin:18px 0 8px}
.op-md h3{font-size:17px} .op-md h4{font-size:15.5px} .op-md h5{font-size:14.5px}
.op-md p{margin:0 0 11px}
.op-md ul,.op-md ol{margin:0 0 11px; padding-left:20px}
.op-md li{margin:4px 0}
.op-md strong{color:var(--op-ink); font-weight:600}
.op-md a{color:var(--op-teal2); text-decoration:underline; text-underline-offset:2px}
.op-md code{font-family:var(--op-mono); font-size:.9em; background:var(--op-line2); padding:1px 5px; border-radius:5px}
.op-md hr{border:none; border-top:1px solid var(--op-line); margin:14px 0}
.op-tablewrap{overflow-x:auto; margin:0 0 12px; border:1px solid var(--op-line); border-radius:10px}
.op-md table{width:100%; border-collapse:collapse; font-size:13.5px; min-width:320px}
.op-md thead th{background:#f2f5f7; text-align:left; padding:8px 11px; font-weight:600; color:var(--op-ink); border-bottom:1px solid var(--op-line)}
.op-md tbody td{padding:8px 11px; border-top:1px solid var(--op-line2); vertical-align:top}
.op-err{color:#b23b2e; font-size:14px}

/* sources */
.op-sources{margin-top:14px; padding-top:12px; border-top:1px solid var(--op-line)}
.op-sources__h{font-family:var(--op-mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--op-muted); margin-bottom:7px}
.op-srclist{margin:0; padding-left:18px; display:flex; flex-direction:column; gap:5px}
.op-srclist a{color:var(--op-teal); text-decoration:none; font-size:13px; line-height:1.45}
.op-srclist a:hover{text-decoration:underline; color:var(--op-teal2)}

/* toolbar / copy */
.op-toolbar{margin-top:10px; display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.op-copy{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--op-line); background:#fff; color:var(--op-muted); border-radius:8px; padding:5px 10px; font-family:var(--op-body); font-size:12.5px; cursor:pointer; transition:color .15s,border-color .15s}
.op-copy:hover{color:var(--op-ink); border-color:var(--op-muted)}
.op-copy.is-done{color:var(--op-teal2); border-color:var(--op-teal2)}
/* swap the whole label to "Copied!" on success (previously appended "ied!" → "Copyied!") */
.op-copy.is-done span{font-size:0}
.op-copy.is-done span::after{content:'Copied!'; font-size:12.5px}

/* answer feedback (thumbs) */
.op-fb{display:inline-flex; align-items:center; gap:6px; margin-left:auto}
.op-fb__q{font-family:var(--op-body); font-size:12px; color:var(--op-muted)}
.op-fb__btn{display:inline-flex; align-items:center; justify-content:center; width:28px; height:26px; padding:0; border:1px solid var(--op-line); background:#fff; color:var(--op-muted); border-radius:7px; cursor:pointer; transition:color .15s,border-color .15s,background .15s}
.op-fb__btn:hover{color:var(--op-ink); border-color:var(--op-muted)}
.op-fb__btn.is-on{color:var(--op-teal2); border-color:var(--op-teal2); background:#eef3f7}
.op-fb.is-voted .op-fb__btn{cursor:default}
.op-fb.is-voted .op-fb__btn:not(.is-on){opacity:.38}

/* composer */
.op-composer{border-top:1px solid var(--op-line); padding:12px 14px 10px; background:#fff}
.op-inputwrap{display:flex; align-items:flex-end; gap:8px; border:1px solid var(--op-line); border-radius:14px; padding:6px 6px 6px 14px; background:#fff; transition:border-color .15s,box-shadow .15s}
.op-inputwrap:focus-within{border-color:var(--op-teal2); box-shadow:0 0 0 3px rgba(60,96,118,.12)}
/* font-size:16px is required — iOS Safari auto-zooms the viewport when a focused field is <16px */
.op-input{flex:1; min-width:0; border:none; outline:none; resize:none; font-family:var(--op-body); font-size:16px; line-height:1.5; color:var(--op-ink); background:none; max-height:140px; padding:6px 0}
.op-send{flex-shrink:0; width:38px; height:38px; border:none; border-radius:11px; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076); cursor:pointer; transition:opacity .15s,transform .1s}
.op-send:hover{transform:translateY(-1px)} .op-send:active{transform:translateY(0)}
.op-send:disabled{opacity:.45; cursor:default; transform:none}
.op-disclaimer{margin:8px 4px 2px; font-size:11px; line-height:1.5; color:#4B545C; text-align:center}

/* ---------- inline hero ([openpeptide] shortcode / page block) ---------- */
.op-inline{
  font-family:var(--op-body); color:var(--op-ink);
  -webkit-font-smoothing:subpixel-antialiased; -moz-osx-font-smoothing:auto;
  border:1px solid var(--op-line); border-radius:18px; overflow:hidden;
  background:linear-gradient(180deg,#fff, #f4f7fa);
  box-shadow:0 18px 48px -22px rgba(60,96,118,.28);
  max-width:760px; margin:8px 0;
}
.op-inline__top{padding:22px 24px 18px; background:linear-gradient(120deg,rgba(60,96,118,.06),rgba(60,96,118,.05))}
.op-inline__head{display:flex; align-items:center; gap:12px; margin-bottom:6px}
.op-inline__mark{display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:11px; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076); flex-shrink:0}
.op-inline__name{font-family:var(--op-disp); font-weight:700; font-size:20px; letter-spacing:-.3px; color:var(--op-ink)}
.op-inline__eyebrow{font-family:var(--op-mono); font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--op-teal2); margin-bottom:2px}
.op-inline__baseline{font-size:15px; line-height:1.55; color:var(--op-muted); margin:6px 0 16px}
.op-inline__open{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border:1px solid var(--op-line); background:#fff; border-radius:13px;
  font-family:var(--op-body); font-size:15px; color:var(--op-muted); cursor:text; text-align:left;
  transition:border-color .15s,box-shadow .15s;
}
.op-inline__open:hover{border-color:var(--op-teal2); box-shadow:0 0 0 3px rgba(60,96,118,.1)}
.op-inline__open .op-inline__go{display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:9px; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076); flex-shrink:0}
.op-inline__chips{display:flex; flex-wrap:wrap; gap:8px; padding:16px 24px 8px}
.op-inline__chip{padding:8px 13px; border:1px solid var(--op-line); background:#fff; border-radius:99px; font-family:var(--op-body); font-size:13px; color:var(--op-teal); cursor:pointer; transition:border-color .15s,background .15s}
.op-inline__chip:hover{border-color:var(--op-teal2); background:#eef3f7}
.op-inline__foot{padding:10px 24px 18px; font-size:11.5px; line-height:1.5; color:#4B545C}
/* device (dark slate) chips — styled by class, not inline, so :hover actually applies */
.op-device .op-inline__chip{background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.24); color:#EAEFF3}
.op-device .op-inline__chip:hover{background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.55); color:#fff}

/* consistent keyboard focus ring across every OpenPeptide surface */
.op-launcher:focus-visible,.op-drawer button:focus-visible,.op-drawer a:focus-visible,.op-drawer textarea:focus-visible,
.op-inline button:focus-visible,.op-inline textarea:focus-visible,[data-op-inline] button:focus-visible,[data-op-inline] textarea:focus-visible,
.op-md a:focus-visible,.op-srclist a:focus-visible{outline:2px solid var(--op-teal2); outline-offset:2px; border-radius:6px}
.op-device .op-inline__chip:focus-visible,.op-ichat__send:focus-visible{outline:2px solid #fff; outline-offset:2px}

/* ---------- embedded on-page chat (protocol device etc.) ---------- */
.op-ichat{margin-top:16px; background:#fff; border-radius:13px; padding:15px 15px 5px; max-height:min(72vh,720px); overflow-y:auto; display:flex; flex-direction:column; gap:15px; box-shadow:0 10px 30px -18px rgba(0,0,0,.4); scroll-behavior:smooth}
.op-ichat:empty{display:none}
.op-ichat .op-status{padding:2px 0}
.op-ichat__composer{display:flex; align-items:flex-end; gap:8px; margin-top:14px; border:1px solid rgba(255,255,255,.22); border-radius:13px; padding:6px 6px 6px 14px; background:#fff; transition:box-shadow .15s}
.op-ichat__composer:focus-within{box-shadow:0 0 0 3px rgba(255,255,255,.18)}
.op-ichat__input{flex:1; min-width:0; border:none; outline:none; resize:none; font-family:var(--op-body); font-size:16px; line-height:1.5; color:var(--op-ink); background:none; max-height:120px; padding:6px 0}
.op-ichat__send{flex-shrink:0; width:36px; height:36px; border:none; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:linear-gradient(135deg,#4E7189,#3C6076); cursor:pointer; transition:transform .1s}
.op-ichat__send:hover{transform:translateY(-1px)} .op-ichat__send:disabled{opacity:.5; transform:none; cursor:default}
/* inline chat hosted inside the LIGHT [openpeptide] hero (.op-inline has no container padding of its own,
   and a white thread on a light card needs a border instead of a drop shadow) */
.op-inline .op-ichat{margin:6px 24px 0; box-shadow:none; border:1px solid var(--op-line)}
.op-inline .op-ichat__composer{margin:12px 24px 20px; border-color:var(--op-line)}
.op-inline .op-ichat__composer:focus-within{box-shadow:0 0 0 3px rgba(60,96,118,.12)}
.op-inline .op-ichat__input{color:var(--op-ink)}

/* mobile */
@media (max-width:640px){
  .op-inline__top{padding:18px 16px 14px} .op-inline__chips{padding:14px 16px 6px} .op-inline__foot{padding:8px 16px 16px}
  .op-inline__name{font-size:18px}
  .op-launcher{right:16px; bottom:88px; padding:11px 16px 11px 13px; font-size:14px}
  .op-panel{width:100%}
  .op-head{padding:14px 16px}
  .op-thread{padding:16px 14px}
}
@media (prefers-reduced-motion:reduce){
  .op-panel,.op-scrim,.op-launcher,.op-chip,.op-copy,.op-iconbtn,.op-inline__open,.op-inline__chip,.op-send,.op-ichat__send{transition:none}
  .op-thread,.op-ichat{scroll-behavior:auto}
  .op-dots i{animation:none; opacity:.7}
}
