/* ==========================================================================
   Alamer Agents & Booking — widget styles (v2.1)
   Design tokens live on #alm-root and are driven by data-* attributes
   (position / style / size / theme / radius / elevation) set from wp-admin.
   ========================================================================== */

#alm-root{
  /* brand (overridden inline from settings) */
  --alm-brand:#0b6b57; --alm-brand-fg:#fff;
  --alm-brand-2:var(--alm-brand);
  /* surface tokens (light) */
  --alm-bg:#fff; --alm-surface:#f5f7f9; --alm-fg:#13202b; --alm-muted:#5b6977; --alm-line:#e2e7ec;
  --alm-bubble:#eef2f5; --alm-err:#c4352b; --alm-ok:#16a34a; --alm-ring:rgba(11,107,87,.28);
  /* geometry */
  --alm-ox:20px; --alm-oy:20px; --alm-h:52px; --alm-fs:15px;
  --alm-r:16px; --alm-rf:11px;
  --alm-font:inherit;
  --alm-shadow:0 10px 28px rgba(15,23,42,.18),0 2px 8px rgba(15,23,42,.10);
  --alm-shadow-hover:0 14px 34px rgba(15,23,42,.24),0 3px 10px rgba(15,23,42,.12);
  --alm-pshadow:0 24px 60px rgba(15,23,42,.28),0 4px 14px rgba(15,23,42,.12);

  position:fixed!important;z-index:2147483000!important;margin:0;padding:0;
  font-family:var(--alm-font);font-size:var(--alm-fs);line-height:1.5;color:var(--alm-fg);
  direction:rtl;text-align:right;-webkit-font-smoothing:antialiased;
}
@supports (color:color-mix(in srgb,red,blue)){
  #alm-root{--alm-brand-2:color-mix(in srgb,var(--alm-brand) 78%,#000);--alm-ring:color-mix(in srgb,var(--alm-brand) 30%,transparent)}
}
#alm-root *,#alm-root *::before,#alm-root *::after{box-sizing:border-box}
#alm-root[data-font="system"]{--alm-font:"Segoe UI",Tahoma,"Noto Sans Arabic","Noto Kufi Arabic",system-ui,-apple-system,Arial,sans-serif}

/* ---- themes ---- */
#alm-root[data-theme="dark"]{
  --alm-bg:#171c21; --alm-surface:#20272e; --alm-fg:#eef2f5; --alm-muted:#9aa7b4; --alm-line:#2f3943;
  --alm-bubble:#242c34; --alm-err:#ff8f86; --alm-pshadow:0 24px 60px rgba(0,0,0,.55),0 4px 14px rgba(0,0,0,.4);
}
@media (prefers-color-scheme:dark){
  #alm-root[data-theme="auto"]{
    --alm-bg:#171c21; --alm-surface:#20272e; --alm-fg:#eef2f5; --alm-muted:#9aa7b4; --alm-line:#2f3943;
    --alm-bubble:#242c34; --alm-err:#ff8f86; --alm-pshadow:0 24px 60px rgba(0,0,0,.55),0 4px 14px rgba(0,0,0,.4);
  }
}

/* ---- radius / elevation / size ---- */
#alm-root[data-radius="sharp"]{--alm-r:6px;--alm-rf:6px}
#alm-root[data-radius="soft"]{--alm-r:16px;--alm-rf:11px}
#alm-root[data-radius="round"]{--alm-r:26px;--alm-rf:16px}
#alm-root[data-elev="none"]{--alm-shadow:none;--alm-shadow-hover:none}
#alm-root[data-elev="strong"]{--alm-shadow:0 14px 36px rgba(15,23,42,.34),0 3px 10px rgba(15,23,42,.18);--alm-shadow-hover:0 18px 44px rgba(15,23,42,.4),0 4px 12px rgba(15,23,42,.2)}
#alm-root[data-size="sm"]{--alm-h:44px;--alm-fs:14px}
#alm-root[data-size="md"]{--alm-h:52px;--alm-fs:15px}
#alm-root[data-size="lg"]{--alm-h:60px;--alm-fs:16px}

