
:root{
  --wec-primary:#2f76e5;
  --wec-primary-dark:#235fbc;
  --wec-primary-soft:#1f2c44;
  --wec-accent:#8aa5c8;
  --wec-bg:#0f1217;
  --wec-surface:#151a21;
  --wec-surface-2:#1b212b;
  --wec-surface-3:#202735;
  --wec-border:#2a3444;
  --wec-border-strong:#36445a;
  --wec-text:#eef3fb;
  --wec-text-soft:#aeb9ca;
  --wec-warning-bg:#252112;
  --wec-warning-border:#4a4120;
  --wec-warning-text:#e9d997;
  --wec-danger-bg:#2d1717;
  --wec-danger-border:#553030;
  --wec-danger-text:#f0b1b1;
  --wec-shadow:0 30px 70px rgba(0,0,0,.45);
  --wec-radius-xl:24px;
  --wec-radius-lg:18px;
  --wec-radius-md:14px;
  --wec-radius-sm:10px;
}

#wec-chat-launcher{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:999999;
  width:62px;
  height:62px;
  border:0;
  border-radius:50%;
  padding:0;
  background:linear-gradient(135deg,var(--wec-primary),var(--wec-primary-dark));
  box-shadow:0 16px 36px rgba(25,91,189,.42);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
#wec-chat-launcher img{
  width:36px;
  height:36px;
  object-fit:contain;
  filter:brightness(0) invert(1);
}
#wec-chat-launcher:hover{
  transform:translateY(-1px) scale(1.02);
}

#wec-chat-panel{
  position:fixed;
  right:24px;
  bottom:96px;
  width:min(430px,calc(100vw - 28px));
  height:min(710px,calc(100vh - 110px));
  z-index:999999;
  background:var(--wec-surface);
  border:1px solid var(--wec-border);
  border-radius:var(--wec-radius-xl);
  overflow:hidden;
  box-shadow:var(--wec-shadow);
  display:flex;
  flex-direction:column;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--wec-text);
}
.wec-hidden{display:none!important}

.wec-chat-header{
  background:linear-gradient(180deg,#161d28 0%,#11161f 100%);
  color:#fff;
  padding:16px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid rgba(255,255,255,.04);
}
.wec-header-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.wec-header-logo{
  width:40px;
  height:40px;
  object-fit:contain;
  background:#fff;
  border-radius:12px;
  padding:4px;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
}
.wec-chat-header strong{
  display:block;
  font-size:15px;
  line-height:1.2;
  font-weight:700;
  color:#fff;
}
.wec-chat-header small{
  display:inline-block;
  margin-top:4px;
  font-size:10px;
  letter-spacing:.12em;
  opacity:.95;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(47,118,229,.18);
  color:#dce8ff;
}
.wec-header-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.wec-header-actions button{
  width:38px;
  height:38px;
  border:1px solid var(--wec-border-strong);
  border-radius:12px;
  background:var(--wec-surface-3);
  color:#fff;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.wec-header-actions button:hover{
  background:#273145;
}

#wec-new-chat{
  width:auto;
  min-width:76px;
  padding:0 12px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.wec-test-warning{
  background:var(--wec-warning-bg);
  color:var(--wec-warning-text);
  padding:10px 14px;
  font-size:12px;
  line-height:1.45;
  border-bottom:1px solid var(--wec-warning-border);
}

.wec-onboarding{
  overflow-y:auto;
  padding:24px 22px;
  background:linear-gradient(180deg,#151a21 0%,#12161d 100%);
  flex:1;
}
.wec-onboarding-brand{
  text-align:center;
  margin-bottom:22px;
}
.wec-welcome-logo{
  width:72px;
  height:72px;
  object-fit:contain;
  margin:0 auto 14px;
  background:#fff;
  border-radius:20px;
  padding:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
}
.wec-onboarding h2{
  font-size:22px;
  line-height:1.2;
  margin:0 0 10px;
  color:var(--wec-text);
}
.wec-onboarding p{
  font-size:14px;
  line-height:1.55;
  color:var(--wec-text-soft);
  margin:0 auto;
  max-width:360px;
}
#wec-onboarding-form{margin-top:18px}
.wec-onboarding label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:#dde6f6;
  margin:0 0 13px;
}
.wec-onboarding input[type=text],
.wec-onboarding input[type=number],
.wec-onboarding input[type=email],
.wec-onboarding select{
  width:100%;
  box-sizing:border-box;
  margin-top:6px;
  border:1px solid var(--wec-border-strong);
  border-radius:14px;
  background:var(--wec-surface-2);
  padding:13px 14px;
  font:14px system-ui;
  color:var(--wec-text);
  outline:none;
}
.wec-onboarding input::placeholder,
#wec-chat-input::placeholder{color:#8f9cb1}
.wec-onboarding input:focus,
.wec-onboarding select:focus,
#wec-chat-input:focus{
  border-color:#4f8ff0;
  box-shadow:0 0 0 4px rgba(47,118,229,.18);
}
.wec-two-cols{
  display:grid;
  grid-template-columns:1fr 1.35fr;
  gap:11px;
}
.wec-optional{
  font-weight:400;
  color:var(--wec-text-soft);
}
.wec-test-consent{
  display:flex!important;
  gap:10px;
  align-items:flex-start;
  font-weight:500!important;
  color:var(--wec-text)!important;
  background:rgba(255,255,255,.03);
  border:1px solid var(--wec-border);
  border-radius:14px;
  padding:12px;
}
.wec-test-consent input{margin-top:3px}
.wec-start-button{
  width:100%;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--wec-primary),var(--wec-primary-dark));
  color:#fff;
  padding:14px;
  font-weight:700;
  cursor:pointer;
  font-size:15px;
  box-shadow:0 12px 26px rgba(47,118,229,.25);
}

