#swenska-chat-root{
  --sw-text:#0f172a;
  --sw-muted:#5f6b7a;
  --sw-border:#d8dde3;
  --sw-panel:#ffffff;
  --sw-shadow:0 28px 90px rgba(0,0,0,.34);
  --sw-soft-shadow:0 10px 34px rgba(15,23,42,.14);
  --sw-radius:28px;
  --sw-header-1:#063f1b;
  --sw-header-2:#002b12;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
#swenska-chat-root{
  position:fixed!important;
  inset:0!important;
  z-index:2147483647!important;
  pointer-events:none;
  isolation:isolate;
}
#swenska-chat-root *{box-sizing:border-box}
#swenska-chat-root .sw-chat-fab{pointer-events:auto}
.sw-chat-fab{position:fixed;right:28px;bottom:28px;width:78px;height:78px;border:0;border-radius:50%;background:radial-gradient(circle at 28% 18%,#0f7833,#003916 72%);color:#fff;box-shadow:var(--sw-shadow);cursor:pointer;display:grid;place-items:center;transition:transform .2s ease;z-index:999998}
.sw-chat-fab:hover{transform:translateY(-3px) scale(1.03)}
.sw-chat-fab svg{width:35px;height:35px;fill:#fff}.sw-chat-fab-dot{position:absolute;right:9px;top:9px;width:18px;height:18px;background:#16e647;border:4px solid #073b19;border-radius:50%}#swenska-chat-root.sw-offline .sw-chat-fab-dot{background:#ff342f}.sw-unread{position:absolute;left:-4px;top:-4px;min-width:26px;height:26px;padding:0 8px;display:none;place-items:center;background:#ef4444;color:#fff;border-radius:999px;font-size:13px;font-weight:900}.sw-unread.is-visible{display:grid}
.sw-chat-window{position:fixed;right:28px;bottom:124px;width:min(560px,calc(100vw - 28px));height:min(760px,calc(100vh - 146px));background:var(--sw-panel);border-radius:var(--sw-radius);box-shadow:var(--sw-shadow);overflow:hidden;display:flex;flex-direction:column;transform-origin:bottom right;opacity:0;pointer-events:none;transform:translateY(18px) scale(.96);transition:opacity .22s ease,transform .22s ease;z-index:999999}
#swenska-chat-root.sw-offline .sw-chat-window{height:min(820px,calc(100vh - 146px))}.sw-chat-window.sw-is-open{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}
.sw-chat-header{min-height:145px;padding:26px 28px;display:flex;align-items:center;gap:20px;color:#fff;background:radial-gradient(circle at 74% 8%,rgba(120,255,150,.20),transparent 33%),radial-gradient(circle at 12% 0%,rgba(65,180,90,.24),transparent 38%),linear-gradient(138deg,var(--sw-header-1),var(--sw-header-2));border-bottom:1px solid rgba(255,255,255,.08)}
.sw-brand-logo{width:88px;height:88px;flex:0 0 auto;background:#fff;border-radius:50%;display:grid;place-items:center;box-shadow:0 8px 22px rgba(0,0,0,.28);overflow:hidden}.sw-brand-logo img{width:100%;height:100%;object-fit:cover}.sw-brand-text{flex:1;min-width:0}.sw-brand-text h2{margin:0 0 8px;font-size:28px;line-height:1.05;letter-spacing:.8px;color:#fff;font-weight:900;text-transform:uppercase;text-shadow:0 2px 2px rgba(0,0,0,.22)}.sw-status{margin:0 0 6px;color:#fff;font-size:17px;line-height:1.2}.sw-status span{display:inline-block;width:13px;height:13px;margin-right:9px;border-radius:50%;background:#11e43b;vertical-align:-1px}#swenska-chat-root.sw-offline .sw-status span{background:#ff312d}.sw-status b{font-weight:500}.sw-substatus{margin:0;font-size:16px;line-height:1.3;opacity:.96;color:#fff}.sw-header-actions{display:flex;align-items:center;gap:16px}.sw-header-btn{width:38px;height:38px;border:0;background:transparent;color:#fff;cursor:pointer;display:grid;place-items:center;padding:0}.sw-header-btn svg{display:block;width:31px;height:31px;stroke:currentColor;stroke-width:3;fill:none}.sw-menu-dots{width:8px;height:34px;position:relative;opacity:.96}.sw-menu-dots::before{content:"";position:absolute;left:0;top:4px;width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 12px 0 #fff,0 24px 0 #fff}
.sw-chat-body{display:none;flex:1;padding:31px 26px 16px;overflow-y:auto;background:#fff}.sw-chat-body.is-visible,.sw-chat-body.sw-is-visible-static{display:block}.sw-message-row{display:flex;gap:16px;margin-bottom:24px;align-items:flex-start}.sw-message-row.sw-user{justify-content:flex-end}.sw-avatar{width:64px;height:64px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;background:#eef7f1;color:#063f1b;font-weight:900;box-shadow:0 6px 18px rgba(15,23,42,.18);overflow:hidden}.sw-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.sw-bubble{max-width:365px;padding:18px 22px;border-radius:19px;font-size:18px;line-height:1.62;color:#0a0d12;box-shadow:var(--sw-soft-shadow);white-space:pre-line}.sw-bubble-agent{background:#fff;border:1px solid rgba(15,23,42,.08);border-top-left-radius:7px;position:relative}.sw-bubble-agent::before{content:"";position:absolute;left:-12px;top:26px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:13px solid #fff;filter:drop-shadow(-1px 0 0 rgba(15,23,42,.06))}.sw-bubble-user{background:linear-gradient(135deg,#e8fbdc,#d7f1cf);border-top-right-radius:7px;position:relative}.sw-bubble-user::after{content:"";position:absolute;right:-9px;bottom:0;border-left:12px solid #d7f1cf;border-top:12px solid transparent}.sw-time{margin:10px 0 0 8px;color:#6d737c;font-size:16px}.sw-user-time{text-align:right;margin-right:10px}.sw-sent{color:#9aa3ad;font-weight:900;margin-left:8px;white-space:nowrap;transition:color .18s ease}.sw-sent.is-read{color:#087b25}
.sw-chat-input{display:none;margin:10px 28px 22px;padding:10px 12px 10px 20px;min-height:70px;align-items:center;gap:12px;background:#fff;border-radius:22px;box-shadow:0 9px 32px rgba(15,23,42,.16);border:1px solid rgba(15,23,42,.06)}.sw-chat-input.is-visible{display:flex}.sw-attach-icon{width:38px;height:38px;color:#6b7280;display:grid;place-items:center;flex:0 0 auto}.sw-attach-icon svg{width:30px;height:30px;stroke:currentColor;stroke-width:2.2;fill:none}.sw-chat-input input{flex:1;border:0;outline:0;font:inherit;font-size:18px;color:#111827;background:transparent}.sw-chat-input input::placeholder{color:#7a828d}.sw-send-btn{width:58px;height:58px;border:0;border-radius:50%;background:radial-gradient(circle at 32% 20%,#0b7832,#004619 76%);color:#fff;cursor:pointer;display:grid;place-items:center;box-shadow:0 8px 18px rgba(0,0,0,.25)}.sw-send-btn svg{width:28px;height:28px;fill:#fff;transform:translateX(1px)}
.sw-start-form{padding:28px 26px 0;flex:1;overflow-y:auto}.sw-start-form.is-hidden{display:none}.sw-offline-agent{display:flex;gap:16px;align-items:flex-start;margin:0 0 24px}.sw-offline-agent .sw-bubble{max-width:390px}.sw-form-fields{display:grid;gap:13px;margin-top:20px}.sw-field{position:relative}.sw-field-icon{position:absolute;left:21px;top:50%;transform:translateY(-50%);width:28px;height:28px;color:#5c6978;display:grid;place-items:center;z-index:1}.sw-field-icon svg{width:28px;height:28px;stroke:currentColor;stroke-width:2.1;fill:none}.sw-field input,.sw-field textarea{width:100%;border:1px solid var(--sw-border);border-radius:15px;padding:18px 18px 18px 70px;font:inherit;font-size:17px;line-height:1.35;outline:none;color:#172033;background:#fff;box-shadow:inset 0 1px 1px rgba(15,23,42,.02)}.sw-field input::placeholder,.sw-field textarea::placeholder{color:#647184}.sw-field textarea{min-height:96px;resize:vertical;padding-top:19px}.sw-field.textarea .sw-field-icon{top:30px;transform:none}.sw-start-form button#swStartChatBtn{width:100%;margin-top:18px;border:0;border-radius:15px;padding:19px;font:inherit;font-size:19px;font-weight:900;color:#fff;background:linear-gradient(135deg,#004d20,#002d13);box-shadow:0 7px 20px rgba(0,59,23,.28);cursor:pointer}.sw-offline-help{display:flex;gap:12px;margin:18px 2px 0;align-items:flex-start;color:#1d2c43;font-size:14px;line-height:1.45}.sw-offline-help-icon{width:28px;height:28px;border:2px solid #516071;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;font-weight:800}.sw-urgent-box{display:flex;gap:15px;align-items:center;margin:20px 0 0;border:1px solid var(--sw-border);border-radius:13px;padding:15px 18px;color:#13243b;font-size:14px;line-height:1.25}.sw-urgent-box svg{width:31px;height:31px;stroke:#065321;stroke-width:1.8;fill:none;flex:0 0 auto}.sw-urgent-box strong{font-family:Georgia,"Times New Roman",serif;color:#073d18;letter-spacing:.4px}.sw-urgent-box a{color:#13243b;text-decoration:none;font-weight:800;margin-left:10px}.sw-rodo-consent{display:flex!important;align-items:flex-start;gap:10px;margin-top:13px!important;font-size:12px!important;font-weight:500!important;line-height:1.35;color:#4b5563}.sw-rodo-consent input{width:auto!important;margin-top:2px;flex:0 0 auto}.sw-rodo-consent span{display:block}.sw-rodo-consent a{color:#063f1b;font-weight:700}.sw-offline-thanks{display:none;flex:1;padding:35px 28px;text-align:center}.sw-offline-thanks.is-visible{display:block}.sw-offline-thanks h3{font-size:26px;margin:0 0 12px}.sw-offline-thanks p{font-size:17px;color:var(--sw-muted)}.sw-chat-footer{padding:0 24px 22px;text-align:center;font-size:13px;letter-spacing:.8px;color:#6b7280;text-transform:uppercase}.sw-chat-footer::before{content:"";display:block;height:1px;background:#e8ebef;margin:0 0 17px}.sw-chat-footer strong{color:#065321;margin-left:6px;font-weight:900}.sw-typing .sw-bubble{color:var(--sw-muted);font-weight:700}.sw-dots{display:inline-flex;gap:4px;margin-left:6px}.sw-dots span{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--sw-muted);animation:swlcTypingBounce 1s infinite ease-in-out}.sw-dots span:nth-child(2){animation-delay:.15s}.sw-dots span:nth-child(3){animation-delay:.3s}@keyframes swlcTypingBounce{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-5px);opacity:1}}
@media(max-width:600px){
  #swenska-chat-root{--sw-radius:0}
  .sw-chat-window{
    left:0;
    right:0;
    bottom:0;
    width:100%;
    max-width:100%;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0;
    overflow:hidden;
  }
  @supports not (height:100dvh){
    .sw-chat-window{height:100vh!important;max-height:100vh!important}
  }
  .sw-chat-fab{right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px))}
  .sw-chat-header{min-height:126px;padding:20px;padding-top:calc(20px + env(safe-area-inset-top,0px));flex-shrink:0}
  .sw-brand-logo{width:72px;height:72px}
  .sw-brand-text h2{font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sw-status,.sw-substatus{font-size:14px}
  .sw-header-actions{gap:8px;flex:0 0 auto}
  .sw-header-btn{width:34px;height:34px}
  .sw-menu-dots{width:7px;flex:0 0 auto}
  .sw-chat-body{padding:24px 18px 12px;min-height:0}
  .sw-bubble{font-size:16px;max-width:calc(100vw - 130px)}
  .sw-start-form{padding:24px 18px 0;min-height:0}
  .sw-chat-input{
    margin:8px 16px calc(14px + env(safe-area-inset-bottom,0px));
    padding:8px 10px 8px 14px;
    min-height:62px;
    gap:8px;
    flex-shrink:0;
    max-width:calc(100% - 32px);
  }
  .sw-chat-input input{min-width:0;font-size:16px}
  .sw-send-btn{width:50px;height:50px;flex:0 0 50px}
  .sw-send-btn svg{width:24px;height:24px}
  .sw-attach-icon{width:34px;height:34px;flex:0 0 34px}
  .sw-attach-icon svg{width:26px;height:26px}
  .sw-selected-files{display:none}
  .sw-chat-footer{padding:0 18px calc(14px + env(safe-area-inset-bottom,0px));flex-shrink:0}
  .sw-avatar{width:54px;height:54px}
  .sw-offline-agent .sw-bubble{max-width:calc(100vw - 115px)}
}

/* Desktop size adjustment: widget reduced by 20% while keeping the PSD proportions. */
@media (min-width:601px){
  .sw-chat-fab{
    transform:scale(.8);
    transform-origin:bottom right;
  }
  .sw-chat-fab:hover{
    transform:translateY(-3px) scale(.824);
  }
  .sw-chat-window{
    bottom:108px;
    transform:translateY(18px) scale(.768);
    transform-origin:bottom right;
  }
  .sw-chat-window.sw-is-open{
    transform:translateY(0) scale(.8);
  }
}

/* Attachments */
#swenska-chat-root .sw-attach-icon{cursor:pointer;border-radius:999px;position:relative}
#swenska-chat-root .sw-attach-icon input{position:absolute;inline-size:1px;block-size:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
#swenska-chat-root .sw-selected-files{max-width:130px;font-size:11px;color:#647184;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#swenska-chat-root .sw-attachments{display:flex;flex-direction:column;gap:6px;margin-top:10px;white-space:normal}
#swenska-chat-root .sw-attachment{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:7px 9px;border-radius:10px;background:rgba(255,255,255,.72);border:1px solid rgba(15,23,42,.10);color:#063f1b;text-decoration:none;font-size:13px;font-weight:800;word-break:break-word}
#swenska-chat-root .sw-file-field{display:block;border:1px dashed var(--sw-border);border-radius:15px;padding:13px 15px;background:#fbfcfd;color:#172033;cursor:pointer}
#swenska-chat-root .sw-file-field span{display:block;font-weight:800;font-size:15px;margin-bottom:5px;color:#073d18}
#swenska-chat-root .sw-file-field small{display:block;color:#647184;font-size:12px;line-height:1.35}
#swenska-chat-root .sw-file-field input{display:block;width:100%;margin-top:8px;font-size:12px;color:#172033}
#swenska-chat-root .sw-rodo-consent{background:#f8fafc;border:1px solid #d8dde3;border-radius:12px;padding:10px 12px}
#swenska-chat-root .sw-rodo-consent input{accent-color:#0b7832}


/* Mobile Safari layout fixes */
#swenska-chat-root .sw-chat-window,
#swenska-chat-root .sw-chat-input{
  -webkit-tap-highlight-color:transparent;
}
#swenska-chat-root .sw-chat-input input{
  min-width:0;
}
#swenska-chat-root .sw-send-btn{
  flex-shrink:0;
}


/* Final client feedback fixes: compact offline, clearer footer, inline errors, no unused dots */
#swenska-chat-root .sw-menu-dots{display:none!important}
#swenska-chat-root.sw-offline .sw-chat-window{height:min(900px,calc(100dvh - 96px));width:min(590px,calc(100vw - 28px))}
#swenska-chat-root.sw-offline .sw-chat-header{min-height:126px;padding:22px 26px}
#swenska-chat-root.sw-offline .sw-brand-logo{width:78px;height:78px}
#swenska-chat-root.sw-offline .sw-brand-text h2{font-size:25px;margin-bottom:5px}
#swenska-chat-root.sw-offline .sw-status{font-size:16px;margin-bottom:4px}
#swenska-chat-root.sw-offline .sw-substatus{font-size:14px}
#swenska-chat-root.sw-offline .sw-start-form{padding:18px 22px 0}
#swenska-chat-root.sw-offline .sw-offline-agent{gap:12px;margin-bottom:14px}
#swenska-chat-root.sw-offline .sw-avatar{width:70px;height:70px}
#swenska-chat-root.sw-offline .sw-bubble{font-size:15px;line-height:1.42;padding:13px 16px;border-radius:15px;max-width:410px}
#swenska-chat-root.sw-offline .sw-form-fields{gap:9px;margin-top:12px}
#swenska-chat-root.sw-offline .sw-field-icon{left:17px;width:23px;height:23px}
#swenska-chat-root.sw-offline .sw-field-icon svg{width:23px;height:23px}
#swenska-chat-root.sw-offline .sw-field input,
#swenska-chat-root.sw-offline .sw-field textarea{border-radius:13px;padding:13px 15px 13px 56px;font-size:15px;line-height:1.25}
#swenska-chat-root.sw-offline .sw-field textarea{min-height:64px;padding-top:13px}
#swenska-chat-root.sw-offline .sw-field.textarea .sw-field-icon{top:17px}
#swenska-chat-root.sw-offline .sw-file-field{padding:10px 13px;border-radius:12px}
#swenska-chat-root.sw-offline .sw-file-field span{font-size:14px;margin:0}
#swenska-chat-root.sw-offline .sw-file-field small{display:none!important}
#swenska-chat-root.sw-offline .sw-file-field input{margin-top:5px;font-size:11px}
#swenska-chat-root.sw-offline .sw-rodo-consent{margin-top:9px!important;padding:8px 10px;font-size:11px!important;line-height:1.25;border-radius:10px}
#swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{margin-top:10px;padding:14px;font-size:16px;border-radius:13px}
#swenska-chat-root.sw-offline .sw-offline-help{margin-top:10px;font-size:12px;line-height:1.3}
#swenska-chat-root.sw-offline .sw-offline-help-icon{width:22px;height:22px;font-size:12px}
#swenska-chat-root.sw-offline .sw-urgent-box{margin-top:10px;padding:10px 12px;gap:9px;font-size:12px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#swenska-chat-root.sw-offline .sw-urgent-box svg{width:24px;height:24px}
#swenska-chat-root.sw-offline .sw-urgent-box a{margin-left:6px;white-space:nowrap}
#swenska-chat-root.sw-offline .sw-chat-footer{padding:0 20px 14px;font-size:12px;line-height:1.1;background:#fff;position:relative;z-index:2}
#swenska-chat-root.sw-offline .sw-chat-footer::before{margin-bottom:10px}
#swenska-chat-root .sw-inline-error{display:none;margin:7px 0 0;padding:8px 10px;border-radius:10px;background:#fff1f2;border:1px solid #fecdd3;color:#991b1b;font-size:12px;line-height:1.25;font-weight:700}
#swenska-chat-root .sw-inline-error.is-visible{display:block}
#swenska-chat-root .sw-back-btn{margin-top:18px;border:0;border-radius:14px;padding:13px 18px;background:linear-gradient(135deg,#004d20,#002d13);color:#fff;font-weight:900;font:inherit;cursor:pointer}
#swenska-chat-root .sw-offline-thanks{display:none;align-content:center;justify-content:center;flex-direction:column}
#swenska-chat-root .sw-offline-thanks.is-visible{display:flex}

@media(max-width:600px){
  #swenska-chat-root.sw-offline .sw-chat-window{height:100dvh!important;max-height:100dvh!important;width:100%;max-width:100%}
  #swenska-chat-root.sw-offline .sw-chat-header{min-height:112px;padding:16px 18px;padding-top:calc(16px + env(safe-area-inset-top,0px))}
  #swenska-chat-root.sw-offline .sw-brand-logo{width:62px;height:62px}
  #swenska-chat-root.sw-offline .sw-brand-text h2{font-size:20px}
  #swenska-chat-root.sw-offline .sw-status{font-size:14px}
  #swenska-chat-root.sw-offline .sw-substatus{font-size:13px}
  #swenska-chat-root.sw-offline .sw-start-form{padding:14px 16px 0}
  #swenska-chat-root.sw-offline .sw-offline-agent{margin-bottom:10px}
  #swenska-chat-root.sw-offline .sw-avatar{width:48px;height:48px}
  #swenska-chat-root.sw-offline .sw-bubble{font-size:13px;line-height:1.32;padding:10px 12px;max-width:calc(100vw - 90px)}
  #swenska-chat-root.sw-offline .sw-form-fields{gap:7px;margin-top:8px}
  #swenska-chat-root.sw-offline .sw-field input,
  #swenska-chat-root.sw-offline .sw-field textarea{padding-top:11px;padding-bottom:11px;font-size:14px}
  #swenska-chat-root.sw-offline .sw-field textarea{min-height:58px}
  #swenska-chat-root.sw-offline .sw-urgent-box{font-size:10.5px;padding:8px 9px;gap:7px}
  #swenska-chat-root.sw-offline .sw-chat-footer{padding:0 14px calc(10px + env(safe-area-inset-bottom,0px));font-size:10.5px}
}


/* v1.2.1: offline no-scroll improvements and duplicate-send UX */
#swenska-chat-root.sw-offline .sw-chat-window{
  height:min(1040px,calc(125dvh - 120px));
  width:min(610px,calc(100vw - 28px));
}
#swenska-chat-root.sw-offline .sw-start-form{
  padding:14px 22px 0;
}
#swenska-chat-root.sw-offline .sw-offline-agent{
  margin-bottom:10px;
}
#swenska-chat-root.sw-offline .sw-bubble{
  font-size:14px;
  line-height:1.32;
  padding:11px 14px;
}
#swenska-chat-root.sw-offline .sw-form-fields{
  gap:7px;
  margin-top:9px;
}
#swenska-chat-root.sw-offline .sw-field input,
#swenska-chat-root.sw-offline .sw-field textarea{
  padding-top:11px;
  padding-bottom:11px;
  font-size:14px;
}
#swenska-chat-root.sw-offline .sw-field textarea{
  min-height:52px;
}
#swenska-chat-root.sw-offline .sw-file-field{
  padding:8px 12px;
}
#swenska-chat-root.sw-offline .sw-rodo-consent{
  margin-top:7px!important;
  padding:7px 9px;
  font-size:10.5px!important;
}
#swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{
  margin-top:8px;
  padding:12px;
}
#swenska-chat-root.sw-offline .sw-offline-help,
#swenska-chat-root.sw-offline .sw-urgent-box{
  margin-top:8px;
}
#swenska-chat-root button:disabled{
  opacity:.62;
  cursor:wait!important;
}
@media(max-width:600px){
  #swenska-chat-root.sw-offline .sw-chat-header{min-height:98px;padding:12px 15px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
  #swenska-chat-root.sw-offline .sw-brand-logo{width:52px;height:52px}
  #swenska-chat-root.sw-offline .sw-brand-text h2{font-size:18px;margin-bottom:3px}
  #swenska-chat-root.sw-offline .sw-status{font-size:13px;margin-bottom:2px}
  #swenska-chat-root.sw-offline .sw-substatus{display:none}
  #swenska-chat-root.sw-offline .sw-start-form{padding:10px 14px 0}
  #swenska-chat-root.sw-offline .sw-offline-agent{gap:9px;margin-bottom:7px}
  #swenska-chat-root.sw-offline .sw-avatar{width:42px;height:42px}
  #swenska-chat-root.sw-offline .sw-bubble{font-size:12px;line-height:1.25;padding:8px 10px;max-width:calc(100vw - 76px)}
  #swenska-chat-root.sw-offline .sw-form-fields{gap:5px;margin-top:6px}
  #swenska-chat-root.sw-offline .sw-field-icon{left:13px;width:18px;height:18px}
  #swenska-chat-root.sw-offline .sw-field-icon svg{width:18px;height:18px}
  #swenska-chat-root.sw-offline .sw-field input,
  #swenska-chat-root.sw-offline .sw-field textarea{padding:9px 10px 9px 40px;font-size:13px;border-radius:10px}
  #swenska-chat-root.sw-offline .sw-field textarea{min-height:44px}
  #swenska-chat-root.sw-offline .sw-file-field{padding:7px 10px;border-radius:10px}
  #swenska-chat-root.sw-offline .sw-file-field span{font-size:12px}
  #swenska-chat-root.sw-offline .sw-file-field input{margin-top:4px;font-size:10px}
  #swenska-chat-root.sw-offline .sw-rodo-consent{margin-top:5px!important;padding:6px 8px;font-size:9.8px!important;line-height:1.18}
  #swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{margin-top:6px;padding:10px;font-size:14px;border-radius:11px}
  #swenska-chat-root.sw-offline .sw-offline-help{margin-top:6px;font-size:10.5px;line-height:1.18}
  #swenska-chat-root.sw-offline .sw-offline-help-icon{width:18px;height:18px;font-size:10px}
  #swenska-chat-root.sw-offline .sw-urgent-box{margin-top:6px;font-size:9.5px;padding:6px 7px;gap:5px}
  #swenska-chat-root.sw-offline .sw-urgent-box svg{width:18px;height:18px}
  #swenska-chat-root.sw-offline .sw-chat-footer{padding:0 12px calc(8px + env(safe-area-inset-bottom,0px));font-size:9.6px}
}