/* ---- placement (physical sides on purpose: the admin picks "right" or "left") ---- */
#alm-root[data-pos="br"]{right:var(--alm-ox);left:auto;bottom:calc(var(--alm-oy) + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="bl"]{left:var(--alm-ox);right:auto;bottom:calc(var(--alm-oy) + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="bc"]{left:0;right:0;margin-inline:auto;width:max-content;bottom:calc(var(--alm-oy) + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="mr"]{right:0;left:auto;top:50%}
#alm-root[data-pos="ml"]{left:0;right:auto;top:50%}
#alm-root[hidden],#alm-root[data-hold]{display:none!important}

/* ---- visibility helpers (CSS only, so they work without JS) ---- */
@media (max-width:767px){#alm-root[data-hide-mobile]{display:none!important}}
@media (min-width:768px){#alm-root[data-hide-desktop]{display:none!important}}

/* ---- resets inside the widget (themes love to style bare buttons/inputs) ---- */
#alm-root button,#alm-root input,#alm-root select,#alm-root textarea{font-family:inherit;letter-spacing:normal;text-transform:none;margin:0;max-width:100%}
#alm-root button{-webkit-appearance:none;appearance:none}
#alm-root a{text-decoration:none}
#alm-root [hidden]{display:none!important}
#alm-root .alm-svg{display:block;flex:none}

/* ==========================================================================
   Launcher
   ========================================================================== */
#alm-root .alm-fab{
  position:relative;display:inline-flex;align-items:center;gap:10px;height:var(--alm-h);
  padding:0 20px 0 8px;border:0;border-radius:999px;cursor:pointer;color:var(--alm-brand-fg);
  background:var(--alm-brand);font-size:var(--alm-fs);font-weight:700;line-height:1;white-space:nowrap;
  box-shadow:var(--alm-shadow);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
  -webkit-tap-highlight-color:transparent;
}
@supports (color:color-mix(in srgb,red,blue)){
  #alm-root .alm-fab{background:linear-gradient(135deg,var(--alm-brand),var(--alm-brand-2))}
}
#alm-root .alm-fab:hover,#alm-root .alm-fab:focus{color:var(--alm-brand-fg);transform:translateY(-2px);box-shadow:var(--alm-shadow-hover)}
#alm-root .alm-fab:active{transform:translateY(0) scale(.98)}
#alm-root .alm-fab .alm-ico{display:grid;place-items:center;width:calc(var(--alm-h) - 14px);height:calc(var(--alm-h) - 14px);border-radius:50%;background:rgba(255,255,255,.18)}
#alm-root .alm-fab .alm-ico .alm-svg{width:55%;height:55%}
#alm-root .alm-fab-text{position:relative}

#alm-root[data-style="circle"] .alm-fab{width:var(--alm-h);padding:0;justify-content:center}
#alm-root[data-style="circle"] .alm-fab .alm-ico{background:none;width:100%;height:100%}
#alm-root[data-style="circle"] .alm-fab .alm-ico .alm-svg{width:46%;height:46%}
#alm-root[data-style="circle"] .alm-fab-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* docked side tab (mid-edge positions) */
#alm-root[data-style="tab"] .alm-fab{flex-direction:column;height:auto;width:calc(var(--alm-h) - 4px);padding:14px 0;gap:10px;border-radius:14px 0 0 14px;transform:translateY(-50%)}
#alm-root[data-style="tab"][data-pos="ml"] .alm-fab{border-radius:0 14px 14px 0}
#alm-root[data-style="tab"] .alm-fab:hover,#alm-root[data-style="tab"] .alm-fab:focus{transform:translateY(-50%) translateX(-3px)}
#alm-root[data-style="tab"][data-pos="ml"] .alm-fab:hover,#alm-root[data-style="tab"][data-pos="ml"] .alm-fab:focus{transform:translateY(-50%) translateX(3px)}
#alm-root[data-style="tab"] .alm-fab:active{transform:translateY(-50%)}
#alm-root[data-style="tab"] .alm-fab .alm-ico{width:34px;height:34px}
#alm-root[data-style="tab"] .alm-fab-text{writing-mode:vertical-rl;text-orientation:mixed;letter-spacing:.02em}
/* circle / pill on mid edges: vertically centred, small gap from the edge */
#alm-root[data-pos="mr"]:not([data-style="tab"]){right:var(--alm-ox)}
#alm-root[data-pos="ml"]:not([data-style="tab"]){left:var(--alm-ox)}
#alm-root[data-pos="mr"]:not([data-style="tab"]) .alm-fab,#alm-root[data-pos="ml"]:not([data-style="tab"]) .alm-fab{transform:translateY(-50%)}
#alm-root[data-pos="mr"]:not([data-style="tab"]) .alm-fab:hover,#alm-root[data-pos="ml"]:not([data-style="tab"]) .alm-fab:hover{transform:translateY(calc(-50% - 2px))}

/* attention ring: plays three times then stops */
#alm-root[data-pulse] .alm-fab::before{
  content:"";position:absolute;inset:0;border-radius:inherit;background:var(--alm-brand);z-index:-1;opacity:0;pointer-events:none;
}
@media (prefers-reduced-motion:no-preference){
  #alm-root[data-pulse] .alm-fab::before{animation:alm-pulse 2.6s ease-out 1.6s 3}
  @keyframes alm-pulse{0%{opacity:.45;transform:scale(1)}70%{opacity:0;transform:scale(1.28,1.55)}100%{opacity:0;transform:scale(1.28,1.55)}}
  #alm-root[data-style="circle"][data-pulse] .alm-fab::before{--k:1}
}

