.poppy-simple-chat-wrapper{
  --poppy-scale: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: inherit;
  box-sizing: border-box;
  font-size: calc(16px * var(--poppy-scale));
}
.poppy-simple-chat-wrapper *{box-sizing:border-box}

.poppy-simple-chat-header h2{margin:0 0 .25em;font-size:1.4em;text-align:center}
.poppy-simple-chat-header p{margin:0 0 1em;font-size:.95em;color:#555;text-align:center}

/* Chat area: green outline */
.poppy-simple-messages{
  background:#fff;
  border-radius:16px;
  border:2px solid #4caf50;
  padding:1em;
  min-height:10em;
  max-height:26em;
  overflow-y:auto;
  margin-bottom:1em;
}

.poppy-simple-message{margin-bottom:.75em;line-height:1.5;font-size:1em}
.poppy-simple-message-user{text-align:right}
.poppy-simple-message-user span{display:inline-block;background:#e0f2ff;color:#222;padding:.4em .75em;border-radius:14px;max-width:80%}
.poppy-simple-message-assistant span{display:inline-block;background:#f1f8e9;color:#222;padding:.4em .75em;border-radius:14px;max-width:80%}

/* Formatted content */
.poppy-simple-message-assistant span p{margin:.35em 0}
.poppy-simple-message-assistant span ul,
.poppy-simple-message-assistant span ol{margin:.35em 0 .35em 1.25em;padding:0}
.poppy-simple-message-assistant span li{margin:.2em 0}
.poppy-simple-message-assistant span strong{font-weight:700}

.poppy-simple-typing{font-size:.95em;color:#777}

/* Input pill: transparent, black outline, no inner box */
.poppy-simple-form{margin:0}
.poppy-simple-input-wrap{
  width:100%;
  background:transparent !important;
  border-radius:999px;
  border:2px solid #000;
  padding:.25em .5em;
  box-shadow:none !important;
  overflow:hidden;
}
.poppy-simple-chat-wrapper input.poppy-simple-input{
  width:100%;
  border:none !important;
  outline:none !important;
  padding:.75em .9em;
  font-size:1em;
  border-radius:999px;
  background:transparent !important;
  background-color: transparent !important;
  color: #000 !important;
  caret-color: #000 !important;
  -webkit-text-fill-color: #000 !important;
box-shadow:none !important;
  -webkit-appearance:none;
  appearance:none;
}
.poppy-simple-chat-wrapper input.poppy-simple-input:focus{
  outline:none !important;
  box-shadow:none !important;
}
.poppy-simple-chat-wrapper input.poppy-simple-input::placeholder{color:#777}

/* Big button */
.poppy-simple-send-btn{border:none;cursor:pointer;white-space:nowrap}
.poppy-simple-send-btn-big{
  margin-top:.65em;
  width:25%;
  min-width:220px;
  max-width:360px;
  display:block;
  margin-left:auto;
  margin-right:auto;
  background:#e0522d;
  color:#fff;
  border-radius:14px;
  padding:1em 1.1em;
  font-size:1.18em;
  font-weight:700;
  box-shadow:0 3px 10px rgba(0,0,0,.10);
}
.poppy-simple-send-btn-big:hover{opacity:.95}
.poppy-simple-send-btn[disabled]{opacity:.6;cursor:not-allowed}

/* Toolbar: light grey background, green buttons (force override theme styles) */
.poppy-simple-toolbar{
  margin-top: .9em;
  padding: .75em .75em;
  border-radius: 14px;
  background: #f1f1f1;
  border: 1px solid #d7d7d7;
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
  justify-content: center;
  align-items: center;
}
.poppy-simple-chat-wrapper .poppy-tool-btn{
  border: 1px solid rgba(0,0,0,.25) !important;
  background: #4caf50 !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: .45em .85em !important;
  font-size: .95em !important;
  cursor: pointer;
  box-shadow:none !important;
}
.poppy-simple-chat-wrapper .poppy-tool-btn:hover{filter:brightness(1.05)}
.poppy-simple-chat-wrapper .poppy-tool-btn:active{transform: translateY(1px)}
.poppy-simple-chat-wrapper .poppy-tool-btn[disabled]{opacity:.6;cursor:not-allowed}

.poppy-simple-helper-text{margin-top:.7em;text-align:center;font-size:.85em;color:#666}

@media (max-width:600px){
  .poppy-simple-chat-wrapper{padding:1rem .75rem}
  .poppy-simple-messages{min-height:9em;max-height:22em}
}



.poppy-extras{
  margin: .75em 0 0;
}
.poppy-extras-toggle{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border:1px solid #d7d7d7;
  background:#f7f7f7;
  border-radius:14px;
  padding:.7em .9em;
  cursor:pointer;
}
.poppy-extras-title{font-weight:700}
.poppy-extras-chevron{font-size:1.1em; transition: transform .2s ease}
.poppy-extras-toggle[aria-expanded="true"] .poppy-extras-chevron{transform: rotate(180deg)}
.poppy-extras-panel{
  margin-top:.5em;
  border:1px solid #d7d7d7;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.poppy-video-wrap{
  position:relative;
  width:100%;
  aspect-ratio: 16 / 9;
  background:#000;
}
.poppy-video-wrap iframe,
.poppy-video-wrap video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* Mini mission button bar (keeps UI compact) */
.poppy-mini-mission-btn{
  border:1px solid rgba(0,0,0,.25);
  background:#111;
  color:#fff;
  border-radius:999px;
  padding:.45em 1em;
  font-size:.95em;
  cursor:pointer;
}
.poppy-mini-mission-btn:hover{filter:brightness(1.05)}
.poppy-mini-mission-btn:active{transform: translateY(1px)}

/* Mini mission modal (does not change page height) */
.poppy-mission-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
}
.poppy-mission-modal[hidden]{display:none}
.poppy-mission-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
}
.poppy-mission-modal-card{
  position:relative;
  width:min(520px, 92vw);
  background:#fff;
  border-radius:18px;
  border:2px solid #4caf50;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
  overflow:hidden;
}
.poppy-mission-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:.8em 1em;
  background:#f1f8e9;
  border-bottom:1px solid #e0e0e0;
}
.poppy-mission-close{
  border:none;
  background:transparent;
  font-size:1.05em;
  cursor:pointer;
  padding:.2em .4em;
}
.poppy-mission-modal-body{padding:1em}
.poppy-mission-text{margin:0; font-size:1.05em; line-height:1.5}
.poppy-mission-modal-actions{
  display:flex;
  gap:.6em;
  justify-content:flex-end;
  padding:.9em 1em 1em;
}
.poppy-mission-modal-actions button{
  border:1px solid rgba(0,0,0,.25);
  border-radius:12px;
  padding:.55em .9em;
  cursor:pointer;
}
.poppy-mission-new{background:#4caf50; color:#fff}
.poppy-mission-done{background:#f1f1f1}

/* On very small screens, keep everything tight */
@media (max-width:600px){
  .poppy-extras-toggle{padding:.65em .85em}
  .poppy-mini-mission-btn{font-size:.92em}
}

/* Inline video above chat (no controls) */
.poppy-video-inline{
  width:100%;
  margin:.75em 0 0;
  border-radius:16px;
  overflow:hidden;
  border:2px solid #4caf50;
  background:#000;
  aspect-ratio: 16 / 9;
  position:relative;
}
.poppy-video-inline iframe,
.poppy-video-inline video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}


/* v1.2.6: ensure pill input is readable on light backgrounds */
.poppy-simple-chat-wrapper .poppy-simple-input{
  background: transparent !important;
  color: #000 !important;
}
.poppy-simple-chat-wrapper .poppy-simple-input::placeholder{
  color: rgba(0,0,0,.45) !important;
}
.poppy-simple-chat-wrapper .poppy-simple-input:focus{
  outline: none !important;
}


/* v1.3.0 Mobile app-mode layout */
.poppy-simple-input-pill-with-btn{
  display:flex;
  align-items:center;
  gap:.5em;
  padding:.35em .45em;
}
.poppy-simple-ask-inpill{
  border:none;
  background:#111;
  color:#fff;
  border-radius:999px;
  padding:.55em .95em;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.poppy-simple-ask-inpill:hover{filter:brightness(1.05)}
.poppy-simple-ask-inpill:active{transform:translateY(1px)}

/* Bottom bar combines mission + tools */
.poppy-bottom-bar{
  display:flex;
  gap:.5em;
  align-items:center;
  justify-content:space-between;
  padding:.6em .6em;
  background:#f2f2f2;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.15);
  margin-top:.6em;
}
.poppy-bottom-tools{
  display:flex;
  gap:.5em;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.poppy-bottom-tools .poppy-tool-btn{
  margin:0 !important;
}
.poppy-mini-mission-btn{
  border:1px solid rgba(0,0,0,.25);
  background:#111;
  color:#fff;
  border-radius:999px;
  padding:.45em .9em;
  font-size:.95em;
  cursor:pointer;
}
.poppy-mini-mission-btn:hover{filter:brightness(1.05)}
.poppy-mini-mission-btn:active{transform: translateY(1px)}

/* Make video fill without black bars (crop if needed) */
.poppy-video-inline video{
  object-fit: cover;
}

/* Fullscreen app style on phones */
@media (max-width: 700px){
  .poppy-simple-chat-wrapper{
    height: 100svh;
    padding: .75rem .75rem;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  /* Compact video: fixed strip */
  .poppy-video-inline{
    margin:0 0 .6em 0;
    height: clamp(120px, 22svh, 180px);
    aspect-ratio: auto;
    flex: 0 0 auto;
  }

  /* Messages take remaining space and scroll internally */
  .poppy-simple-messages{
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    margin-bottom: .6em;
  }

  /* Input row stays compact */
  .poppy-simple-form{
    flex: 0 0 auto;
  }

  /* Bottom bar stays visible */
  .poppy-bottom-bar{
    flex: 0 0 auto;
    margin-top: .55em;
  }

  /* Make tool buttons compact on mobile */
  .poppy-bottom-tools .poppy-tool-btn{
    padding:.45em .7em;
    font-size:.92em;
  }
}


/* v1.3.1: mobile polish (thick border, bigger video, input button right, fewer tools) */
.poppy-simple-chat-wrapper{
  border: 6px solid #2e7d32 !important;
  border-radius: 22px !important;
}

/* Make video show more of the scene (less crop) */
@media (max-width: 700px){
  .poppy-video-inline{
    height: clamp(160px, 30svh, 240px) !important;
  }
  /* Show whole frame more often. If the source video has padding, you may see small bars.
     We colour the background to match the page so it doesn't look like black bars. */
  .poppy-video-inline{
    background: #e8f5e9 !important;
  }
  .poppy-video-inline video{
    object-fit: contain !important;
    background: transparent !important;
  }

  /* Input pill: button on the right, input takes remaining space */
  .poppy-simple-input-pill-with-btn{
    gap:.55em !important;
  }
  .poppy-simple-input{
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .poppy-simple-ask-inpill{
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  /* Bottom bar tighter so it fits without scrolling */
  .poppy-bottom-bar{
    padding: .55em .55em !important;
    gap: .45em !important;
  }
  .poppy-bottom-tools{
    gap: .45em !important;
  }
  .poppy-bottom-tools .poppy-tool-btn{
    padding: .42em .62em !important;
    font-size: .9em !important;
  }
  .poppy-mini-mission-btn{
    padding: .42em .75em !important;
    font-size: .9em !important;
  }
}


/* v1.3.2: sleek pill input with integrated button (mobile + desktop) */
.poppy-simple-input-pill-with-btn{
  position: relative !important;
  border: 3px solid #000 !important;
  border-radius: 999px !important;
  padding: .6em .75em !important;
  background: transparent !important;
  overflow: hidden !important;
}

.poppy-simple-input-pill-with-btn .poppy-simple-input{
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
  padding: .4em 9.5em .4em .4em !important; /* space for button on right */
  font-size: 1.05em !important;
  color: #000 !important;
}

.poppy-simple-input-pill-with-btn .poppy-simple-input::placeholder{
  color: rgba(0,0,0,.45) !important;
}

/* Integrated "Ask Poppy" button */
.poppy-simple-ask-inpill{
  position: absolute !important;
  right: .55em !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  border: none !important;
  border-radius: 999px !important;
  padding: .55em 1.05em !important;
  font-weight: 800 !important;
  letter-spacing: .2px !important;
  color: #fff !important;
  cursor: pointer !important;
  background: linear-gradient(180deg, #b46bff 0%, #6b2bbd 100%) !important;
  box-shadow: 0 6px 12px rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.35) !important;
  white-space: nowrap !important;
}

.poppy-simple-ask-inpill:active{
  transform: translateY(-50%) scale(.98) !important;
}

/* Slightly smaller button on very small screens */
@media (max-width: 380px){
  .poppy-simple-input-pill-with-btn .poppy-simple-input{
    padding-right: 8.3em !important;
  }
  .poppy-simple-ask-inpill{
    padding: .5em .9em !important;
  }
}


/* v1.3.3: ensure Ask button stays inside pill */
.poppy-simple-input-pill-with-btn{ position: relative !important; }
.poppy-simple-ask-inpill{ z-index: 5 !important; }


/* v1.3.4: video + borders + mobile fit */
.poppy-video-inline{
  border: none !important;
  background: transparent !important;
}

/* Video: fill frame (no side bars). Crops slightly if needed. */
.poppy-video-inline video{
  object-fit: cover !important;
  object-position: center center !important;
  background: transparent !important;
}
.poppy-video-inline iframe{
  background: transparent !important;
}

/* Chat window border to yellow */
.poppy-simple-messages{
  border-color: #f5c400 !important;
}

/* Mobile: ensure everything fits in viewport without page scroll */
@media (max-width: 700px){
  .poppy-simple-chat-wrapper{
    box-sizing: border-box !important;
    height: 100dvh !important; /* better on mobile browser UI */
    padding: .55rem .55rem calc(.55rem + env(safe-area-inset-bottom)) .55rem !important;
    overflow: hidden !important;
  }

  /* Slightly reduce fixed parts to prevent leaking */
  .poppy-video-inline{
    margin: 0 0 .5em 0 !important;
    height: clamp(150px, 26dvh, 210px) !important;
    border-radius: 18px !important;
  }

  .poppy-simple-messages{
    margin-bottom: .45em !important;
  }

  .poppy-bottom-bar{
    margin-top: .45em !important;
  }
}


/* v1.3.5: true app-style fullscreen on mobile (no page scroll, minimal whitespace) */
@media (max-width: 700px){
  /* Make the whole widget behave like an app screen */
  .poppy-simple-chat-container{
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important; /* keeps it clean on blank pages */
    overflow: hidden !important;
  }

  .poppy-simple-chat-wrapper{
    height: 100dvh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 6px !important; /* tiny inner gutter */
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 0 !important; /* flush to screen edges */
  }

  /* Make video flush with the app border (no extra gap) */
  .poppy-video-inline{
    margin: 0 !important;
    border-radius: 14px !important;
    height: clamp(170px, 32dvh, 260px) !important;
  }

  /* Tighten spacing between sections */
  .poppy-simple-messages{
    margin: 6px 0 !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  .poppy-simple-form{
    margin: 0 !important;
  }

  .poppy-bottom-bar{
    margin: 6px 0 0 0 !important;
  }
}


/* v1.3.6: true fullscreen + flush video + brighter border */
@media (max-width: 700px){
  .poppy-simple-chat-wrapper{
    border: 8px solid #e0522d !important; /* brighter + thicker */
    padding: 0 !important;               /* flush to border */
    border-radius: 0 !important;
  }

  .poppy-video-inline{
    margin: 0 !important;
    border-radius: 0 !important;
    height: clamp(190px, 34dvh, 280px) !important;
  }

  /* Add a tiny inner spacing for the rest of the UI without affecting video flush */
  .poppy-simple-messages{
    margin: 8px 8px 6px 8px !important;
    border-radius: 18px !important;
  }

  .poppy-simple-form{
    margin: 0 8px !important;
  }

  .poppy-bottom-bar{
    margin: 6px 8px 8px 8px !important;
  }
}

/* When mounted fullscreen, prevent page scroll */
html.poppy-lock, body.poppy-lock{
  height: 100% !important;
  overflow: hidden !important;
}


/* v1.3.7: rounded video + spacing fixes (no overlaps) */
.poppy-video-inline{
  border-radius: 18px !important;
  overflow: hidden !important;
}
.poppy-video-inline video{
  border-radius: 18px !important;
}

/* Reduce the big gap between video and chat, and stop Ask button overlapping toolbar */
@media (max-width: 700px){
  .poppy-video-inline{
    border-radius: 18px !important;
    margin: 0 !important;
  }

  /* Bring chat box closer to video */
  .poppy-simple-messages{
    margin-top: 6px !important;
  }

  /* Give the input row its own space so the Ask button never sits over the toolbar */
  .poppy-simple-form{
    margin: 0 8px 10px 8px !important; /* bottom gap added */
  }

  .poppy-bottom-bar{
    margin: 0 8px 8px 8px !important;
  }

  /* Slightly compact the input pill + button for tighter fit */
  .poppy-simple-input-pill-with-btn{
    padding: .5em .65em !important;
  }
  .poppy-simple-ask-inpill{
    padding: .5em .95em !important;
    right: .5em !important;
  }
}


/* v1.3.8: input text no overlap + video border to match outer frame */

/* Give the input enough room so "here" is never covered by the Ask button */
.poppy-simple-input-pill-with-btn .poppy-simple-input{
  padding-right: 12.2em !important; /* space for "Ask Poppy" button */
}

@media (max-width: 700px){
  .poppy-simple-input-pill-with-btn .poppy-simple-input{
    padding-right: 12.6em !important;
  }
  .poppy-simple-ask-inpill{
    font-size: .98em !important;
  }
}

/* Very small phones */
@media (max-width: 380px){
  .poppy-simple-input-pill-with-btn .poppy-simple-input{
    padding-right: 11.2em !important;
  }
  .poppy-simple-ask-inpill{
    padding: .48em .85em !important;
  }
}

/* Video: add a border that matches the outer bright green */
.poppy-video-inline{
  border: 6px solid #e0522d !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.poppy-video-inline video{
  border-radius: 12px !important; /* sits inside the border nicely */
}


/* v1.3.9: fix placeholder truncation + fill corner gaps */
.poppy-simple-input-pill-with-btn .poppy-simple-input{
  /* revert from oversized padding that caused big blank space */
  padding-right: 9.8em !important;
}

@media (max-width: 700px){
  /* Make any gaps around rounded video blend with the outer green */
  .poppy-simple-chat-wrapper{
    background: #e0522d !important; /* fills the corner gaps you circled */
  }

  /* Slightly smaller right padding on phones so placeholder isn't cut too early */
  .poppy-simple-input-pill-with-btn .poppy-simple-input{
    padding-right: 9.6em !important;
  }

  /* Keep button compact */
  .poppy-simple-ask-inpill{
    padding: .48em .9em !important;
  }
}

@media (max-width: 380px){
  .poppy-simple-input-pill-with-btn .poppy-simple-input{
    padding-right: 8.9em !important;
  }
}


/* v1.4.0: white input pill + neater bottom tools on mobile */

/* Input pill should be white (not green) */
.poppy-simple-input-pill-with-btn{
  background: #fff !important;
}

/* Ensure input itself stays transparent inside the white pill */
.poppy-simple-input-pill-with-btn .poppy-simple-input{
  background: transparent !important;
}

/* Neaten the bottom tool area */
@media (max-width: 700px){
  .poppy-bottom-bar{
    background: rgba(255,255,255,.86) !important;
    border: 2px solid rgba(0,0,0,.18) !important;
    border-radius: 16px !important;
    padding: 10px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  /* Make buttons consistent */
  .poppy-mini-mission-btn,
  .poppy-tool-btn{
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    font-size: 1.02em !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  /* Keep "Ask Poppy" button inside pill nicely */
  .poppy-simple-ask-inpill{
    top: 50% !important;
  }

  /* Slightly reduce green background showing behind controls */
  .poppy-simple-form{
    margin-bottom: 10px !important;
  }
}


/* v1.4.1: compact bottom toolbar to free space for chat */
@media (max-width: 700px){
  .poppy-bottom-bar{
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 14px !important;
  }

  /* Make Mini Mission smaller (no longer a huge tile) */
  .poppy-bottom-bar{
    grid-template-columns: 1fr 1fr !important;
  }

  /* If Mini Mission has its own class, keep it normal size */
  .poppy-mini-mission-btn{
    min-height: 44px !important;
    font-size: .98em !important;
  }

  .poppy-tool-btn{
    min-height: 44px !important;
    font-size: .98em !important;
  }

  /* Reduce inner padding in buttons */
  .poppy-mini-mission-btn,
  .poppy-tool-btn{
    padding: .55em .75em !important;
    border-radius: 12px !important;
  }
}


/* v1.4.2: make toolbar buttons genuinely small on mobile */
@media (max-width: 700px){
  .poppy-bottom-bar{
    padding: 6px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .poppy-mini-mission-btn,
  .poppy-tool-btn{
    width: auto !important;
    min-height: 34px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important; /* small pills */
    font-size: 0.86em !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  /* Keep labels readable but compact */
  .poppy-mini-mission-btn{ font-weight: 700 !important; }
  .poppy-tool-btn{ font-weight: 700 !important; }

  /* If the buttons still inherit large line-height, clamp it */
  .poppy-mini-mission-btn,
  .poppy-tool-btn{
    line-height: 1 !important;
  }
}


/* v1.4.6: orange frame (matches Mini Mission) + clearer "3D card" depth */

/* Slight lift on the whole app */
.poppy-simple-chat-wrapper{
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

/* Main blocks: drop shadow + gentle inset highlight/shade */
.poppy-video-inline,
.poppy-simple-messages,
.poppy-simple-input-pill-with-btn,
.poppy-bottom-bar{
  box-shadow:
    0 14px 26px rgba(0,0,0,.18),
    inset 0 2px 0 rgba(255,255,255,.55),
    inset 0 -2px 0 rgba(0,0,0,.10);
}

/* Ensure shadows are not clipped */
.poppy-simple-chat-wrapper,
.poppy-video-inline,
.poppy-simple-messages,
.poppy-simple-input-pill-with-btn,
.poppy-bottom-bar{
  overflow: visible !important;
}


/* v1.4.7: make chat box border darker + remove odd halo/shade on orange frame */

/* Darker border so the white chat box stands out */
.poppy-simple-messages{
  border-color: #6B3A00 !important; /* deep warm brown/orange */
}

/* If the chat container also uses an outline, keep it aligned */
.poppy-simple-messages{
  box-shadow: 0 10px 18px rgba(0,0,0,.16) !important;
}

/* Remove the strange grey/dirty halo around the orange frame by cleaning wrapper shadows */
.poppy-simple-chat-wrapper{
  box-shadow: 0 12px 22px rgba(0,0,0,.14) !important; /* cleaner shadow */
  filter: none !important;
}

/* If any inset shading was making the orange look muddy, neutralise it */
.poppy-video-inline,
.poppy-simple-input-pill-with-btn,
.poppy-bottom-bar{
  box-shadow: 0 10px 18px rgba(0,0,0,.14) !important;
}


/* v1.4.8 overflow fix: keep messages inside the chat box (no leaking down the page) */
.poppy-simple-chat-wrapper{
  overflow: hidden;
}

.poppy-simple-messages{
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}



/* v1.4.9: hard stop overflow - keep all chat inside the chat box, scroll inside the messages area only */
.poppy-simple-chat-container, .poppy-simple-chat-wrapper, .poppy-simple-messages, .poppy-simple-form, .poppy-bottom-bar{
  box-sizing:border-box;
}
.poppy-simple-chat-wrapper{
  min-height:0 !important;
}
.poppy-simple-messages{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  contain: content;
}
.poppy-msg, .poppy-user, .poppy-assistant{
  overflow-wrap:anywhere;
  word-break:break-word;
}
