/* Tapplify AI Concierge widget - isolated test integration */
.tap-ai-launcher,
.tap-ai-widget,
.tap-ai-widget * { box-sizing: border-box; }

.tap-ai-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 950;
  min-height: 58px;
  padding: 8px 18px 8px 9px;
  border: 0;
  border-radius: 999px;
  background: #17362c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 16px 42px rgba(23, 54, 44, .22);
  transition: transform .18s ease, box-shadow .18s ease, opacity .16s ease;
}
.tap-ai-launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(23, 54, 44, .26); }
.tap-ai-launcher:focus-visible { outline: 3px solid rgba(136, 85, 255, .35); outline-offset: 3px; }
.tap-ai-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; transform: translateY(6px); }
.tap-ai-launcher__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #8855ff;
  font-size: 19px;
  line-height: 1;
}

.tap-ai-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 951;
  width: min(398px, calc(100vw - 32px));
  height: min(650px, calc(100dvh - 48px));
  border: 1px solid rgba(23, 54, 44, .1);
  border-radius: 26px;
  background: #fffdf8;
  color: #17362c;
  box-shadow: 0 28px 90px rgba(23, 54, 44, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  pointer-events: none;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.tap-ai-widget.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; visibility: visible; }

.tap-ai-widget__header {
  flex: 0 0 auto;
  padding: 16px 15px 15px 17px;
  border-bottom: 1px solid #ebe7de;
  background: rgba(255, 253, 248, .96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tap-ai-widget__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tap-ai-widget__logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #17362c;
  overflow: hidden;
  flex: 0 0 auto;
}
.tap-ai-widget__logo img { width: 24px; height: 24px; object-fit: contain; }
.tap-ai-widget__title { margin: 0; font-size: 14px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.tap-ai-widget__status { margin-top: 4px; color: #707870; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.tap-ai-widget__dot { width: 7px; height: 7px; border-radius: 50%; background: #2aa44f; flex: 0 0 auto; }
.tap-ai-widget__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f0ede6;
  color: #17362c;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.tap-ai-widget__close:hover { background: #e9e5dc; }
.tap-ai-widget__close:focus-visible { outline: 3px solid rgba(136, 85, 255, .28); outline-offset: 2px; }

.tap-ai-widget__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 17px 14px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.tap-ai-widget__welcome { padding: 3px 2px 8px; }
.tap-ai-widget__welcome h2 { margin: 0 0 7px; font-size: 23px; line-height: 1.08; letter-spacing: -.035em; }
.tap-ai-widget__welcome p { margin: 0; color: #6f766f; font-size: 13px; line-height: 1.5; }
.tap-ai-widget__quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 14px; }
.tap-ai-widget__quick-action {
  min-height: 64px;
  border: 1px solid #e5dfd5;
  border-radius: 16px;
  background: #fff;
  color: #17362c;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tap-ai-widget__quick-action b { align-self: flex-end; color: #8855ff; font-size: 15px; font-weight: 700; }
.tap-ai-widget__quick-action:hover { background: #faf8f3; border-color: #d8d0c4; transform: translateY(-1px); }
.tap-ai-widget__quick-action:focus-visible { outline: 3px solid rgba(136, 85, 255, .24); outline-offset: 2px; }
.tap-ai-widget__ask-label { display: flex; align-items: center; gap: 9px; margin: 2px 0 0; color: #8b908b; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.tap-ai-widget__ask-label::after { content: ""; height: 1px; flex: 1; background: #ebe6dc; }
.tap-ai-widget__history-summary { margin: 0 0 15px; padding: 12px 13px; border-radius: 15px; background: #f3f0ea; border: 1px solid #ebe5dc; }
.tap-ai-widget__history-summary span { display: block; margin-bottom: 4px; color: #818781; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tap-ai-widget__history-summary strong { display: block; color: #17362c; font-size: 12px; line-height: 1.4; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap-ai-widget__suggestions { display: grid; gap: 8px; margin: 17px 0 10px; }
.tap-ai-widget__suggestion {
  width: 100%;
  border: 1px solid #e7e2d9;
  border-radius: 15px;
  background: #fff;
  color: #17362c;
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tap-ai-widget__suggestion:hover { background: #faf8f3; border-color: #dcd5c9; transform: translateY(-1px); }

.tap-ai-widget__row { display: flex; margin: 12px 0; }
.tap-ai-widget__row--user { justify-content: flex-end; }
.tap-ai-widget__row--ai { justify-content: flex-start; }
.tap-ai-widget__bubble {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 17px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tap-ai-widget__row--user .tap-ai-widget__bubble { background: #17362c; color: #fff; border-bottom-right-radius: 5px; }
.tap-ai-widget__row--ai .tap-ai-widget__bubble { background: #f1eee8; color: #17362c; border-bottom-left-radius: 5px; }
.tap-ai-widget__typing { display: inline-flex; gap: 4px; align-items: center; min-height: 16px; }
.tap-ai-widget__typing span { width: 5px; height: 5px; border-radius: 50%; background: #7e817d; animation: tap-ai-bounce 1.1s infinite ease-in-out; }
.tap-ai-widget__typing span:nth-child(2) { animation-delay: .12s; }
.tap-ai-widget__typing span:nth-child(3) { animation-delay: .24s; }
@keyframes tap-ai-bounce { 0%,60%,100%{transform:translateY(0);opacity:.45} 30%{transform:translateY(-4px);opacity:1} }
.tap-ai-widget__error { margin: 10px 0; padding: 10px 12px; border: 1px solid #ead9d9; border-radius: 13px; background: #fff7f7; color: #8a3030; font-size: 12px; line-height: 1.45; }

.tap-ai-widget__composer-wrap { flex: 0 0 auto; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #ebe7de; background: #fffdf8; }
.tap-ai-widget__composer { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #ddd7cc; border-radius: 18px; padding: 8px 8px 8px 12px; background: #fff; }
.tap-ai-widget__input { width: 100%; min-height: 25px; max-height: 105px; resize: none; border: 0; outline: 0; background: transparent; color: #17362c; padding: 3px 0; font: inherit; font-size: 13px; line-height: 1.45; }
.tap-ai-widget__input::placeholder { color: #979b96; }
.tap-ai-widget__send { width: 37px; height: 37px; flex: 0 0 auto; border: 0; border-radius: 12px; background: #8855ff; color: #fff; cursor: pointer; display: grid; place-items: center; font: inherit; font-size: 17px; }
.tap-ai-widget__send:disabled { opacity: .4; cursor: not-allowed; }
.tap-ai-widget__foot { margin-top: 7px; text-align: center; color: #999d98; font-size: 10px; }

body.live-demo-open .tap-ai-launcher,
body.live-demo-open .tap-ai-widget { visibility: hidden !important; pointer-events: none !important; }

@media (max-width: 640px) {
  .tap-ai-launcher { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 56px; }
  .tap-ai-widget { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; transform: translateY(18px); }
  .tap-ai-widget.is-open { transform: translateY(0); }
  .tap-ai-widget__header { padding-top: calc(15px + env(safe-area-inset-top, 0px)); }
  .tap-ai-widget__messages { padding-left: 16px; padding-right: 16px; }
  .tap-ai-widget__quick-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tap-ai-launcher, .tap-ai-widget, .tap-ai-widget__suggestion { transition: none; }
  .tap-ai-widget__typing span { animation: none; }
}