.wec-chat-area{
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1;
  background:var(--wec-surface);
}
.wec-patient-strip{
  padding:10px 14px;
  font-size:11px;
  background:#131926;
  border-bottom:1px solid var(--wec-border);
  color:var(--wec-text-soft);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.wec-chat-messages{
  flex:1;
  overflow-y:auto;
  padding:16px 16px 10px;
  background:linear-gradient(180deg,#141922 0%,#10151c 100%);
}
.wec-message{
  max-width:86%;
  padding:12px 14px;
  border-radius:18px;
  margin:0 0 12px;
  word-break:break-word;
  font-size:14px;
  line-height:1.55;
}
.wec-assistant{
  background:var(--wec-surface-2);
  color:var(--wec-text);
  border:1px solid var(--wec-border);
  border-bottom-left-radius:6px;
}
.wec-user{
  margin-left:auto;
  background:linear-gradient(135deg,var(--wec-primary),var(--wec-primary-dark));
  color:#fff;
  border:1px solid rgba(255,255,255,.06);
  border-bottom-right-radius:6px;
}
[dir=rtl] .wec-user{
  margin-left:0;
  margin-right:auto;
  border-bottom-right-radius:18px;
  border-bottom-left-radius:6px;
}
.wec-error{
  background:var(--wec-danger-bg);
  color:var(--wec-danger-text);
  border:1px solid var(--wec-danger-border);
}
.wec-summary{
  max-width:100%;
  background:#172228;
  color:#d9f1ea;
  border:1px solid #2d4650;
  border-radius:14px;
  font-size:13px;
}
.wec-thinking{
  opacity:.72;
  font-style:italic;
}
.wec-message-image{
  display:block;
  width:100%;
  max-height:240px;
  object-fit:contain;
  border-radius:12px;
  margin-bottom:10px;
  background:#fff;
}

.wec-image-preview-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  background:#131926;
  border-top:1px solid var(--wec-border);
}
.wec-image-preview-row img{
  width:52px;
  height:52px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--wec-border);
  background:#fff;
}
.wec-image-preview-info{
  min-width:0;
  flex:1;
}
.wec-image-preview-info strong,
.wec-image-preview-info small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.wec-image-preview-info strong{
  font-size:12px;
  color:var(--wec-text);
}
.wec-image-preview-info small{
  font-size:10px;
  color:var(--wec-text-soft);
  margin-top:3px;
}
#wec-remove-image{
  border:1px solid var(--wec-border);
  background:var(--wec-surface-2);
  width:32px;
  height:32px;
  border-radius:10px;
  font-size:18px;
  cursor:pointer;
  color:var(--wec-text-soft);
  display:flex;
  align-items:center;
  justify-content:center;
}

.wec-tool-row{
  padding:10px 14px;
  border-top:1px solid var(--wec-border);
  background:#11161d;
}
.wec-secondary-button{
  width:100%;
  border:1px solid var(--wec-border-strong);
  border-radius:14px;
  background:var(--wec-surface-2);
  color:var(--wec-text);
  padding:11px 14px;
  font-weight:600;
  cursor:pointer;
}
.wec-secondary-button:hover{
  background:#212937;
  border-color:#4a5e7c;
}
.wec-secondary-button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.wec-chat-form{
  display:flex;
  gap:8px;
  align-items:flex-end;
  padding:12px 14px 10px;
  border-top:1px solid var(--wec-border);
  background:#11161d;
}
.wec-attach-button{
  width:44px;
  height:44px;
  border:1px solid var(--wec-border-strong);
  border-radius:14px;
  background:var(--wec-surface-2);
  cursor:pointer;
  font-size:18px;
  line-height:1;
  color:#d8e5fb;
  display:flex;
  align-items:center;
  justify-content:center;
}
#wec-chat-input{
  flex:1;
  resize:none;
  min-height:44px;
  max-height:110px;
  border:1px solid var(--wec-border-strong);
  border-radius:16px;
  padding:11px 13px;
  font:14px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--wec-text);
  background:var(--wec-surface-2);
}
#wec-chat-send{
  min-width:74px;
  height:44px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--wec-primary),var(--wec-primary-dark));
  color:#fff;
  padding:0 16px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(47,118,229,.18);
}
#wec-chat-send:disabled,
.wec-attach-button:disabled{
  opacity:.5;
  cursor:not-allowed;
}
.wec-image-note{
  padding:0 14px 12px;
  background:#11161d;
  color:var(--wec-text-soft);
  font-size:10px;
  line-height:1.4;
}