/* icon-only on small screens (optional) */
@media (max-width:520px){
  #alm-root[data-mob-icon] .alm-fab{width:var(--alm-h);padding:0;justify-content:center}
  #alm-root[data-mob-icon] .alm-fab .alm-ico{background:none;width:100%;height:100%}
  #alm-root[data-mob-icon] .alm-fab .alm-ico .alm-svg{width:46%;height:46%}
  #alm-root[data-mob-icon] .alm-fab-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  #alm-root[data-open] .alm-fab,#alm-root[data-open] .alm-teaser{display:none}
}

/* ==========================================================================
   Teaser bubble
   ========================================================================== */
#alm-root .alm-teaser{
  position:absolute;bottom:calc(var(--alm-h) + 14px);display:flex;align-items:flex-start;gap:8px;
  width:max-content;max-width:min(320px,calc(100vw - 40px));text-wrap:balance;padding:12px 14px;background:var(--alm-bg);color:var(--alm-fg);
  border:1px solid var(--alm-line);border-radius:var(--alm-rf);box-shadow:var(--alm-shadow);font-size:14px;line-height:1.55;cursor:pointer;
  animation:alm-pop .3s cubic-bezier(.2,.8,.2,1);
}
#alm-root[data-pos="br"] .alm-teaser,#alm-root[data-pos="mr"] .alm-teaser{right:0}
#alm-root[data-pos="bl"] .alm-teaser,#alm-root[data-pos="ml"] .alm-teaser{left:0}
#alm-root[data-pos="bc"] .alm-teaser{left:50%;transform:translateX(-50%)}
#alm-root[data-pos="mr"] .alm-teaser,#alm-root[data-pos="ml"] .alm-teaser{bottom:auto;top:50%;margin-top:-26px}
#alm-root[data-pos="mr"] .alm-teaser{right:calc(var(--alm-h) + 10px)}
#alm-root[data-pos="ml"] .alm-teaser{left:calc(var(--alm-h) + 10px)}
#alm-root .alm-teaser::after{content:"";position:absolute;bottom:-6px;width:12px;height:12px;background:var(--alm-bg);border:1px solid var(--alm-line);border-top:0;border-inline-start:0;transform:rotate(45deg)}
#alm-root[data-pos="br"] .alm-teaser::after{right:22px}
#alm-root[data-pos="bl"] .alm-teaser::after{left:22px}
#alm-root[data-pos="bc"] .alm-teaser::after{left:calc(50% - 6px)}
#alm-root[data-pos="mr"] .alm-teaser::after,#alm-root[data-pos="ml"] .alm-teaser::after{bottom:auto;top:20px;border:1px solid var(--alm-line);border-bottom:0;border-inline-end:0}
#alm-root[data-pos="mr"] .alm-teaser::after{right:-7px;transform:rotate(135deg)}
#alm-root[data-pos="ml"] .alm-teaser::after{left:-7px;transform:rotate(-45deg)}
#alm-root .alm-teaser-x{flex:none;width:22px;height:22px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--alm-surface);color:var(--alm-muted);cursor:pointer;padding:0}
#alm-root .alm-teaser-x:hover{background:var(--alm-line);color:var(--alm-fg)}
@keyframes alm-pop{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}
#alm-root[data-pos="bc"] .alm-teaser{animation:none}