/* Shortcode / custom page buttons opening the chat */
.swlc-shortcode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--sw-green-dark, #0f3d1e);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 61, 30, .22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.swlc-shortcode-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 61, 30, .28);
  opacity: .96;
}
.swlc-shortcode-button:active {
  transform: translateY(0);
}


/* v1.2.5 final client readability and media alignment */
#swenska-chat-root .sw-brand-logo img,
#swenska-chat-root .sw-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
}
#swenska-chat-root.sw-offline .sw-chat-window{
  height:min(920px,calc(100dvh - 72px));
  width:min(610px,calc(100vw - 28px));
}
#swenska-chat-root.sw-offline .sw-start-form{
  padding:18px 22px 0;
}
#swenska-chat-root.sw-offline .sw-bubble{
  font-size:15px;
  line-height:1.38;
  padding:12px 15px;
}
#swenska-chat-root.sw-offline .sw-form-fields{
  gap:8px;
  margin-top:10px;
}
#swenska-chat-root.sw-offline .sw-field input,
#swenska-chat-root.sw-offline .sw-field textarea{
  font-size:15px;
  line-height:1.28;
  padding-top:12px;
  padding-bottom:12px;
}
#swenska-chat-root.sw-offline .sw-field textarea{
  min-height:58px;
}
#swenska-chat-root.sw-offline .sw-file-field span{
  font-size:13px;
}
#swenska-chat-root.sw-offline .sw-rodo-consent{
  font-size:11.5px!important;
  line-height:1.28;
}
#swenska-chat-root.sw-offline .sw-offline-help{
  font-size:12.5px;
}
#swenska-chat-root.sw-offline .sw-urgent-box{
  font-size:12px;
}
@media(max-width:600px){
  #swenska-chat-root.sw-offline .sw-chat-window{
    height:100dvh!important;
    max-height:100dvh!important;
    width:100%!important;
    max-width:100%!important;
  }
  #swenska-chat-root.sw-offline .sw-chat-header{
    min-height:102px;
    padding:13px 16px;
    padding-top:calc(13px + env(safe-area-inset-top,0px));
  }
  #swenska-chat-root.sw-offline .sw-brand-logo{width:56px;height:56px}
  #swenska-chat-root.sw-offline .sw-brand-text h2{font-size:19px;margin-bottom:3px}
  #swenska-chat-root.sw-offline .sw-status{font-size:13.5px;margin-bottom:2px}
  #swenska-chat-root.sw-offline .sw-start-form{padding:11px 14px 0}
  #swenska-chat-root.sw-offline .sw-offline-agent{gap:9px;margin-bottom:8px}
  #swenska-chat-root.sw-offline .sw-avatar{width:44px;height:44px}
  #swenska-chat-root.sw-offline .sw-bubble{font-size:13px;line-height:1.28;padding:8px 10px;max-width:calc(100vw - 78px)}
  #swenska-chat-root.sw-offline .sw-form-fields{gap:5px;margin-top:6px}
  #swenska-chat-root.sw-offline .sw-field-icon{left:13px;width:18px;height:18px}
  #swenska-chat-root.sw-offline .sw-field input,
  #swenska-chat-root.sw-offline .sw-field textarea{padding:9px 10px 9px 40px;font-size:13.5px;border-radius:10px}
  #swenska-chat-root.sw-offline .sw-field textarea{min-height:48px}
  #swenska-chat-root.sw-offline .sw-file-field{padding:7px 10px;border-radius:10px}
  #swenska-chat-root.sw-offline .sw-file-field span{font-size:12.5px}
  #swenska-chat-root.sw-offline .sw-rodo-consent{margin-top:5px!important;padding:6px 8px;font-size:10.5px!important;line-height:1.22}
  #swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{margin-top:6px;padding:10px;font-size:14.5px;border-radius:11px}
  #swenska-chat-root.sw-offline .sw-offline-help{margin-top:6px;font-size:11px;line-height:1.22}
  #swenska-chat-root.sw-offline .sw-urgent-box{margin-top:6px;font-size:10px;padding:6px 7px;gap:5px}
  #swenska-chat-root.sw-offline .sw-chat-footer{padding:0 12px calc(8px + env(safe-area-inset-bottom,0px));font-size:10px}
}