@media (max-width:600px){
  #wec-chat-launcher{
    right:14px;
    bottom:94px;
    width:58px;
    height:58px;
  }
  #wec-chat-launcher img{
    width:34px;
    height:34px;
  }
  #wec-chat-panel{
    right:8px;
    bottom:158px;
    width:calc(100vw - 16px);
    height:min(720px,calc(100vh - 82px));
    border-radius:22px;
  }
  .wec-two-cols{
    grid-template-columns:1fr 1fr;
  }
}


/* v0.5 refinements */
.wec-test-consent{
  font-size:12px!important;
  line-height:1.48;
}
.wec-test-consent strong{
  color:#ffffff;
  font-weight:650;
}

.wec-chat-form{
  gap:7px;
  padding:10px 12px 9px;
  align-items:center;
}
.wec-attach-button,
#wec-chat-send{
  width:38px;
  height:38px;
  min-width:38px;
  padding:0;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.wec-attach-button{
  border:1px solid var(--wec-border-strong);
  background:var(--wec-surface-2);
  color:#bcd2f5;
}
#wec-chat-send{
  border:0;
  background:linear-gradient(135deg,var(--wec-primary),var(--wec-primary-dark));
  color:#fff;
  box-shadow:0 7px 14px rgba(47,118,229,.16);
}
.wec-attach-button svg,
#wec-chat-send svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#wec-chat-input{
  min-height:40px;
  border-radius:13px;
  padding:10px 12px;
}
.wec-tool-row{
  padding:9px 12px;
}
.wec-secondary-button{
  padding:10px 12px;
  font-size:13px;
  border-radius:12px;
}


/* v0.5.1 compact modern composer */
.wec-chat-form{
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:10px 12px 9px;
  align-items:stretch;
}

#wec-chat-input{
  width:100%;
  box-sizing:border-box;
  min-height:54px;
  max-height:120px;
  border-radius:14px;
  padding:11px 13px;
  margin:0;
}

.wec-composer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:32px;
}

.wec-attach-button,
#wec-chat-send{
  width:32px;
  height:32px;
  min-width:32px;
  padding:0;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.wec-attach-button{
  border:1px solid var(--wec-border-strong);
  background:transparent;
  color:#a9bddc;
  box-shadow:none;
}

.wec-attach-button:hover{
  background:rgba(255,255,255,.045);
  color:#d9e7fb;
}

#wec-chat-send{
  border:0;
  background:var(--wec-primary);
  color:#fff;
  box-shadow:0 5px 12px rgba(47,118,229,.18);
}

#wec-chat-send:hover{
  background:var(--wec-primary-dark);
}

.wec-attach-button svg,
#wec-chat-send svg{
  width:15px;
  height:15px;
  stroke-width:1.8;
}

.wec-image-note{
  padding-top:2px;
  font-size:9.5px;
  line-height:1.35;
  opacity:.85;
}


/* v0.6 Safe Preview */
.wec-admin-preview-shell{
  max-width:920px;
  min-height:760px;
  padding:24px;
  margin-top:18px;
  background:#eef1f5;
  border:1px solid #d7dde6;
  border-radius:18px;
}
#wec-chat-panel.wec-admin-preview-panel{
  position:relative !important;
  right:auto !important;
  bottom:auto !important;
  top:auto !important;
  left:auto !important;
  width:min(430px,100%) !important;
  height:700px !important;
  margin:0 auto !important;
  display:flex !important;
  z-index:2 !important;
}
#wec-chat-panel.wec-admin-preview-panel #wec-chat-close{
  display:none;
}


/* v0.6.1 country dropdown readability */
.wec-onboarding select{
  background:#ffffff !important;
  color:#15304b !important;
  border-color:#cad8ea !important;
  color-scheme:light;
}
.wec-onboarding select option{
  background:#ffffff !important;
  color:#15304b !important;
}
.wec-onboarding select:focus{
  border-color:#5c9bea !important;
  box-shadow:0 0 0 4px rgba(47,118,229,.18) !important;
}