/* ==========================================================================
   Panel
   ========================================================================== */
#alm-root .alm-backdrop{display:none}
#alm-root .alm-panel{
  position:fixed;display:flex;flex-direction:column;width:min(400px,calc(100vw - 24px));
  max-height:calc(100vh - var(--alm-oy) - var(--alm-h) - 40px);
  max-height:calc(100dvh - var(--alm-oy) - var(--alm-h) - 40px);
  background:var(--alm-bg);color:var(--alm-fg);border:1px solid var(--alm-line);border-radius:var(--alm-r);
  box-shadow:var(--alm-pshadow);overflow:hidden;
}
#alm-root[data-pos="br"] .alm-panel{right:var(--alm-ox);bottom:calc(var(--alm-oy) + var(--alm-h) + 14px + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="bl"] .alm-panel{left:var(--alm-ox);bottom:calc(var(--alm-oy) + var(--alm-h) + 14px + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="bc"] .alm-panel{left:0;right:0;margin-inline:auto;bottom:calc(var(--alm-oy) + var(--alm-h) + 14px + env(safe-area-inset-bottom,0px))}
#alm-root[data-pos="mr"] .alm-panel{right:calc(var(--alm-h) + 16px);bottom:20px;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px)}
#alm-root[data-pos="ml"] .alm-panel{left:calc(var(--alm-h) + 16px);bottom:20px;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px)}
#alm-root[data-pos="mr"]:not([data-style="tab"]) .alm-panel{right:calc(var(--alm-ox) + var(--alm-h) + 14px)}
#alm-root[data-pos="ml"]:not([data-style="tab"]) .alm-panel{left:calc(var(--alm-ox) + var(--alm-h) + 14px)}
#alm-root .alm-panel[hidden]{display:none!important}
@media (prefers-reduced-motion:no-preference){
  #alm-root .alm-panel{animation:alm-in .24s cubic-bezier(.2,.8,.2,1)}
  @keyframes alm-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
}

/* header */
#alm-root .alm-head{
  position:relative;display:flex;align-items:center;gap:12px;padding:16px 16px 18px;color:var(--alm-brand-fg);background:var(--alm-brand);
}
@supports (color:color-mix(in srgb,red,blue)){
  #alm-root .alm-head{background:linear-gradient(135deg,var(--alm-brand),var(--alm-brand-2))}
}
#alm-root .alm-avatar{position:relative;flex:none;width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.2);display:grid;place-items:center;overflow:hidden;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
#alm-root .alm-avatar img{width:100%;height:100%;object-fit:cover;display:block}
#alm-root .alm-avatar .alm-svg{width:24px;height:24px}
#alm-root .alm-htext{min-width:0;flex:1}
#alm-root .alm-title{display:block;font-size:16px;font-weight:800;line-height:1.3;margin:0;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#alm-root .alm-sub{display:flex;align-items:center;gap:7px;margin:3px 0 0;font-size:12.5px;opacity:.92;color:inherit}
#alm-root .alm-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.28)}
#alm-root .alm-x{flex:none;position:relative;z-index:1;width:34px;height:34px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:inherit;cursor:pointer;transition:background .15s}
#alm-root .alm-x:hover{background:rgba(255,255,255,.28)}