/* v1.2.6: client feedback - cleaner offline form, readable text, photo launcher */
#swenska-chat-root .sw-chat-fab{
  width:94px;
  height:94px;
  padding:0;
  overflow:visible;
  background:#fff;
  border:5px solid #fff;
  box-shadow:0 18px 42px rgba(15,23,42,.28);
}
#swenska-chat-root .sw-chat-fab-photo{
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  overflow:hidden;
  background:#eef2f7;
}
#swenska-chat-root .sw-chat-fab-photo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center center;
}
#swenska-chat-root .sw-chat-fab-dot{
  right:2px;
  top:auto;
  bottom:4px;
  width:24px;
  height:24px;
  border:4px solid #fff;
  background:var(--sw-green-accent);
  z-index:2;
  box-shadow:0 2px 10px rgba(15,23,42,.22);
}
#swenska-chat-root.sw-offline .sw-chat-fab-dot{
  background:var(--sw-offline-color);
}
#swenska-chat-root .sw-brand-logo{
  padding:8px;
}
#swenska-chat-root .sw-brand-logo img{
  object-fit:contain;
  object-position:center center;
  border-radius:50%;
}
#swenska-chat-root.sw-offline .sw-chat-window{
  height:min(920px,calc(100dvh - 72px));
  width:min(610px,calc(100vw - 28px));
}
#swenska-chat-root.sw-offline .sw-chat-header{
  min-height:124px;
  padding:22px 26px;
}
#swenska-chat-root.sw-offline .sw-brand-logo{
  width:80px;
  height:80px;
}
#swenska-chat-root.sw-offline .sw-brand-text h2{
  font-size:26px;
  line-height:1.08;
  margin-bottom:6px;
}
#swenska-chat-root.sw-offline .sw-status{
  font-size:17px;
}
#swenska-chat-root.sw-offline .sw-start-form{
  padding:20px 24px 0;
}
#swenska-chat-root.sw-offline .sw-offline-agent{
  gap:14px;
  margin-bottom:16px;
}
#swenska-chat-root.sw-offline .sw-avatar{
  width:78px;
  height:78px;
}
#swenska-chat-root.sw-offline .sw-bubble{
  max-width:410px;
  font-size:16px;
  line-height:1.45;
  padding:13px 16px;
}
#swenska-chat-root.sw-offline .sw-form-fields{
  gap:10px;
  margin-top:12px;
}
#swenska-chat-root.sw-offline .sw-field input,
#swenska-chat-root.sw-offline .sw-field textarea{
  font-size:16px;
  line-height:1.32;
  padding-top:13px;
  padding-bottom:13px;
}
#swenska-chat-root.sw-offline .sw-field textarea{
  min-height:72px;
}
#swenska-chat-root.sw-offline .sw-rodo-consent{
  font-size:12px!important;
  line-height:1.32;
  margin-top:10px!important;
}
#swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{
  margin-top:11px;
  padding:15px;
  font-size:17px;
}
#swenska-chat-root.sw-offline .sw-offline-help,
#swenska-chat-root.sw-offline .sw-file-field{
  display:none!important;
}
#swenska-chat-root.sw-offline .sw-urgent-box{
  margin-top:12px;
  font-size:13px;
  line-height:1.2;
}
#swenska-chat-root.sw-offline .sw-chat-footer{
  padding-bottom:14px;
}
@media(max-width:600px){
  #swenska-chat-root .sw-chat-fab{
    width:82px;
    height:82px;
    right:18px;
    bottom:calc(18px + env(safe-area-inset-bottom,0px));
  }
  #swenska-chat-root .sw-chat-fab-dot{
    width:21px;
    height:21px;
    bottom:2px;
  }
  #swenska-chat-root.sw-offline .sw-chat-header{
    min-height:104px;
    padding:14px 16px;
    padding-top:calc(14px + env(safe-area-inset-top,0px));
  }
  #swenska-chat-root.sw-offline .sw-brand-logo{
    width:58px;
    height:58px;
    padding:6px;
  }
  #swenska-chat-root.sw-offline .sw-brand-text h2{
    font-size:19px;
  }
  #swenska-chat-root.sw-offline .sw-status{
    font-size:13.5px;
  }
  #swenska-chat-root.sw-offline .sw-start-form{
    padding:12px 14px 0;
  }
  #swenska-chat-root.sw-offline .sw-avatar{
    width:50px;
    height:50px;
  }
  #swenska-chat-root.sw-offline .sw-bubble{
    max-width:calc(100vw - 86px);
    font-size:13.5px;
    line-height:1.3;
    padding:9px 11px;
  }
  #swenska-chat-root.sw-offline .sw-field input,
  #swenska-chat-root.sw-offline .sw-field textarea{
    font-size:14px;
  }
  #swenska-chat-root.sw-offline .sw-field textarea{
    min-height:50px;
  }
  #swenska-chat-root.sw-offline .sw-rodo-consent{
    font-size:10.5px!important;
    line-height:1.22;
  }
  #swenska-chat-root.sw-offline .sw-start-form button#swStartChatBtn{
    font-size:14.5px;
    padding:10px;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box{
    font-size:10px;
    margin-top:7px;
  }
}


