:root {
  --replyprism-primary: #c8215f;
  --replyprism-primary-text: #ffffff;
  --replyprism-launcher-size: 56px;
}

#replyprism-wp-root {
  position: fixed; z-index: 999999; bottom: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", Roboto, sans-serif;
}
#replyprism-wp-root.replyprism-pos-right { right: 20px; }
#replyprism-wp-root.replyprism-pos-left  { left: 20px; }

.replyprism-wp-launcher {
  width: var(--replyprism-launcher-size); height: var(--replyprism-launcher-size); border-radius: 50%;
  background: var(--replyprism-primary); color: var(--replyprism-primary-text); border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
  overflow: hidden; padding: 0;
}
.replyprism-wp-launcher:hover { transform: scale(1.05); }
.replyprism-wp-launcher.hidden { display: none; }
.replyprism-launcher-emoji { font-size: calc(var(--replyprism-launcher-size) * 0.5); line-height: 1; }
.replyprism-launcher-img { width: 100%; height: 100%; object-fit: cover; }

/* Teaser bubble above launcher */
.replyprism-wp-teaser {
  position: absolute; bottom: calc(var(--replyprism-launcher-size) + 12px);
  background: #fff; color: #222; padding: 10px 32px 10px 14px;
  border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.15);
  font-size: 14px; max-width: 240px; cursor: pointer;
  animation: replyprism-teaser-in .3s ease;
}
.replyprism-pos-right .replyprism-wp-teaser { right: 0; }
.replyprism-pos-left  .replyprism-wp-teaser { left: 0; }
.replyprism-teaser-close {
  position: absolute; top: 4px; right: 6px;
  background: transparent; border: none; font-size: 18px; cursor: pointer; color: #888; line-height: 1;
}
@keyframes replyprism-teaser-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.replyprism-wp-panel {
  position: absolute; bottom: 0;
  width: 360px; max-width: calc(100vw - 40px);
  height: 520px; max-height: calc(100vh - 80px);
  background: #fff; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  display: none; flex-direction: column; overflow: hidden;
}
.replyprism-pos-right .replyprism-wp-panel { right: 0; }
.replyprism-pos-left  .replyprism-wp-panel { left: 0; }
.replyprism-wp-panel.open { display: flex; }