/* tabs (only when smart chat is on) */
#alm-root .alm-tabs{display:flex;gap:4px;margin:-12px 14px 4px;padding:4px;background:var(--alm-bg);border:1px solid var(--alm-line);border-radius:999px;box-shadow:0 4px 14px rgba(15,23,42,.1);position:relative;z-index:2}
#alm-root .alm-tab{flex:1;border:0;background:none;color:var(--alm-muted);font-size:13.5px;font-weight:700;padding:8px 10px;border-radius:999px;cursor:pointer;transition:background .15s,color .15s}
#alm-root .alm-tab[aria-selected="true"]{background:var(--alm-brand);color:var(--alm-brand-fg)}

/* quick contact actions */
#alm-root .alm-quick{display:flex;gap:8px;padding:12px 16px 12px;border-bottom:1px solid var(--alm-line)}
#alm-root .alm-qa{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 10px;border:1px solid var(--alm-line);border-radius:var(--alm-rf);background:var(--alm-surface);color:var(--alm-fg);font-size:13.5px;font-weight:700;transition:border-color .15s,background .15s}
#alm-root .alm-qa:hover{border-color:var(--alm-brand);color:var(--alm-fg)}
#alm-root .alm-qa .alm-svg{width:17px;height:17px;color:var(--alm-brand)}

#alm-root .alm-body{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}

/* form */
#alm-root .alm-form{padding:14px 16px 8px}
#alm-root .alm-row{margin-bottom:12px}
#alm-root .alm-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#alm-root .alm-grid .alm-row{margin-bottom:12px;min-width:0}
#alm-root .alm-row>label,#alm-root .alm-lbl{display:block;margin:0 0 5px;font-size:13px;font-weight:700;color:var(--alm-fg)}
#alm-root .alm-req{color:var(--alm-err);margin-inline-start:3px}
#alm-root .alm-opt{font-weight:500;color:var(--alm-muted);margin-inline-start:4px;font-size:12px}
#alm-root .alm-form input[type=text],#alm-root .alm-form input[type=tel],#alm-root .alm-form select,#alm-root .alm-form textarea{
  display:block;width:100%;height:46px;padding:0 13px;background:var(--alm-bg);color:var(--alm-fg);
  border:1.5px solid var(--alm-line);border-radius:var(--alm-rf);font-size:16px;line-height:1.4;box-shadow:none;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