/* v1.2.7: long message wrapping and readable thank-you title */
#swenska-chat-root .sw-chat-body{
  overflow-x:hidden;
}
#swenska-chat-root .sw-message-row,
#swenska-chat-root .sw-message-row > div{
  max-width:100%;
  min-width:0;
}
#swenska-chat-root .sw-message-row.sw-user > div{
  max-width:min(78%,430px);
}
#swenska-chat-root .sw-message-row.sw-agent > div:last-child{
  max-width:min(78%,430px);
}
#swenska-chat-root .sw-bubble{
  max-width:100%;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
#swenska-chat-root .sw-bubble-user{
  background:var(--sw-bubble-user,#e5f4dc);
}
#swenska-chat-root .sw-sent{
  display:inline-block;
}
#swenska-chat-root .sw-offline-thanks h3{
  color:#0a0d12!important;
}
@media(max-width:600px){
  #swenska-chat-root .sw-message-row.sw-user > div,
  #swenska-chat-root .sw-message-row.sw-agent > div:last-child{
    max-width:calc(100vw - 110px);
  }
}


/* v1.2.8: readability, logo alignment and consultant photo crop */
@media (min-width:601px){
  #swenska-chat-root .sw-chat-window{width:min(620px,calc(100vw - 28px));height:min(790px,calc(100vh - 36px));bottom:18px}
  #swenska-chat-root.sw-offline .sw-chat-window{height:min(840px,calc(100vh - 36px))}
  #swenska-chat-root .sw-chat-header{min-height:142px;padding:22px 28px}
  #swenska-chat-root .sw-brand-logo{transform:translateY(-4px)}
  #swenska-chat-root .sw-brand-text h2{font-size:30px}
  #swenska-chat-root .sw-status{font-size:18px}
  #swenska-chat-root .sw-substatus{font-size:17px}
  #swenska-chat-root .sw-bubble{font-size:19px;line-height:1.5}
  #swenska-chat-root .sw-field input,#swenska-chat-root .sw-field textarea{font-size:18px}
}
#swenska-chat-root .sw-avatar img{transform:scale(1.28) translateX(-6%);transform-origin:center;object-position:42% 50%}