.replyprism-wp-header {
  background: var(--replyprism-primary); color: var(--replyprism-primary-text); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.replyprism-wp-header-inner { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.replyprism-header-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: rgba(255,255,255,.2);
}
.replyprism-wp-header-text { min-width: 0; }
.replyprism-wp-title { font-weight: 600; font-size: 15px; line-height: 1.2; }
.replyprism-wp-subtitle { font-size: 11px; opacity: .85; margin-top: 2px; }
.replyprism-wp-close {
  background: transparent; border: none; color: var(--replyprism-primary-text);
  font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px;
}

.replyprism-wp-log {
  flex: 1; overflow-y: auto; padding: 12px; background: #f7f7f9;
  display: flex; flex-direction: column; gap: 8px;
}
.replyprism-msg {
  max-width: 82%; padding: 8px 12px; border-radius: 14px;
  font-size: 14px; line-height: 1.4;
  transition: opacity .2s ease;
  word-wrap: break-word; overflow-wrap: break-word;
}
.replyprism-msg-user {
  align-self: flex-end; background: var(--replyprism-primary); color: var(--replyprism-primary-text);
  border-bottom-right-radius: 4px;
}
.replyprism-msg-assistant {
  align-self: flex-start; background: #fff; color: #222;
  border: 1px solid #eaeaea;
  border-bottom-left-radius: 4px;
}
.replyprism-msg a { color: inherit; text-decoration: underline; }
.replyprism-msg-user a { color: var(--replyprism-primary-text); }

.replyprism-wp-typing {
  padding: 6px 16px; font-size: 20px; color: #888; letter-spacing: 4px;
  animation: replyprism-pulse 1.2s infinite;
}
@keyframes replyprism-pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

.replyprism-wp-composer {
  display: flex; padding: 8px; border-top: 1px solid #eee; background: #fff; gap: 6px;
}
.replyprism-wp-input {
  flex: 1; border: 1px solid #ddd; border-radius: 8px;
  padding: 8px 10px; font-size: 14px; resize: none;
  font-family: inherit; max-height: 120px;
}
.replyprism-wp-input:focus { outline: none; border-color: var(--replyprism-primary); }
.replyprism-wp-send {
  background: var(--replyprism-primary); color: var(--replyprism-primary-text); border: none;
  padding: 0 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.replyprism-wp-send:disabled { opacity: .5; cursor: not-allowed; }

.replyprism-wp-branding {
  padding: 6px; text-align: center; font-size: 11px; color: #999; background: #fff;
  border-top: 1px solid #f0f0f0;
}

/* Header menu */
.replyprism-wp-menu {
  background: transparent; border: none; color: var(--replyprism-primary-text);
  font-size: 20px; cursor: pointer; padding: 0 6px; line-height: 1;
}
.replyprism-wp-menu-panel {
  position: absolute; top: 48px; right: 8px; background: #fff;
  border: 1px solid #eee; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 10; min-width: 180px; padding: 4px;
}
.replyprism-menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 12px; cursor: pointer; font-size: 13px; color: #333;
}
.replyprism-menu-item:hover { background: #f5f5f5; }

/* Composer extras */
.replyprism-extra-btns { display: flex; gap: 4px; align-items: flex-start; padding-top: 2px; }
.replyprism-icon-btn {
  background: #f0f0f1; border: none; border-radius: 8px; padding: 6px 10px;
  cursor: pointer; font-size: 16px;
}
.replyprism-icon-btn.recording { background: #d63638; color: #fff; animation: replyprism-pulse 1s infinite; }

/* Product cards */
.replyprism-cards { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; margin-top: 2px; }
.replyprism-card {
  min-width: 160px; max-width: 200px; background: #fff; border: 1px solid #eaeaea;
  border-radius: 10px; overflow: hidden; flex-shrink: 0;
}
.replyprism-card-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.replyprism-card-body { padding: 8px; }
.replyprism-card-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.replyprism-card-price { font-size: 12px; color: #333; margin-bottom: 6px; }
.replyprism-price-now { color: var(--replyprism-primary); font-weight: 700; }
.replyprism-price-old { text-decoration: line-through; color: #999; margin-left: 4px; font-size: 10px; }
/* Order is the primary action and gets the brand fill; View is the quiet one. Stacked
   rather than side by side — a 160px card cannot hold two readable buttons in a row,
   and Bangla labels are longer than the English. */
.replyprism-card-actions { display: flex; flex-direction: column; gap: 4px; }
.replyprism-card-order,
.replyprism-card-buy {
  display: block; text-align: center; padding: 5px 10px; border-radius: 6px;
  text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.3;
}
.replyprism-card-order {
  background: var(--replyprism-primary); color: var(--replyprism-primary-text);
}
.replyprism-card-buy {
  background: #f2f2f2; color: #333; border: 1px solid #e2e2e2;
}
.replyprism-card-order:hover { filter: brightness(0.94); }
.replyprism-card-buy:hover { background: #eaeaea; }

/* Lead capture form */
.replyprism-lead-form {
  background: #fff; border: 1px solid #eaeaea; border-radius: 10px;
  padding: 12px; margin: 4px 0; display: flex; flex-direction: column; gap: 6px;
}
.replyprism-lead-text { font-size: 13px; color: #333; margin-bottom: 2px; }
.replyprism-lead-form input {
  border: 1px solid #ddd; border-radius: 6px; padding: 6px 8px; font-size: 13px;
}

/* Consent gate */
.replyprism-consent-box {
  background: #fff; border: 1px solid #eaeaea; border-radius: 10px;
  padding: 16px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px;
}
.replyprism-consent-box p { font-size: 13px; color: #333; margin: 0 0 8px; }

@media (max-width: 480px) {
  .replyprism-wp-panel {
    width: calc(100vw - 20px); height: calc(100vh - 100px);
    bottom: calc(var(--replyprism-launcher-size) + 20px);
  }
  .replyprism-pos-right .replyprism-wp-panel { right: -10px; }
  .replyprism-pos-left  .replyprism-wp-panel { left: -10px; }
  #replyprism-wp-root { bottom: 12px; }
  #replyprism-wp-root.replyprism-pos-right { right: 12px; }
  #replyprism-wp-root.replyprism-pos-left  { left: 12px; }
}