#alm-root .alm-form textarea{height:auto;min-height:78px;padding:11px 13px;resize:vertical}
#alm-root .alm-form select{padding-inline-end:38px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b97a3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 13px center;-webkit-appearance:none;appearance:none}
#alm-root .alm-form input[dir=ltr]{text-align:right}
#alm-root .alm-form ::placeholder{color:var(--alm-muted);opacity:.7}
#alm-root .alm-form input:focus,#alm-root .alm-form select:focus,#alm-root .alm-form textarea:focus{outline:0;border-color:var(--alm-brand);box-shadow:0 0 0 4px var(--alm-ring)}
#alm-root .alm-form [aria-invalid="true"]{border-color:var(--alm-err)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--alm-err) 18%,transparent)}
#alm-root .alm-fe{margin:5px 2px 0;font-size:12.5px;color:var(--alm-err);min-height:0}
#alm-root .alm-fe:empty{display:none}
#alm-root .alm-price{display:flex;align-items:center;gap:8px;margin:-4px 0 12px;padding:9px 12px;background:var(--alm-surface);border:1px dashed var(--alm-line);border-radius:var(--alm-rf);font-size:13px;color:var(--alm-muted)}
#alm-root .alm-price:empty{display:none}
#alm-root .alm-price strong{color:var(--alm-fg)}
#alm-root .alm-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#alm-root .alm-chip{border:1px solid var(--alm-line);background:var(--alm-bg);color:var(--alm-fg);border-radius:999px;padding:5px 11px;font-size:12.5px;font-weight:600;cursor:pointer;transition:all .15s}
#alm-root .alm-chip:hover{border-color:var(--alm-brand)}
#alm-root .alm-chip[aria-pressed="true"]{background:var(--alm-brand);border-color:var(--alm-brand);color:var(--alm-brand-fg)}
#alm-root .alm-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0;pointer-events:none}
#alm-root .alm-consent{display:flex;align-items:flex-start;gap:9px;margin:6px 0 4px;font-size:12.5px;line-height:1.6;color:var(--alm-muted);cursor:pointer}
#alm-root .alm-consent input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:var(--alm-brand)}
#alm-root .alm-consent a,#alm-root .alm-note a{color:var(--alm-brand);font-weight:600;text-decoration:underline}
#alm-root .alm-error{margin:8px 0 0;padding:0;font-size:13px;color:var(--alm-err);min-height:0}
#alm-root .alm-error:empty{display:none}
#alm-root .alm-submit,#alm-root .alm-wa,#alm-root .alm-ghost{
  display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;margin-top:12px;padding:0 16px;
  border:0;border-radius:var(--alm-rf);font-size:15px;font-weight:800;cursor:pointer;text-align:center;transition:transform .12s,filter .15s,box-shadow .15s;
}
#alm-root .alm-submit,#alm-root .alm-wa{background:var(--alm-brand);color:var(--alm-brand-fg);box-shadow:0 6px 16px color-mix(in srgb,var(--alm-brand) 32%,transparent)}
#alm-root .alm-submit:hover,#alm-root .alm-wa:hover{filter:brightness(1.07);color:var(--alm-brand-fg)}
#alm-root .alm-submit:active{transform:scale(.985)}
#alm-root .alm-submit:disabled{opacity:.75;cursor:progress}
#alm-root .alm-ghost{background:var(--alm-surface);color:var(--alm-fg);border:1px solid var(--alm-line);min-height:44px;font-weight:700}
#alm-root .alm-wa{background:#1fa855;box-shadow:0 6px 16px rgba(31,168,85,.3);color:#fff}
#alm-root .alm-wa:hover{color:#fff}
#alm-root .alm-spin{width:18px;height:18px;border:2.5px solid rgba(255,255,255,.4);border-top-color:currentColor;border-radius:50%;animation:alm-rot .7s linear infinite}
@keyframes alm-rot{to{transform:rotate(360deg)}}
#alm-root .alm-submit .alm-svg{width:18px;height:18px}

/* success */
#alm-root .alm-done{padding:26px 20px 18px;text-align:center}
#alm-root .alm-check{width:68px;height:68px;margin:0 auto 14px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--alm-ok) 14%,transparent);color:var(--alm-ok)}
#alm-root .alm-check svg{width:34px;height:34px;stroke-width:2.6;stroke-dasharray:30;stroke-dashoffset:30;animation:alm-draw .5s .15s ease-out forwards}
@keyframes alm-draw{to{stroke-dashoffset:0}}
#alm-root .alm-done .alm-ok{margin:0 0 6px;font-size:19px;font-weight:800;color:var(--alm-fg)}
#alm-root .alm-num{display:inline-block;margin:2px 0 8px;padding:3px 12px;border-radius:999px;background:var(--alm-surface);border:1px solid var(--alm-line);font-weight:800;font-size:13px;direction:ltr}
#alm-root .alm-done p{margin:0 0 4px;color:var(--alm-muted);font-size:14px}