@media (min-width:601px){
  #swenska-chat-root .sw-chat-window.sw-is-open{transform:translateY(0) scale(.9)}
  #swenska-chat-root .sw-bubble{font-size:19px!important;line-height:1.5!important}
}

/* v1.3.0: align header logo with text and close button */
#swenska-chat-root .sw-brand-logo{transform:none!important}

/* v1.3.1: optical centering of chat-only images */
#swenska-chat-root .sw-brand-logo img{
  width:88%;
  height:88%;
  object-fit:contain;
  object-position:center;
  transform:translateY(-4%);
}
#swenska-chat-root .sw-avatar img{
  transform:scale(1.5) translateX(-23%);
  transform-origin:center;
  object-position:center;
}

/* v1.3.2: consistent circular consultant crop in launcher and chat */
#swenska-chat-root .sw-avatar img,
#swenska-chat-root .sw-chat-fab-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  border-radius:50%;
  transform:scale(1.7) translateX(-20%);
  transform-origin:center;
}

/* v1.3.3: 120% consultant crop with centered face */
#swenska-chat-root .sw-avatar img,
#swenska-chat-root .sw-chat-fab-photo img{
  transform:scale(1.2) translateX(-27%);
  transform-origin:center;
}

/* v1.3.4: complete photos without filler and tighter message spacing */
#swenska-chat-root .sw-avatar,
#swenska-chat-root .sw-chat-fab-photo{
  background:transparent;
}
#swenska-chat-root .sw-avatar img,
#swenska-chat-root .sw-chat-fab-photo img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border-radius:50%;
  transform:none;
}
#swenska-chat-root .sw-offline-agent .sw-bubble{
  line-height:1.32!important;
}