/* v0.6.2 onboarding readability */
.wec-onboarding input[type=text],
.wec-onboarding input[type=number],
.wec-onboarding input[type=email],
.wec-onboarding select{
  background:#ffffff !important;
  color:#15304b !important;
  border-color:#cad8ea !important;
  color-scheme:light;
}

.wec-onboarding input[type=text]::placeholder,
.wec-onboarding input[type=number]::placeholder,
.wec-onboarding input[type=email]::placeholder{
  color:#7c8da0 !important;
  opacity:1;
}

.wec-onboarding input[type=text]:focus,
.wec-onboarding input[type=number]:focus,
.wec-onboarding input[type=email]:focus,
.wec-onboarding select:focus{
  background:#ffffff !important;
  color:#15304b !important;
  border-color:#5c9bea !important;
  box-shadow:0 0 0 4px rgba(47,118,229,.18) !important;
}

.wec-test-consent{
  background:#ffffff !important;
  color:#15304b !important;
  border-color:#cad8ea !important;
}

.wec-test-consent strong{
  color:#15304b !important;
}

.wec-test-consent input[type=checkbox]{
  accent-color:#2f76e5;
}


/* v0.6.3 multiple image attachments */
.wec-message-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.wec-message-gallery-single{
  grid-template-columns:1fr;
}
.wec-message-image{
  width:100%;
  height:130px;
  max-height:none;
  object-fit:cover;
  margin-bottom:0;
}
.wec-image-preview-row{
  align-items:flex-start;
}
.wec-preview-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  max-width:130px;
}
.wec-preview-list img,
.wec-preview-pdf{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--wec-border);
  background:#fff;
}
.wec-preview-list img{
  object-fit:cover;
}
.wec-preview-pdf{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  color:#15304b;
}


/* v0.6.4 attachment deletion controls */
.wec-preview-list{
  max-width:180px;
}

.wec-preview-thumb{
  position:relative;
  width:42px;
  height:42px;
}

.wec-preview-thumb img{
  width:42px !important;
  height:42px !important;
  display:block;
}

.wec-preview-remove{
  position:absolute;
  top:-6px;
  right:-6px;
  width:18px;
  height:18px;
  border:0;
  border-radius:50%;
  background:#d94a4a;
  color:#fff;
  font-size:14px;
  line-height:18px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
}

.wec-preview-remove:hover{
  background:#bd3636;
}

#wec-remove-image.wec-clear-attachments{
  width:auto;
  min-width:48px;
  height:30px;
  padding:0 9px;
  border-radius:9px;
  font-size:11px;
  font-weight:600;
  white-space:nowrap;
}


/* v0.7.0 compact urgent safety note during intake */
.wec-safety-advice{
  margin:2px 0 12px;
  padding:9px 10px;
  border:1px solid #7b6330;
  border-left:3px solid #d1a848;
  border-radius:10px;
  background:#272317;
  color:#e8dfc7;
  font-size:11.5px;
  line-height:1.45;
  font-weight:400;
}