/* chat */
#alm-root .alm-chat{display:flex;flex-direction:column;height:min(56vh,430px)}
#alm-root .alm-log{flex:1;overflow:auto;padding:16px 16px 8px;display:flex;flex-direction:column;gap:9px;scroll-behavior:smooth}
#alm-root .alm-msg{max-width:86%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
#alm-root .alm-bot{background:var(--alm-bubble);align-self:flex-start;border-end-start-radius:5px}
#alm-root .alm-user{background:var(--alm-brand);color:var(--alm-brand-fg);align-self:flex-end;border-end-end-radius:5px}
#alm-root .alm-typing{display:inline-flex;gap:4px;align-items:center;padding:13px 14px}
#alm-root .alm-typing i{width:6px;height:6px;border-radius:50%;background:var(--alm-muted);animation:alm-bounce 1.1s infinite ease-in-out}
#alm-root .alm-typing i:nth-child(2){animation-delay:.15s}#alm-root .alm-typing i:nth-child(3){animation-delay:.3s}
@keyframes alm-bounce{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-4px);opacity:1}}
#alm-root .alm-suggest{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 8px}
#alm-root .alm-draft{margin-top:2px}
#alm-root .alm-send{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--alm-line);background:var(--alm-bg)}
#alm-root .alm-send input{flex:1;min-width:0;height:44px;padding:0 14px;border:1.5px solid var(--alm-line);border-radius:999px;background:var(--alm-bg);color:var(--alm-fg);font-size:16px}
#alm-root .alm-send input:focus{outline:0;border-color:var(--alm-brand);box-shadow:0 0 0 4px var(--alm-ring)}
#alm-root .alm-sendbtn{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--alm-brand);color:var(--alm-brand-fg);display:grid;place-items:center;cursor:pointer;padding:0}
#alm-root .alm-sendbtn .alm-svg{width:19px;height:19px;transform:scaleX(-1)}
#alm-root .alm-sendbtn:disabled{opacity:.55;cursor:default}
#alm-root .alm-note{margin:0;padding:0 16px 10px;font-size:11.5px;color:var(--alm-muted)}

/* footer */
#alm-root .alm-foot{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px 14px;border-top:1px solid var(--alm-line);background:var(--alm-surface);font-size:12px;color:var(--alm-muted)}
#alm-root .alm-foot .alm-svg{width:15px;height:15px;color:var(--alm-ok)}
#alm-root .alm-foot a{color:var(--alm-muted);text-decoration:underline}

/* focus ring (keyboard only) */
#alm-root .alm-fab:focus-visible,#alm-root button:focus-visible,#alm-root a:focus-visible{outline:3px solid #f2b705;outline-offset:2px}

/* ==========================================================================
   Phones: bottom sheet with backdrop
   ========================================================================== */
@media (max-width:520px){
  #alm-root[data-pos="br"],#alm-root[data-pos="bl"]{--alm-ox:14px}
  #alm-root .alm-backdrop{position:fixed;inset:0;background:rgba(10,18,26,.5);display:block;animation:alm-fade .2s ease-out}
  #alm-root .alm-backdrop[hidden]{display:none!important}
  #alm-root .alm-panel,#alm-root[data-pos] .alm-panel{left:0!important;right:0!important;bottom:0!important;margin:0!important;width:auto;max-width:none;
    max-height:92vh;max-height:92dvh;border-radius:22px 22px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}
  @keyframes alm-fade{from{opacity:0}to{opacity:1}}
  #alm-root .alm-chat{height:min(62vh,480px)}
}
@media (prefers-reduced-motion:reduce){#alm-root *{animation:none!important;transition:none!important}}

/* ==========================================================================
   wp-admin live preview: the stage has a transform, so position:fixed children are relative to it
   ========================================================================== */
.alm-stage{transform:translateZ(0);overflow:hidden}
.alm-stage #alm-root .alm-panel{max-height:calc(100% - 28px)}
.alm-stage #alm-root .alm-backdrop{display:none!important}