/* v1.3.6: prevent newline plus BR from doubling message gaps */
#swenska-chat-root .sw-offline-agent .sw-bubble{
  white-space:normal!important;
  line-height:1.32!important;
}

/* v1.3.7: collapse consecutive manual breaks in offline welcome */
#swenska-chat-root .sw-offline-agent .sw-bubble br + br{display:none}

/* v1.3.8: remove gray halos from consultant photos */
#swenska-chat-root .sw-chat-fab,
#swenska-chat-root .sw-chat-fab-photo,
#swenska-chat-root .sw-avatar{
  box-shadow:none!important;
}

/* v1.3.9: use the free vertical space before enabling inner scrolling. */
@media (min-width:601px){
  #swenska-chat-root .sw-chat-window{
    bottom:18px;
    height:min(877.778px,calc(111.111dvh - 40px));
    max-height:none;
  }
  #swenska-chat-root.sw-offline .sw-chat-window{
    height:min(933.333px,calc(111.111dvh - 40px));
  }
  @supports not (height:100dvh){
    #swenska-chat-root .sw-chat-window{
      height:min(877.778px,calc(111.111vh - 40px));
    }
    #swenska-chat-root.sw-offline .sw-chat-window{
      height:min(933.333px,calc(111.111vh - 40px));
    }
  }
}

#swenska-chat-root .sw-chat-body,
#swenska-chat-root .sw-start-form{
  min-height:0;
}

#swenska-chat-root .sw-rodo-consent input{
  outline:2px solid transparent;
  outline-offset:1px;
  transition:outline-color .15s ease;
}
#swenska-chat-root .sw-rodo-consent input.is-invalid,
#swenska-chat-root .sw-rodo-consent.is-invalid input{
  outline-color:#991b1b;
}
#swenska-chat-root .sw-rodo-consent a{
  text-decoration:underline;
  text-underline-offset:2px;
}
#swenska-chat-root .sw-rodo-consent a:focus-visible{
  border-radius:2px;
  outline:2px solid #991b1b;
  outline-offset:2px;
}

/* v1.3.11: a narrow desktop viewport keeps the compact mobile content,
   but restores an inset card instead of the phone-style full screen shell. */
@media (max-width:600px) and (hover:hover) and (pointer:fine){
  #swenska-chat-root{
    --sw-radius:28px;
  }
  #swenska-chat-root .sw-chat-window,
  #swenska-chat-root.sw-offline .sw-chat-window{
    left:auto!important;
    right:28px!important;
    bottom:18px!important;
    width:min(620px,calc(100vw - 28px))!important;
    max-width:none!important;
    height:min(877.778px,calc(111.111dvh - 40px))!important;
    max-height:none!important;
    border-radius:var(--sw-radius)!important;
    transform-origin:bottom right;
  }
  #swenska-chat-root.sw-offline .sw-chat-window{
    height:min(933.333px,calc(111.111dvh - 40px))!important;
  }
  #swenska-chat-root .sw-chat-window.sw-is-open{
    transform:translateY(0) scale(.9)!important;
  }
  @supports not (height:100dvh){
    #swenska-chat-root .sw-chat-window,
    #swenska-chat-root.sw-offline .sw-chat-window{
      height:min(877.778px,calc(111.111vh - 40px))!important;
    }
    #swenska-chat-root.sw-offline .sw-chat-window{
      height:min(933.333px,calc(111.111vh - 40px))!important;
    }
  }
}

/* v1.3.13: keep the full operational-duty phone number visible on small phones. */
@media(max-width:600px){
  #swenska-chat-root.sw-offline .sw-urgent-box{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    align-items:flex-start;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box span{
    min-width:0;
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:2px 6px;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box strong{
    white-space:normal;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box a{
    margin-left:0;
    white-space:nowrap;
    flex:0 0 auto;
  }
}

/* v1.3.14: keep the full mobile chat inside the iOS visual viewport when the keyboard opens. */
@media(max-width:600px){
  #swenska-chat-root .sw-chat-window,
  #swenska-chat-root.sw-online .sw-chat-window,
  #swenska-chat-root.sw-offline .sw-chat-window{
    top:var(--swlc-visual-top,0px)!important;
    bottom:auto!important;
    height:var(--swlc-visual-height,100dvh)!important;
    max-height:var(--swlc-visual-height,100dvh)!important;
    overscroll-behavior:contain;
  }
  @supports not (height:100dvh){
    #swenska-chat-root .sw-chat-window,
    #swenska-chat-root.sw-online .sw-chat-window,
    #swenska-chat-root.sw-offline .sw-chat-window{
      height:var(--swlc-visual-height,100vh)!important;
      max-height:var(--swlc-visual-height,100vh)!important;
    }
  }
}