.wec-safety-advice .wec-safety-label{
  display:block;
  margin-bottom:4px;
  color:#e9c66c;
  font-size:10px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.wec-safety-advice strong{
  color:#f3e7c7;
  font-weight:650;
}

/* Keep the normal intake question visually separate after the safety note. */
.wec-safety-advice + br{
  display:none;
}


/* v0.7.3 saved-case foundation */
.wec-field-note{
  display:block;
  margin-top:6px;
  color:var(--wec-text-soft);
  font-size:10.5px;
  line-height:1.4;
  font-weight:400;
}

.wec-start-button:disabled{
  opacity:.55;
  cursor:wait;
}


/* v0.7.6 email verification + doctor reply testing */
.wec-email-verification{
  margin:0 0 13px;
  padding:12px;
  border:1px solid var(--wec-border);
  border-radius:14px;
  background:#161d27;
}

.wec-email-verification .wec-secondary-button{
  width:auto;
  padding:8px 11px;
  font-size:11px;
}

.wec-email-verification-actions{
  margin-top:8px;
}

.wec-doctor-test-card{
  max-width:920px;
  box-sizing:border-box;
  margin-top:18px;
  padding:18px;
  border:1px solid #d7dde6;
  border-radius:16px;
  background:#ffffff;
}

.wec-doctor-test-card h2{
  margin-top:0;
}

.wec-doctor-test-card textarea{
  width:100%;
  max-width:760px;
  box-sizing:border-box;
  margin:8px 0 10px;
}

.wec-doctor-test-status{
  margin-top:10px;
  font-weight:600;
}

.wec-doctor{
  background:#17302c;
  color:#e0f2ed;
  border:1px solid #31574f;
  border-bottom-left-radius:6px;
}

.wec-doctor::before{
  content:attr(data-doctor-label);
  display:block;
  margin-bottom:5px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#9fd1c6;
}

.wec-saved-attachment-slot{width:100%;min-height:180px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#9aa8bc}
.wec-saved-file-button{border:1px solid #40526b;border-radius:10px;background:#1a2432;color:#e8eef8;padding:9px 11px;cursor:pointer}
.wec-message-image{cursor:zoom-in}

#wec-chat-messages{overflow-anchor:none}

.wec-patient-attachment-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:7px;
}
.wec-patient-attachment-button{
  border:1px solid rgba(255,255,255,.25);
  border-radius:8px;
  background:rgba(255,255,255,.08);
  color:inherit;
  padding:6px 10px;
  font-size:11px;
  cursor:pointer;
}
.wec-patient-attachment-button:hover{
  background:rgba(255,255,255,.14);
}

/* v0.9.7 attachment action layout */
.wec-message-gallery{
  align-items:start;
}
.wec-saved-attachment-slot{
  min-width:0;
  min-height:0;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
}
.wec-saved-attachment-slot .wec-message-image{
  display:block;
  width:100%;
  height:130px;
  min-width:0;
  margin:0;
  object-fit:contain;
  flex:none;
}
.wec-saved-attachment-slot .wec-patient-attachment-actions{
  width:100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:6px;
}
.wec-saved-attachment-slot .wec-patient-attachment-button{
  display:block;
  width:100%;
  min-width:0;
  margin:0;
  padding:6px 4px;
  line-height:1.2;
  white-space:nowrap;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:430px){
  .wec-message-gallery{
    grid-template-columns:1fr;
  }
  .wec-saved-attachment-slot .wec-message-image{
    height:auto;
    max-height:220px;
  }
}


/* v0.9.27 patient privacy + consent */
.wec-consent-card{
  display:grid;
  gap:9px;
  margin-top:4px;
  padding:14px;
  border:1px solid #cad8ea;
  border-radius:14px;
  background:#ffffff;
  color:#15304b;
}
.wec-consent-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:9px;
  border-bottom:1px solid #e2eaf3;
}
.wec-consent-heading > div{
  display:grid;
  gap:3px;
}
.wec-consent-heading strong{
  font-size:14px;
  color:#15304b;
}
.wec-consent-heading small{
  color:#60758b;
  font-size:11px;
  line-height:1.4;
}
.wec-consent-required{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  background:#edf4ff;
  color:#2c63a5;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.wec-consent-item{
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  margin:0!important;
  padding:9px 10px;
  border:1px solid #e0e8f1;
  border-radius:10px;
  background:#f9fbfd;
  color:#243f59!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.45;
  cursor:pointer;
}
.wec-consent-item input[type=checkbox]{
  flex:0 0 auto;
  width:17px;
  height:17px;
  margin-top:1px;
  accent-color:#2f76e5;
}
.wec-consent-item strong{
  color:#15304b;
}
.wec-consent-item a{
  color:#276cc2;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}
.wec-consent-footnote{
  display:block;
  padding-top:3px;
  color:#687b8d;
  font-size:10.5px;
  line-height:1.45;
}


/* v0.9.28 simplified single-consent onboarding */
.wec-consent-summary{
  margin:0;
  color:#526b83;
  font-size:11.5px;
  line-height:1.5;
}
.wec-consent-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px 12px;
  padding:2px 0 4px;
}
.wec-consent-links a{
  color:#276cc2;
  font-size:11.5px;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}
.wec-consent-single{
  background:#f4f8fd!important;
  border-color:#cddced!important;
}
.wec-consent-single span{
  font-size:11.5px;
}


/* v0.9.40 inline page placement */
.wec-inline-chat-shell{
  width:100%;
  max-width:920px;
  margin:24px auto;
}
#wec-chat-panel.wec-inline-panel{
  position:relative !important;
  right:auto !important;
  bottom:auto !important;
  top:auto !important;
  left:auto !important;
  width:100% !important;
  max-width:920px !important;
  height:760px !important;
  min-height:620px;
  margin:0 auto !important;
  display:flex !important;
  z-index:2 !important;
  box-sizing:border-box;
}
#wec-chat-panel.wec-inline-panel #wec-chat-close{
  display:none;
}
@media(max-width:600px){
  .wec-inline-chat-shell{
    margin:12px auto;
  }
  #wec-chat-panel.wec-inline-panel{
    height:calc(100vh - 110px) !important;
    min-height:560px;
    border-radius:16px;
  }
  #wec-chat-launcher{
    right:16px;
    bottom:16px;
  }
}

