/* Wolfgang Historica AI Support — storefront widget */
.whais-panel,
.whais-panel *,
body button.whais-launcher { box-sizing: border-box; font-family: inherit; }

/* Floating launcher: fixed to the viewport and isolated from Woodmart button styles. */
body button.whais-launcher {
  position: fixed !important; inset: auto 22px 22px auto !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 60px !important; height: 60px !important; min-width: 60px !important; min-height: 60px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important;
  background: #06275d !important; color: #fff !important; font-size: 0 !important; line-height: 1 !important;
  text-transform: none !important; box-shadow: 0 8px 26px rgba(6,39,93,.28), 0 2px 8px rgba(0,0,0,.12) !important;
  cursor: pointer !important; z-index: 2147483000 !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease !important;
}
body button.whais-launcher::before {
  content: ""; display: block; width: 25px; height: 19px; box-sizing: border-box;
  border: 2.5px solid #fff; border-radius: 9px; position: absolute;
}
body button.whais-launcher::after {
  content: "•••"; position: absolute; left: 0; right: 0; top: 20px; text-align: center;
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; line-height: 1;
}
body button.whais-launcher:hover { background: #0b3678 !important; transform: translateY(-2px) !important; box-shadow: 0 12px 30px rgba(6,39,93,.34) !important; }
body button.whais-launcher:focus-visible { outline: 3px solid #aebbd0 !important; outline-offset: 4px !important; }
body button.whais-launcher[hidden] { display: none !important; }
.whais-preview {
  position: fixed !important; right: 28px !important; bottom: 96px !important; z-index: 2147482999 !important;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(300px, calc(100vw - 32px));
  padding: 15px 14px 15px 16px; border: 1px solid #e8eaf0; border-radius: 15px; background: #fff; color: #15233a;
  box-shadow: 0 10px 32px rgba(17,35,64,.16); font-family: inherit; font-size: 14px; line-height: 1.35; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.whais-preview:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(17,35,64,.2); }
.whais-preview-avatar { display: inline-flex; flex: 0 0 34px; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: #66705B; color: #fff; font-size: 12px; font-weight: 750; letter-spacing: -.04em; }
.whais-preview-copy { flex: 1; }
.whais-preview-close { align-self: flex-start; border: 0 !important; background: transparent !important; color: #8a91a0 !important; padding: 0 0 0 4px !important; margin: -5px -3px 0 0 !important; font-size: 18px !important; line-height: 1 !important; cursor: pointer; }
.whais-preview[hidden] { display: none !important; }
.whais-panel {
  position: fixed !important;
  right: 22px !important;
  bottom: 96px !important;
  width: 350px;
  max-width: calc(100vw - 28px);
  height: 600px;
  max-height: calc(100vh - 120px);
  z-index: 2147483001 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #252820;
  border: 1px solid #e6e9ef;
  border-radius: 17px;
  box-shadow: 0 18px 55px rgba(13,31,59,.19), 0 3px 12px rgba(13,31,59,.07);
  font-size: 14px;
}
.whais-panel[hidden] { display: none !important; }
.whais-panel button { font-family: inherit; text-transform: none; letter-spacing: normal; }
.whais-header {
  min-height: 66px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; color: #18243a; border-bottom: 1px solid #edf0f5;
}
.whais-brand { min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 10px; }
.whais-avatar { position: relative; display: inline-flex; flex: 0 0 36px; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: #66705B; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.04em; }
.whais-avatar::after { content: ""; position: absolute; right: -1px; bottom: 0; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #25b66a; }
.whais-brand-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.whais-brand strong { color: #17243b; font-size: 13px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.whais-brand span { display: flex; align-items: center; gap: 5px; color: #7a8495; font-size: 11px; line-height: 1.2; }
.whais-brand span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #25b66a; }
.whais-close { width: 30px; height: 30px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #737d8d !important; font-size: 23px !important; line-height: 1 !important; cursor: pointer; transition: background .15s ease; }
.whais-close:hover { background: #f1f3f6 !important; }
.whais-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 17px 13px 12px; background: #fff; scroll-behavior: smooth; }
.whais-messages::-webkit-scrollbar { width: 6px; }
.whais-messages::-webkit-scrollbar-thumb { background: #d4d9ce; border-radius: 10px; }
.whais-message { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: 91%; margin: 0 0 15px; animation: whais-message-in .18s ease-out; }
.whais-visitor { margin-left: auto; align-items: flex-end; }
.whais-message-label { padding: 0 3px; color: #8b94a4; font-size: 10px; line-height: 1.25; font-weight: 600; }
.whais-bubble { padding: 11px 13px; border: 1px solid #e4e8f0; border-radius: 5px 14px 14px 14px; background: #eef0f7; color: #26334a; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 2px 6px rgba(31,39,27,.035); }
.whais-visitor .whais-bubble { border-color: #06275d; border-radius: 14px 5px 14px 14px; background: #06275d; color: #fff; box-shadow: 0 3px 8px rgba(54,65,45,.13); }
.whais-human .whais-bubble { background: #eef2e9; border-color: #dfe6d7; }
.whais-system .whais-bubble { background: #fff8e9; border-color: #f1dfb7; color: #6e5523; }
.whais-time { color: #92978e; font-size: 10px; }
.whais-tools { display: flex; justify-content: flex-start; padding: 7px 13px 2px; background: #fff; }
.whais-human { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 7px 12px !important; border: 1px solid #dbe2ed !important; border-radius: 999px !important; background: #fff !important; color: #253b60 !important; font-size: 12px !important; font-weight: 600 !important; line-height: 1.2 !important; cursor: pointer; transition: background .15s ease,border-color .15s ease; }
.whais-human:hover { background: #f3f6fb !important; border-color: #aab8ce !important; }
.whais-form { display: flex; align-items: flex-end; gap: 9px; padding: 10px 12px 11px; background: #fff; }
.whais-input { display: block; width: 100%; min-height: 44px; max-height: 108px; resize: none; padding: 12px 13px !important; margin: 0; border: 1px solid #d7deea !important; border-radius: 999px !important; background: #fff !important; color: #282d25 !important; font-size: 13px !important; line-height: 1.4 !important; box-shadow: none !important; }
.whais-input::placeholder { color: #959b91; opacity: 1; }
.whais-input:focus { outline: none !important; border-color: #6c82a6 !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(6,39,93,.08) !important; }
.whais-send, .whais-contact button { min-height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px !important; margin: 0; border: 0 !important; border-radius: 999px !important; background: #06275d !important; color: #fff !important; font-size: 13px !important; line-height: 1 !important; font-weight: 650 !important; box-shadow: 0 3px 8px rgba(54,65,45,.14) !important; cursor: pointer; transition: background .15s ease,transform .15s ease; }
.whais-send:hover, .whais-contact button:hover { background: #0b3678 !important; transform: translateY(-1px); }
.whais-send:disabled { opacity: .55; cursor: wait; transform: none; }
.whais-footer { padding: 0 15px 13px; background: #fff; color: #92978e; font-size: 10px; line-height: 1.4; text-align: center; }
.whais-contact { display: flex; flex-direction: column; gap: 8px; padding: 12px 15px; border-top: 1px solid #eef0eb; background: #fff; }
.whais-contact[hidden] { display: none !important; }
.whais-contact input { display: block; width: 100%; min-height: 40px; padding: 10px 12px; border: 1px solid #dfe3da; border-radius: 10px; background: #fff; color: #252820; font-size: 13px; }
.whais-contact input:focus { outline: none; border-color: #6c82a6; box-shadow: 0 0 0 3px rgba(6,39,93,.08); }
.whais-typing { display: table; margin: 0 0 14px; padding: 9px 12px; border: 1px solid #e4e8f0; border-radius: 5px 13px 13px 13px; background: #eef0f7; color: #72796d; font-size: 12px; }
@keyframes whais-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .whais-message, .whais-panel *, body button.whais-launcher { animation: none !important; transition: none !important; scroll-behavior: auto; } }
@media(max-width:480px) {
  body button.whais-launcher { right: 12px !important; bottom: 12px !important; width: 56px !important; height: 56px !important; min-width: 56px !important; min-height: 56px !important; }
  .whais-preview { right: 16px !important; bottom: 80px !important; }
  .whais-panel { right: 10px !important; bottom: 78px !important; width: calc(100vw - 20px); height: min(640px,calc(100vh - 96px)); max-height: calc(100vh - 96px); border-radius: 16px; }
  .whais-header { min-height: 64px; padding: 12px; }
}

/* v2.0 responsive styling overrides: prevent theme CSS from distorting the composer. */
.whais-panel {
  width: min(var(--whais-widget-width, 390px), calc(100vw - 28px)) !important;
  height: min(var(--whais-widget-height, 650px), calc(100vh - 120px)) !important;
  max-height: calc(100vh - 120px) !important;
  right: 22px !important;
  left: auto !important;
  border-radius: 18px !important;
}
body button.whais-launcher { background: var(--whais-primary, #66705B) !important; }
.whais-header { flex: 0 0 auto; min-width: 0; }
.whais-brand { min-width: 0; flex: 1 1 auto; }
.whais-avatar { overflow: hidden; flex-shrink: 0; }
.whais-avatar-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.whais-brand-copy { flex: 1 1 auto; overflow: hidden; }
.whais-brand-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whais-messages { flex: 1 1 auto; min-height: 90px; }
.whais-tools { flex: 0 0 auto; }
.whais-form {
  flex: 0 0 auto !important; align-items: flex-end !important; gap: 8px !important;
  width: 100% !important; min-width: 0 !important; padding: 10px 12px 12px !important;
}
.whais-input {
  flex: 1 1 auto !important; width: 0 !important; min-width: 0 !important; min-height: 48px !important;
  max-height: 120px !important; resize: vertical !important; border-radius: 13px !important;
  padding: 13px 14px !important; line-height: 1.45 !important; overflow-y: auto !important;
}
.whais-send { min-width: 54px !important; min-height: 46px !important; padding: 0 15px !important; border-radius: 12px !important; background: var(--whais-primary, #66705B) !important; }
.whais-send:hover, .whais-contact button:hover { filter: brightness(.93); }
.whais-human { max-width: 100%; white-space: normal; }
.whais-contact input { box-sizing: border-box; max-width: 100%; }
.whais-footer { flex: 0 0 auto; padding-top: 0; }
.whais-bubble { overflow-wrap: anywhere; }
.whais-preview { max-width: min(320px, calc(100vw - 28px)); }
.whais-preview-avatar { overflow: hidden; }
@media (max-width: 480px) {
  .whais-panel { left: 10px !important; right: 10px !important; bottom: 78px !important; width: auto !important; height: min(var(--whais-widget-height, 650px), calc(100vh - 96px)) !important; max-height: calc(100vh - 96px) !important; }
  .whais-form { padding: 8px 10px 10px !important; }
  .whais-input { min-height: 46px !important; }
}

.whais-privacy-link { display:inline-block; margin-top:4px; color:var(--whais-primary,#66705B) !important; text-decoration:underline; text-underline-offset:2px; }

/* v2.0.2: readable assistant formatting and native WooCommerce product cards. */
.whais-ai .whais-bubble { white-space: pre-wrap; }
.whais-inline-strong { font-weight: 750; color: #17243b; }
.whais-inline-link { color: #385a35 !important; text-decoration: underline !important; text-underline-offset: 2px; overflow-wrap: anywhere; }
.whais-product-results { display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 9px 0 13px; }
.whais-product-card { display: flex; align-items: stretch; gap: 11px; width: 100%; min-width: 0; padding: 10px; border: 1px solid #e2e7dd; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(28,40,25,.045); }
.whais-product-image-link { display: flex; flex: 0 0 88px; width: 88px; min-height: 88px; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: #f3f4f0; text-decoration: none !important; }
.whais-product-image { display: block; width: 100%; height: 100%; min-height: 88px; max-height: 112px; object-fit: contain; }
.whais-product-image-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 88px; color: #66705b; font-size: 13px; font-weight: 800; }
.whais-product-info { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; min-width: 0; gap: 5px; }
.whais-product-title { display: block; color: #202a1e !important; font-size: 12px; line-height: 1.4; font-weight: 750; text-decoration: none !important; overflow-wrap: anywhere; }
.whais-product-title:hover { text-decoration: underline !important; }
.whais-product-price { color: #202a1e; font-size: 13px; font-weight: 750; line-height: 1.3; }
.whais-product-stock { color: #72796d; font-size: 10px; line-height: 1.25; }
.whais-product-stock.is-in-stock { color: #287445; }
.whais-product-stock.is-out-of-stock { color: #a13e32; }
.whais-product-cta { display: inline-flex; align-items: center; justify-content: center; margin-top: auto; padding: 7px 10px; border-radius: 7px; background: var(--whais-primary,#66705B); color: #fff !important; font-size: 11px; font-weight: 700; line-height: 1.2; text-decoration: none !important; }
.whais-product-cta:hover { filter: brightness(.93); }
.whais-related-heading { margin: 4px 0 2px; color: #313b2d; font-size: 12px; font-weight: 750; }
.whais-product-card-compact .whais-product-image-link { flex-basis: 64px; width: 64px; min-height: 64px; }
.whais-product-card-compact .whais-product-image { min-height: 64px; max-height: 76px; }
.whais-product-card-compact .whais-product-image-placeholder { min-height: 64px; }
.whais-product-card-compact .whais-product-title { font-size: 11px; }
@media (max-width: 480px) {
  .whais-product-card { gap: 8px; padding: 8px; }
  .whais-product-image-link { flex-basis: 76px; width: 76px; min-height: 76px; }
  .whais-product-image { min-height: 76px; }
  .whais-product-image-placeholder { min-height: 76px; }
  .whais-product-card-compact .whais-product-image-link { flex-basis: 58px; width: 58px; min-height: 58px; }
  .whais-product-card-compact .whais-product-image { min-height: 58px; }
  .whais-product-card-compact .whais-product-image-placeholder { min-height: 58px; }
}