/* v1.3.15 review: client mobile layout and privacy-footer proposal. */
#swenska-chat-root .sw-offline-composer{display:contents}
#swenska-chat-root .sw-offline-attach{display:none}
#swenska-chat-root .sw-submit-icon{display:none}
#swenska-chat-root .sw-chat-footer{
  text-transform:none;
}
#swenska-chat-root .sw-chat-footer::before{display:none}
#swenska-chat-root .sw-privacy-link{
  display:block;
  margin:0 0 13px;
  color:#065321;
  font-size:13px;
  letter-spacing:0;
  text-decoration:none;
}
#swenska-chat-root .sw-privacy-link:hover,
#swenska-chat-root .sw-privacy-link:focus-visible{text-decoration:underline}
#swenska-chat-root .sw-powered-by{
  display:block;
  padding-top:16px;
  border-top:1px solid #e8ebef;
  text-transform:uppercase;
}

@media(max-width:600px){
  #swenska-chat-root .sw-chat-window,
  #swenska-chat-root.sw-online .sw-chat-window,
  #swenska-chat-root.sw-offline .sw-chat-window{
    display:flex;
    flex-direction:column;
  }

  /* Compact header shared by ONLINE and OFFLINE. */
  #swenska-chat-root .sw-chat-header,
  #swenska-chat-root.sw-online .sw-chat-header,
  #swenska-chat-root.sw-offline .sw-chat-header{
    min-height:82px;
    height:auto;
    padding:10px 14px;
    padding-top:calc(10px + env(safe-area-inset-top,0px));
    gap:11px;
  }
  #swenska-chat-root .sw-brand-logo,
  #swenska-chat-root.sw-offline .sw-brand-logo{
    width:52px;
    height:52px;
    padding:5px;
  }
  #swenska-chat-root .sw-brand-text h2,
  #swenska-chat-root.sw-offline .sw-brand-text h2{
    margin:0 0 2px;
    font-size:20px;
    line-height:1.05;
    letter-spacing:.45px;
  }
  #swenska-chat-root .sw-status,
  #swenska-chat-root.sw-offline .sw-status{
    margin:0;
    font-size:14px;
    line-height:1.15;
  }
  #swenska-chat-root .sw-status span{
    width:11px;
    height:11px;
    margin-right:7px;
  }
  #swenska-chat-root .sw-substatus{display:none}
  #swenska-chat-root .sw-header-btn{
    width:31px;
    height:31px;
  }
  #swenska-chat-root .sw-header-btn svg{
    width:27px;
    height:27px;
  }

  /* Denser conversation: timestamp belongs visually to its bubble. */
  #swenska-chat-root .sw-chat-body{
    padding:12px 14px 4px;
    min-height:0;
    overscroll-behavior:contain;
  }
  #swenska-chat-root .sw-message-row{
    gap:9px;
    margin-bottom:12px;
  }
  #swenska-chat-root .sw-avatar{
    width:46px;
    height:46px;
  }
  #swenska-chat-root .sw-bubble{
    padding:10px 12px;
    border-radius:16px;
    font-size:15px;
    line-height:1.35;
  }
  #swenska-chat-root .sw-time{
    margin:3px 0 0 5px;
    font-size:12px;
    line-height:1.15;
  }
  #swenska-chat-root .sw-user-time{margin-right:5px}

  /* iOS does not zoom form controls whose text is at least 16px. */
  #swenska-chat-root input,
  #swenska-chat-root textarea,
  #swenska-chat-root select{
    font-size:16px!important;
  }
  #swenska-chat-root .sw-chat-input{
    margin:6px 14px 8px;
    min-height:58px;
    padding:6px 8px 6px 12px;
    border-radius:20px;
  }
  #swenska-chat-root .sw-send-btn{
    width:48px;
    height:48px;
    flex-basis:48px;
  }

  /* Mobile OFFLINE keeps the compact composer and exposes contact fields. */
  #swenska-chat-root.sw-offline .sw-start-form{
    display:flex;
    flex:1;
    min-height:0;
    flex-direction:column;
    overflow:hidden;
    padding:10px 14px 0;
  }
  #swenska-chat-root.sw-offline .sw-offline-agent{
    gap:9px;
    margin:0 0 10px;
  }
  #swenska-chat-root.sw-offline .sw-offline-agent .sw-avatar{
    width:46px;
    height:46px;
  }
  #swenska-chat-root.sw-offline .sw-offline-agent .sw-bubble{
    max-width:calc(100vw - 82px);
    padding:9px 11px;
    font-size:14px;
    line-height:1.3!important;
  }
  #swenska-chat-root.sw-offline .sw-form-fields{
    display:flex;
    flex:1;
    min-height:0;
    flex-direction:column;
    gap:6px;
    margin:0;
  }
  #swenska-chat-root.sw-offline .sw-contact-field{
    display:block;
    flex:0 0 auto;
  }
  #swenska-chat-root.sw-offline .sw-contact-field:first-child{display:none}
  #swenska-chat-root.sw-offline .sw-contact-field:nth-child(2){margin-top:auto}
  #swenska-chat-root.sw-offline .sw-contact-field input{
    min-height:44px;
    padding:9px 10px 9px 40px;
    border-radius:12px;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer{
    display:flex;
    align-items:center;
    gap:7px;
    width:100%;
    min-height:58px;
    margin-top:0;
    padding:6px 8px 6px 10px;
    border:1px solid rgba(15,23,42,.06);
    border-radius:20px;
    background:#fff;
    box-shadow:0 9px 32px rgba(15,23,42,.16);
  }
  #swenska-chat-root.sw-offline .sw-offline-attach{
    display:grid;
    width:34px;
    height:34px;
    flex:0 0 34px;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer .sw-field{
    flex:1;
    min-width:0;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer .sw-field-icon{display:none}
  #swenska-chat-root.sw-offline .sw-offline-composer textarea{
    display:block;
    width:100%;
    min-height:24px;
    max-height:66px;
    padding:2px 0;
    border:0;
    border-radius:0;
    resize:none;
    overflow-y:auto;
    line-height:1.35;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer button#swStartChatBtn{
    display:grid;
    place-items:center;
    width:48px;
    height:48px;
    flex:0 0 48px;
    margin:0;
    padding:0;
    border-radius:50%;
  }
  #swenska-chat-root.sw-offline .sw-submit-label{display:none}
  #swenska-chat-root.sw-offline .sw-submit-icon{
    display:block;
    width:24px;
    height:24px;
    fill:#fff;
    transform:translateX(1px);
  }
  #swenska-chat-root.sw-offline .sw-inline-error{
    flex:0 0 auto;
    margin-top:6px;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box{
    flex:0 0 auto;
    margin:7px 0 8px;
    padding:7px 9px;
    gap:6px;
    font-size:10.5px;
    line-height:1.2;
  }

  /* Privacy remains below the composer; branding is removed on mobile. */
  #swenska-chat-root .sw-chat-footer,
  #swenska-chat-root.sw-offline .sw-chat-footer{
    flex:0 0 auto;
    padding:0 14px calc(9px + env(safe-area-inset-bottom,0px));
    background:#fff;
  }
  #swenska-chat-root .sw-privacy-link{
    margin:0;
    font-size:12px;
    line-height:1.2;
  }
  #swenska-chat-root .sw-powered-by{display:none}
  #swenska-chat-root.sw-keyboard-open .sw-chat-footer{display:none}
}