/* v0.9.43 premium patient chat visual refresh */
:root{
  --wec-primary:#146fd1;
  --wec-primary-dark:#0c57ad;
  --wec-primary-soft:#eaf3ff;
  --wec-accent:#6d8bad;
  --wec-bg:#f3f7fb;
  --wec-surface:#ffffff;
  --wec-surface-2:#f7f9fc;
  --wec-surface-3:#eef4fb;
  --wec-border:#dce6f0;
  --wec-border-strong:#c8d6e5;
  --wec-text:#13243a;
  --wec-text-soft:#64778c;
  --wec-warning-bg:#fff8e7;
  --wec-warning-border:#ecd18b;
  --wec-warning-text:#755715;
  --wec-danger-bg:#fff2f2;
  --wec-danger-border:#efb5b5;
  --wec-danger-text:#9b3434;
  --wec-shadow:0 30px 80px rgba(25,55,90,.20),0 8px 28px rgba(25,55,90,.10);
  --wec-radius-xl:28px;
  --wec-radius-lg:20px;
  --wec-radius-md:16px;
  --wec-radius-sm:12px;
}

#wec-chat-launcher{
  width:60px;
  height:60px;
  border:4px solid rgba(255,255,255,.94);
  background:linear-gradient(145deg,#1979df 0%,#0d5fbe 100%);
  box-shadow:0 18px 42px rgba(15,91,183,.30),0 4px 12px rgba(15,56,100,.12);
  transition:transform .18s ease,box-shadow .18s ease;
}
#wec-chat-launcher img{
  width:34px;
  height:34px;
  filter:brightness(0) invert(1);
}
#wec-chat-launcher:hover{
  transform:translateY(-3px) scale(1.03);
  box-shadow:0 22px 46px rgba(15,91,183,.34),0 5px 14px rgba(15,56,100,.15);
}

#wec-chat-panel{
  width:min(448px,calc(100vw - 28px));
  height:min(730px,calc(100vh - 112px));
  border:1px solid rgba(193,210,226,.9);
  border-radius:28px;
  background:#fff;
  box-shadow:var(--wec-shadow);
  color:var(--wec-text);
}

.wec-chat-header{
  min-height:74px;
  box-sizing:border-box;
  padding:13px 14px 13px 16px;
  background:linear-gradient(135deg,#082b50 0%,#0b3b6e 58%,#0d4f8e 100%);
  border-bottom:0;
}
.wec-header-brand{gap:11px}
.wec-header-logo{
  width:42px;
  height:42px;
  box-sizing:border-box;
  padding:6px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.55);
  background:rgba(255,255,255,.96);
  box-shadow:0 6px 18px rgba(0,0,0,.14);
}
.wec-chat-header strong{
  font-size:16px;
  font-weight:750;
  letter-spacing:-.01em;
}
.wec-chat-header small{
  margin-top:5px;
  padding:3px 7px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.09);
  color:#dcecff;
  font-size:9.5px;
  line-height:1.2;
  letter-spacing:.1em;
}
.wec-header-actions{gap:7px}
.wec-header-actions button{
  height:38px;
  border:1px solid rgba(255,255,255,.32);
  background:rgba(255,255,255,.08);
  color:#fff;
  box-shadow:none;
  transition:background .15s ease,border-color .15s ease;
}
.wec-header-actions button:hover{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.48);
}
#wec-new-chat{
  min-width:82px;
  border-radius:999px;
  padding:0 14px;
  font-size:12px;
}
#wec-chat-close{
  width:38px;
  border-radius:999px;
}

.wec-test-warning{
  border-bottom:1px solid var(--wec-warning-border);
  background:#fff9ea;
  color:#725713;
}

.wec-onboarding{
  padding:28px 24px 30px;
  background:
    radial-gradient(circle at 50% -10%,rgba(28,121,223,.10),transparent 34%),
    linear-gradient(180deg,#f9fcff 0%,#f3f7fb 100%);
  scrollbar-color:#b9c9d9 transparent;
  scrollbar-width:thin;
}
.wec-onboarding-brand{
  margin:2px auto 26px;
  max-width:650px;
}
.wec-welcome-logo{
  width:76px;
  height:76px;
  box-sizing:border-box;
  margin-bottom:17px;
  padding:11px;
  border:1px solid #e2ebf4;
  border-radius:23px;
  background:#fff;
  box-shadow:0 12px 32px rgba(31,75,117,.12);
}
.wec-onboarding h2{
  margin-bottom:9px;
  color:#112a45;
  font-size:25px;
  font-weight:760;
  letter-spacing:-.025em;
}
.wec-onboarding p{
  max-width:520px;
  color:#61768d;
  font-size:14px;
  line-height:1.6;
}
#wec-onboarding-form{
  max-width:720px;
  margin:20px auto 0;
}
.wec-onboarding label{
  margin-bottom:15px;
  color:#243c55;
  font-size:12.5px;
  font-weight:700;
  letter-spacing:.005em;
}
.wec-onboarding input[type=text],
.wec-onboarding input[type=number],
.wec-onboarding input[type=email],
.wec-onboarding select{
  min-height:52px;
  margin-top:7px;
  padding:13px 15px;
  border:1px solid #d3dfeb !important;
  border-radius:16px;
  background:#fff !important;
  color:#17324d !important;
  box-shadow:0 1px 2px rgba(28,57,88,.03);
  font-size:14px;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.wec-onboarding input[type=text]:hover,
.wec-onboarding input[type=number]:hover,
.wec-onboarding input[type=email]:hover,
.wec-onboarding select:hover{
  border-color:#b9cadd !important;
}
.wec-onboarding input[type=text]:focus,
.wec-onboarding input[type=number]:focus,
.wec-onboarding input[type=email]:focus,
.wec-onboarding select:focus{
  border-color:#4a91df !important;
  box-shadow:0 0 0 4px rgba(20,111,209,.11) !important;
}
.wec-onboarding input::placeholder{color:#98a8b8 !important}
.wec-two-cols{gap:13px}
.wec-field-note{
  margin-top:7px;
  color:#718397;
  font-size:10.5px;
  line-height:1.45;
}
.wec-email-verification{
  padding:14px;
  border:1px solid #dbe6f1;
  border-radius:16px;
  background:#f4f8fc;
}
.wec-consent-card{
  gap:11px;
  margin-top:8px;
  padding:17px;
  border:1px solid #d9e5f0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 24px rgba(31,75,117,.045);
}
.wec-consent-heading{
  padding-bottom:11px;
  border-bottom-color:#e8eef5;
}
.wec-consent-heading strong{font-size:14px}
.wec-consent-required{
  padding:5px 8px;
  background:#eaf3ff;
  color:#1d63ad;
}
.wec-consent-summary{
  color:#5f7489;
  font-size:11.5px;
  line-height:1.55;
}
.wec-consent-links a{color:#1468bd}
.wec-consent-item{
  padding:11px 12px;
  border-color:#dce7f2;
  border-radius:13px;
  background:#f6f9fd!important;
  color:#2a435d!important;
}
.wec-consent-item input[type=checkbox]{width:18px;height:18px}
.wec-start-button{
  min-height:52px;
  margin-top:4px;
  border-radius:16px;
  background:linear-gradient(135deg,#1978dc 0%,#0e5fb9 100%);
  box-shadow:0 12px 24px rgba(14,95,185,.20);
  font-size:15px;
  transition:transform .15s ease,box-shadow .15s ease;
}
.wec-start-button:hover{
  transform:translateY(-1px);
  box-shadow:0 15px 28px rgba(14,95,185,.24);
}

.wec-chat-area{background:#f5f8fc}
.wec-patient-strip{
  padding:9px 16px;
  border-bottom:1px solid #e0e8f1;
  background:#f8fbfe;
  color:#718397;
  font-size:10.5px;
}
.wec-chat-messages{
  padding:20px 17px 14px;
  background:
    radial-gradient(circle at 50% 0,rgba(20,111,209,.035),transparent 28%),
    #f4f7fb;
  scrollbar-color:#c2cfdd transparent;
  scrollbar-width:thin;
}
.wec-message{
  max-width:82%;
  margin-bottom:12px;
  padding:12px 14px;
  border-radius:18px;
  font-size:14px;
  line-height:1.52;
}
.wec-assistant{
  border:1px solid #dce5ef;
  border-bottom-left-radius:7px;
  background:#fff;
  color:#1d334a;
  box-shadow:0 5px 16px rgba(33,62,91,.055);
}
.wec-user{
  border:0;
  border-bottom-right-radius:7px;
  background:linear-gradient(135deg,#1979df 0%,#0e63c3 100%);
  color:#fff;
  box-shadow:0 7px 18px rgba(14,99,195,.15);
}
.wec-doctor{
  border:1px solid #cfe6df;
  border-bottom-left-radius:7px;
  background:#edf8f4;
  color:#244b42;
  box-shadow:0 5px 16px rgba(37,98,81,.05);
}
.wec-doctor::before{color:#4c8678}
.wec-summary{
  border-color:#cfe1e8;
  background:#eef8fa;
  color:#2e5865;
}
.wec-thinking{color:#6b7e90}
.wec-safety-advice{
  border:1px solid #ead7a7;
  border-left:3px solid #d7a83d;
  background:#fff9e9;
  color:#735b24;
}
.wec-safety-advice .wec-safety-label{color:#a67612}
.wec-safety-advice strong{color:#624b17}
.wec-error{
  border-color:#efc6c6;
  background:#fff1f1;
  color:#9d3b3b;
}

.wec-image-preview-row{
  padding:10px 14px;
  border-top:1px solid #e1e9f1;
  background:#fff;
}
.wec-image-preview-row img,
.wec-preview-list img,
.wec-preview-pdf{border-color:#d7e1ec}
.wec-image-preview-info strong{color:#253d55}
.wec-image-preview-info small{color:#718397}
#wec-remove-image{
  border-color:#d5e0eb;
  background:#f4f7fb;
  color:#63778b;
}
.wec-tool-row{
  padding:9px 13px;
  border-top:1px solid #e2e9f1;
  background:#fff;
}
.wec-secondary-button{
  border-color:#cbd9e7;
  background:#f6f9fc;
  color:#28445f;
}
.wec-secondary-button:hover{
  border-color:#a9bed3;
  background:#eef4fa;
}

.wec-chat-form{
  gap:8px;
  padding:11px 13px 9px;
  border-top:1px solid #e0e8f0;
  background:#fff;
  box-shadow:0 -8px 24px rgba(37,65,94,.035);
}
#wec-chat-input{
  min-height:56px;
  border:1px solid #d4e0eb;
  border-radius:16px;
  background:#f8fafc;
  color:#1c334a;
  font-size:14px;
}
#wec-chat-input::placeholder{color:#95a5b5}
#wec-chat-input:focus{
  border-color:#4a91df;
  background:#fff;
  box-shadow:0 0 0 4px rgba(20,111,209,.10);
}
.wec-composer-actions{min-height:34px}
.wec-attach-button,
#wec-chat-send{
  width:34px;
  height:34px;
  min-width:34px;
  border-radius:11px;
}
.wec-attach-button{
  border:1px solid #d0dce8;
  background:#f6f9fc;
  color:#526f8e;
}
.wec-attach-button:hover{
  border-color:#b7c9da;
  background:#eef4fa;
  color:#1c5f9f;
}
#wec-chat-send{
  background:linear-gradient(135deg,#1979df,#0d62c2);
  box-shadow:0 6px 14px rgba(13,98,194,.18);
}
#wec-chat-send:hover{background:linear-gradient(135deg,#116bc9,#0b56a9)}
.wec-image-note{
  padding:1px 13px 11px;
  background:#fff;
  color:#8191a1;
  font-size:9.5px;
}

.wec-message-image{
  border:1px solid rgba(28,64,98,.08);
  border-radius:14px;
  background:#fff;
}
.wec-patient-attachment-button{
  border-color:#d0dce8;
  background:#f6f9fc;
  color:#34526e;
}
.wec-patient-attachment-button:hover{background:#eef4fa}

/* Inline chat should feel like a first-class part of the WebEyeClinic page. */
.wec-inline-chat-shell{
  max-width:980px;
  margin:28px auto 34px;
  padding:0 16px;
  box-sizing:border-box;
}
#wec-chat-panel.wec-inline-panel{
  max-width:980px !important;
  height:780px !important;
  min-height:640px;
  border-radius:30px;
  box-shadow:0 28px 70px rgba(26,62,98,.17),0 8px 24px rgba(26,62,98,.08);
}
#wec-chat-panel.wec-inline-panel .wec-chat-header{
  padding-left:18px;
  padding-right:18px;
}
#wec-chat-panel.wec-inline-panel .wec-onboarding{
  padding-left:34px;
  padding-right:34px;
}

/* Polished, unobtrusive scrollbars for Chromium/WebKit browsers. */
.wec-onboarding::-webkit-scrollbar,
.wec-chat-messages::-webkit-scrollbar,
#wec-chat-panel::-webkit-scrollbar{width:8px}
.wec-onboarding::-webkit-scrollbar-track,
.wec-chat-messages::-webkit-scrollbar-track{background:transparent}
.wec-onboarding::-webkit-scrollbar-thumb,
.wec-chat-messages::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  border-radius:999px;
  background:#c2cfdd;
  background-clip:padding-box;
}

@media(max-width:600px){
  #wec-chat-panel{
    right:8px;
    width:calc(100vw - 16px);
    border-radius:24px;
  }
  .wec-chat-header{min-height:68px;padding:11px 11px 11px 13px}
  .wec-header-logo{width:38px;height:38px;border-radius:12px}
  .wec-onboarding{padding:22px 16px 24px}
  .wec-onboarding h2{font-size:22px}
  .wec-welcome-logo{width:68px;height:68px;border-radius:20px}
  .wec-two-cols{grid-template-columns:1fr 1fr;gap:9px}
  .wec-inline-chat-shell{margin:14px auto 22px;padding:0 8px}
  #wec-chat-panel.wec-inline-panel{
    height:calc(100vh - 108px) !important;
    min-height:560px;
    border-radius:22px;
  }
  #wec-chat-panel.wec-inline-panel .wec-onboarding{padding-left:16px;padding-right:16px}
}

/* v0.9.45 privacy-friendly bot trap: visually and interactively absent for people. */
.wec-hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