/* Extra compression only for very short visual viewports (small iPhone + keyboard). */
@media(max-width:600px) and (max-height:420px){
  #swenska-chat-root.sw-keyboard-open .sw-chat-header,
  #swenska-chat-root.sw-keyboard-open.sw-online .sw-chat-header,
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-chat-header{
    min-height:72px;
    padding:7px 12px;
    padding-top:calc(7px + env(safe-area-inset-top,0px));
  }
  #swenska-chat-root.sw-keyboard-open .sw-brand-logo,
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-brand-logo{
    width:46px;
    height:46px;
  }
  #swenska-chat-root.sw-keyboard-open .sw-brand-text h2,
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-brand-text h2{font-size:18px}
  #swenska-chat-root.sw-keyboard-open .sw-status,
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-status{font-size:12.5px}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-start-form{padding:6px 12px 0}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-agent{margin-bottom:4px}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-agent .sw-avatar{
    width:40px;
    height:40px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-agent .sw-bubble{
    max-width:calc(100vw - 70px);
    padding:7px 9px;
    font-size:12.5px;
    line-height:1.18!important;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer{
    min-height:52px;
    padding-top:4px;
    padding-bottom:4px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer button#swStartChatBtn{
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-urgent-box{
    margin:4px 0;
    padding:4px 7px;
    font-size:9px;
  }
}


/* v1.3.20: simplified final mobile OFFLINE layout. Desktop and mobile ONLINE stay unchanged. */
#swenska-chat-root .sw-mobile-offline-notice,
#swenska-chat-root .sw-mobile-message-icon{display:none}

@media(max-width:600px){
  #swenska-chat-root.sw-offline .sw-start-form{
    padding:10px 14px 0;
    overflow:hidden;
  }
  #swenska-chat-root.sw-offline .sw-offline-agent{
    flex:0 0 auto;
    margin-bottom:8px;
  }
  #swenska-chat-root.sw-offline .sw-contact-field{display:none!important}
  #swenska-chat-root.sw-offline .sw-form-fields{
    display:flex;
    flex:1;
    min-height:0;
    flex-direction:column;
    margin:0;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer{
    display:flex;
    flex:0 0 auto;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    width:100%;
    min-height:0;
    margin:auto 0 0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  #swenska-chat-root.sw-offline .sw-offline-attach{display:none!important}
  #swenska-chat-root.sw-offline .sw-offline-composer .sw-field{
    position:relative;
    flex:0 0 164px;
    width:100%;
    min-width:0;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer .sw-field-icon{display:none}
  #swenska-chat-root.sw-offline .sw-mobile-message-icon{
    display:block;
    position:absolute;
    z-index:2;
    top:18px;
    left:17px;
    width:27px;
    height:27px;
    fill:none;
    stroke:#647184;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer textarea{
    display:block;
    width:100%;
    height:100%;
    min-height:164px;
    max-height:none;
    padding:18px 16px 16px 54px;
    border:1px solid #cbd3df;
    border-radius:12px;
    background:#fff;
    resize:none;
    overflow-y:auto;
    line-height:1.45;
  }
  #swenska-chat-root.sw-offline .sw-mobile-offline-notice{
    display:flex;
    min-height:52px;
    align-items:center;
    gap:10px;
    padding:10px 13px;
    border:1px solid #d8eee0;
    border-radius:11px;
    color:#075b35;
    background:linear-gradient(90deg,#effbf3,#edf8f1);
    font-size:13.5px;
    line-height:1.28;
  }
  #swenska-chat-root.sw-offline .sw-mobile-offline-notice svg{
    width:26px;
    height:26px;
    flex:0 0 26px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
  }
  #swenska-chat-root.sw-offline .sw-mobile-offline-notice.is-error{
    border-color:#f0b5b5;
    color:#a51e1e;
    background:#fff0f0;
  }
  #swenska-chat-root.sw-offline .sw-offline-composer button#swStartChatBtn{
    display:flex;
    width:100%;
    height:auto;
    min-height:58px;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin:0;
    padding:14px 18px;
    border-radius:12px;
    font-size:18px;
  }
  #swenska-chat-root.sw-offline .sw-submit-label{display:inline}
  #swenska-chat-root.sw-offline .sw-submit-icon{
    display:block;
    width:27px;
    height:27px;
    fill:#fff;
    transform:translateX(0);
    order:-1;
  }
  #swenska-chat-root.sw-offline .sw-inline-error{display:none!important}
  #swenska-chat-root.sw-offline .sw-urgent-box{
    min-height:48px;
    margin:10px 0 8px;
    padding:7px 10px;
    gap:7px;
    font-size:11px;
    line-height:1.18;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box svg{
    width:25px;
    height:25px;
    flex-basis:25px;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box span{
    display:flex;
    min-width:0;
    flex-wrap:wrap;
    gap:1px 6px;
  }
  #swenska-chat-root.sw-offline .sw-urgent-box a{
    margin-left:0;
    white-space:nowrap;
  }
}

@media(max-width:600px){
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-agent{display:none!important}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-start-form{padding:10px 14px 0}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-form-fields{flex:1}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer{
    flex:1;
    margin:0;
    gap:9px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer .sw-field{
    flex:1;
    min-height:112px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer textarea{min-height:112px}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-mobile-offline-notice{display:none}
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-offline-composer button#swStartChatBtn{
    width:100%;
    min-height:54px;
    height:auto;
    flex-basis:auto;
    padding:11px 16px;
    border-radius:11px;
    font-size:17px;
  }
  #swenska-chat-root.sw-keyboard-open.sw-offline .sw-urgent-box{
    min-height:43px;
    margin:8px 0 6px;
    padding:6px 9px;
    font-size:10.5px;
  }
}

@media(max-width:600px) and (max-height:700px){
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer .sw-field{flex-basis:132px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer textarea{min-height:132px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-mobile-offline-notice{
    min-height:46px;
    padding:8px 11px;
    font-size:12.5px;
  }
}


/* v1.3.21: extra protection for very small/short phones. */
@media(max-width:340px){
  #swenska-chat-root.sw-offline .sw-chat-header{padding-left:10px;padding-right:10px;gap:8px}
  #swenska-chat-root.sw-offline .sw-brand-logo{width:46px;height:46px}
  #swenska-chat-root.sw-offline .sw-brand-text h2{font-size:16px;letter-spacing:.2px;white-space:nowrap}
  #swenska-chat-root.sw-offline .sw-status{font-size:12px}
  #swenska-chat-root.sw-offline .sw-header-btn{width:28px;height:28px}
}
@media(max-width:600px) and (max-height:700px){
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-start-form{padding-top:6px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-agent{gap:7px;margin-bottom:4px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-agent .sw-avatar{width:40px;height:40px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-agent .sw-bubble{padding:7px 9px;font-size:11.5px;line-height:1.2!important}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer{gap:6px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer .sw-field{flex-basis:100px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer textarea{min-height:100px;padding-top:13px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-mobile-message-icon{top:13px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-mobile-offline-notice{min-height:42px;padding:6px 9px;font-size:11.5px;line-height:1.18}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-mobile-offline-notice svg{width:22px;height:22px;flex-basis:22px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-offline-composer button#swStartChatBtn{min-height:48px;padding:10px 14px;font-size:16px}
  #swenska-chat-root.sw-offline:not(.sw-keyboard-open) .sw-urgent-box{min-height:40px;margin:5px 0 4px;padding:4px 7px;font-size:9.5px}
}

	/* v1.3.22: after a successful offline submit, keep only the thank-you screen. */
	#swenska-chat-root.sw-offline .sw-start-form.is-hidden{
		display:none!important;
	}
	
	