#digistream-ai-root { --dsai-ink:#172620; --dsai-green:#075e47; --dsai-lime:#d1f590; font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color:var(--dsai-ink); text-align:left; position:relative; z-index:2147483000; }
#digistream-ai-root *,#digistream-ai-root *::before,#digistream-ai-root *::after { box-sizing:border-box; }
#digistream-ai-root [hidden] { display:none!important; }
#digistream-ai-root button,#digistream-ai-root textarea,#digistream-ai-root select { font:inherit; letter-spacing:normal; text-transform:none; margin:0; }
#digistream-ai-root button { cursor:pointer; border:0; min-height:44px; box-shadow:none; transition:background .18s,transform .18s; }
#digistream-ai-root button:disabled { opacity:.5; cursor:not-allowed; }
#digistream-ai-root button:focus-visible,#digistream-ai-root a:focus-visible,#digistream-ai-root select:focus-visible { outline:3px solid #379d80; outline-offset:3px; }
#digistream-ai-root svg { width:22px; height:22px; flex:none; }
#digistream-ai-root .dsai-launcher {
  position:fixed;
  right:18px;
  bottom:max(16px,calc(env(safe-area-inset-bottom) + 16px));
  width:54px;
  min-width:54px;
  height:54px;
  min-height:54px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:var(--dsai-green);
  border:2px solid #ffffff;
  box-shadow:0 8px 24px #00382742,0 0 0 0 rgba(7,94,71,.45);
  line-height:1;
  overflow:visible;
  isolation:isolate;
  animation:dsai-launch-pulse 1.65s ease-in-out infinite;
}
#digistream-ai-root .dsai-launcher::before {
  content:"";
  position:absolute;
  inset:-5px;
  border:2px solid rgba(7,94,71,.42);
  border-radius:50%;
  z-index:-1;
  animation:dsai-launch-ring 1.65s ease-out infinite;
}
#digistream-ai-root .dsai-launcher:hover {
  background:#044733;
  transform:translateY(-2px) scale(1.04);
}
#digistream-ai-root .dsai-photo-mark {
  position:relative;
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  overflow:hidden;
  background:#fff;
}
#digistream-ai-root .dsai-photo-mark img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 32%;
  border-radius:50%;
  transform:scale(1.16);
}
#digistream-ai-root .dsai-photo-badge {
  position:absolute;
  right:1px;
  bottom:1px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#075e47;
  color:#fff;
  border:1.5px solid #fff;
  font-size:8px;
  font-weight:800;
  line-height:1;
  letter-spacing:.2px;
}
#digistream-ai-root .dsai-panel { position:fixed; right:24px; bottom:20px; width:390px; height:680px; max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); display:flex; flex-direction:column; background:#fff; border:1px solid #dbe7dd; border-radius:25px; overflow:hidden; box-shadow:0 24px 80px #102d2530; animation:dsai-enter .22s ease-out; }
#digistream-ai-root .dsai-header { background:#fff; border-bottom:1px solid #dfebde; padding:18px 16px; display:flex; align-items:center; gap:11px; }
#digistream-ai-root .dsai-avatar { display:grid; place-items:center; width:43px; height:43px; border-radius:15px; background:var(--dsai-green); color:var(--dsai-lime); font-size:21px; flex:none; }
#digistream-ai-root .dsai-heading { flex:1; min-width:0; }
#digistream-ai-root .dsai-heading strong { display:block; font-size:18px; font-weight:700; letter-spacing:-.4px; }
#digistream-ai-root .dsai-heading span { display:block; font-size:10px; color:#527062; }
#digistream-ai-root .dsai-heading i { display:inline-block; width:6px; height:6px; margin-right:4px; background:#278265; border-radius:50%; }
#digistream-ai-root .dsai-icon { background:transparent; color:inherit; font-size:25px; padding:0; width:44px; flex:none; border-radius:12px; }
#digistream-ai-root .dsai-icon:hover { background:#d9e8da; }
#digistream-ai-root .dsai-topics { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:15px 15px 9px; }
#digistream-ai-root .dsai-topics button { background:#f7f8f5; color:#456151; border:1px solid #e0e6dd; border-radius:12px; padding:9px 7px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
#digistream-ai-root .dsai-topics button[aria-pressed="true"] { background:var(--dsai-green); border-color:var(--dsai-green); color:white; }
#digistream-ai-root .dsai-messages { flex:1; min-height:65px; overflow:auto; overscroll-behavior:contain; padding:10px 16px 15px; display:flex; flex-direction:column; gap:12px; }
#digistream-ai-root .dsai-message { flex-shrink:0; padding:13px 15px; border-radius:17px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.85; max-width:94%; }
#digistream-ai-root .dsai-assistant { align-self:flex-start; background:#fff; border:1px solid #e5ece7; color:#314a3c; border-bottom-left-radius:5px; }
#digistream-ai-root .dsai-user { align-self:flex-end; background:var(--dsai-green); color:#fff; border-bottom-right-radius:5px; }
#digistream-ai-root .dsai-links { display:flex; flex-wrap:wrap; gap:8px; padding:0 18px; }
#digistream-ai-root .dsai-links a { color:var(--dsai-green); font-size:11px; padding:5px 0; text-decoration:underline; text-underline-offset:3px; }
#digistream-ai-root .dsai-form { margin:0; padding:10px 14px 0; }
#digistream-ai-root .dsai-composer { display:flex; align-items:flex-end; gap:5px; border:1px solid #cddace; border-radius:16px; padding:7px; background:#fff; }
#digistream-ai-root .dsai-composer:focus-within { outline:2px solid #79b29d; outline-offset:1px; }
#digistream-ai-root textarea { display:block; flex:1; width:100%; min-width:0; min-height:50px; max-height:110px; resize:vertical; padding:6px; color:#243c2f; background:transparent; border:0; border-radius:0; outline:none; box-shadow:none; font-size:14px; line-height:1.6; }
#digistream-ai-root textarea:disabled { background:transparent; }
#digistream-ai-root textarea::placeholder { color:#7c887d; font-size:12px; }
#digistream-ai-root .dsai-send { display:grid; place-items:center; width:40px; min-width:40px; height:44px; padding:0; border-radius:12px; }
#digistream-ai-root .dsai-send { background:var(--dsai-green); color:white; }
#digistream-ai-root .dsai-voice-row { display:flex; gap:7px; align-items:center; padding-top:5px; min-height:25px; }
#digistream-ai-root .dsai-status { font-size:10px; color:#667669; line-height:1.5; }
#digistream-ai-root .dsai-footer { display:flex; align-items:center; gap:6px; padding:5px 16px 12px; color:#6a786e; font-size:8px; line-height:1.55; }
#digistream-ai-root .dsai-footer span { flex:1; }
#digistream-ai-root .dsai-replay { background:transparent; color:var(--dsai-green); padding:0 6px; font-size:11px; }
#digistream-ai-root .dsai-intro { position:fixed; right:24px; bottom:162px; width:310px; max-height:calc(100dvh - 120px); overflow:auto; background:linear-gradient(145deg,#f4f8edee,#e7f0e9f5); backdrop-filter:blur(18px); border:1px solid #ffffffb3; border-radius:25px; box-shadow:0 20px 70px #17352a30; animation:dsai-enter .3s ease-out; }
#digistream-ai-root .dsai-intro-top { display:flex; align-items:center; gap:5px; padding:8px 10px 0 20px; }
#digistream-ai-root .dsai-intro-top span { flex:1; font-size:8px; letter-spacing:1.5px; color:#4f735d; font-weight:700; }
#digistream-ai-root .dsai-stage { height:260px; display:flex; align-items:center; justify-content:center; background:radial-gradient(ellipse,#d4e9b9aa,transparent 70%); }
#digistream-ai-root .dsai-stage video { width:100%; height:100%; object-fit:contain; background:transparent; }
#digistream-ai-root .dsai-stage audio { display:none; }
#digistream-ai-root .dsai-orb { border:1px solid #c1dba5; display:grid; place-items:center; width:145px; height:145px; background:linear-gradient(145deg,#f6ffea,#d0eeb6); border-radius:42px; transform:rotate(-7deg); box-shadow:14px 24px 30px #1e51231a; color:var(--dsai-green); font-size:80px; font-weight:700; position:relative; }
#digistream-ai-root .dsai-orb span { position:absolute; top:-15px; right:-13px; font-size:40px; }
#digistream-ai-root .dsai-intro-caption { padding:8px 20px; text-align:center; }
#digistream-ai-root .dsai-intro-caption strong { display:block; font-size:15px; line-height:1.8; }
#digistream-ai-root .dsai-intro-caption span { display:block; margin-top:7px; color:#57715e; font-size:11px; line-height:1.8; }
#digistream-ai-root .dsai-sound { display:block; margin:7px auto!important; padding:9px 13px; background:var(--dsai-green); color:white; border-radius:12px; font-size:11px; max-width:calc(100% - 24px); }
#digistream-ai-root .dsai-skip { width:100%; background:transparent; color:var(--dsai-green); font-size:11px; padding:10px 12px 15px; }
#digistream-ai-root .dsai-progress { height:3px; background:#d7e4d0; }
#digistream-ai-root .dsai-progress span { display:block; height:100%; width:0; background:#50854a; transition:width .2s linear; }
@keyframes dsai-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:480px) {
  #digistream-ai-root .dsai-panel {
    left:8px;
    right:8px;
    bottom:max(8px,env(safe-area-inset-bottom));
    width:auto;
    height:calc(100dvh - 82px);
    max-height:calc(100dvh - 82px);
    border-radius:18px;
    background:#fff;
  }
  #digistream-ai-root .dsai-launcher {
    right:16px;
    bottom:max(14px,calc(env(safe-area-inset-bottom) + 14px));
    width:54px;
    min-width:54px;
    height:54px;
    min-height:54px;
  }
  #digistream-ai-root .dsai-intro {
    left:10px;
    right:10px;
    bottom:max(8px,env(safe-area-inset-bottom));
    width:auto;
    max-height:calc(100dvh - 82px);
    background:#fff;
  }
  #digistream-ai-root textarea { font-size:16px; }
}
@media(max-height:620px) { #digistream-ai-root .dsai-stage { height:140px; } #digistream-ai-root .dsai-topics { padding-top:7px; gap:4px; } #digistream-ai-root .dsai-header { padding:7px 12px; } }

@keyframes dsai-launch-pulse {
  0%,100% { box-shadow:0 8px 24px #00382742,0 0 0 0 rgba(7,94,71,.42); }
  50% { box-shadow:0 10px 28px #00382755,0 0 0 8px rgba(7,94,71,.10); }
}
@keyframes dsai-launch-ring {
  0% { opacity:.75; transform:scale(.92); }
  70%,100% { opacity:0; transform:scale(1.28); }
}
@keyframes dsai-spark-blink {
  0% { opacity:.25; transform:scale(.72) rotate(-8deg); }
  100% { opacity:1; transform:scale(1.18) rotate(8deg); }
}

@media(prefers-reduced-motion:reduce) { #digistream-ai-root *,#digistream-ai-root *::before,#digistream-ai-root *::after { animation:none!important; transition:none!important; } }


/* Temporary sample-answer video card */
#digistream-ai-root .dsai-video-answer {
  width:min(260px,82%);
  margin:8px 0 12px 8px;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}
#digistream-ai-root .dsai-video-answer video {
  display:block;
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:#fff;
}


/* v1.0.11: force sample answer video to remain visibly square across themes */
#digistream-ai-root .dsai-video-answer {
  position:relative;
  width:min(280px,88%) !important;
  aspect-ratio:1 / 1;
  min-height:220px;
  background:#fff !important;
}
#digistream-ai-root .dsai-video-answer video {
  position:relative !important;
  z-index:2;
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:1 / 1 !important;
  max-width:none !important;
  object-fit:cover !important;
  background:#fff !important;
}
#digistream-ai-root .dsai-video-loading {
  position:absolute;
  inset:0;
  z-index:1;
  display:grid;
  place-items:center;
  padding:16px;
  text-align:center;
  color:#fff;
  background:#fff;
  font-size:13px;
}
#digistream-ai-root .dsai-video-loading[hidden] {
  display:none !important;
}


/* v1.0.12: temporary answer video fades away after playback and is never kept as chat history */
#digistream-ai-root .dsai-video-answer {
  transition:opacity .28s ease, transform .28s ease;
}
#digistream-ai-root .dsai-video-answer.is-leaving {
  opacity:0;
  transform:translateY(6px) scale(.985);
  pointer-events:none;
}


/* v1.0.13: answer videos are presentation-only; native player controls stay hidden */
#digistream-ai-root .dsai-video-answer video {
  pointer-events:none !important;
}
#digistream-ai-root .dsai-video-answer video::-webkit-media-controls,
#digistream-ai-root .dsai-video-answer video::-webkit-media-controls-enclosure,
#digistream-ai-root .dsai-video-answer video::-webkit-media-controls-panel,
#digistream-ai-root .dsai-video-answer video::-webkit-media-controls-play-button,
#digistream-ai-root .dsai-video-answer video::-webkit-media-controls-start-playback-button {
  display:none !important;
  -webkit-appearance:none !important;
}


/* v1.0.14 demo: full/detailed video button appears only after short video ends */
#digistream-ai-root .dsai-full-video-link {
  margin:8px 0 12px 8px;
  width:min(280px,88%);
}
#digistream-ai-root .dsai-full-video-link .dsai-full-video-button {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:44px;
  padding:10px 16px;
  border:0;
  border-radius:12px;
  background:#075e47;
  color:#fff;
  font-weight:700;
  font-size:14px;
  line-height:1.2;
  cursor:pointer;
}
#digistream-ai-root .dsai-full-video-link .dsai-full-video-button:hover {
  background:#044733;
}


/* v1.0.15: full YouTube video opens inside the site; browser Back closes it and returns to chat */
.dsai-full-video-overlay {
  position:fixed;
  inset:0;
  z-index:2147483646;
  display:grid;
  place-items:center;
  padding:14px;
  background:rgba(0,0,0,.78);
}
.dsai-full-video-shell {
  width:min(440px,96vw);
  max-height:92vh;
  overflow:hidden;
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 50px rgba(0,0,0,.45);
}
.dsai-full-video-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:50px;
  padding:8px 10px 8px 14px;
  background:#fff;
  color:#111;
}
.dsai-full-video-top strong {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
}
.dsai-full-video-close {
  flex:0 0 auto;
  min-height:38px;
  padding:7px 12px;
  border:0;
  border-radius:10px;
  background:#075e47;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.dsai-full-video-shell iframe {
  display:block;
  width:100%;
  aspect-ratio:9 / 16;
  max-height:82vh;
  border:0;
  background:#fff;
}
@media (min-width:700px) {
  .dsai-full-video-shell {
    width:min(720px,94vw);
  }
  .dsai-full-video-shell iframe {
    aspect-ratio:16 / 9;
  }
}


/* v1.0.16: larger mobile chat + launcher hidden while open + pure white presentation surface */
#digistream-ai-root .dsai-panel,
#digistream-ai-root .dsai-header,
#digistream-ai-root .dsai-topics,
#digistream-ai-root .dsai-messages,
#digistream-ai-root .dsai-links,
#digistream-ai-root .dsai-form,
#digistream-ai-root .dsai-footer,
#digistream-ai-root .dsai-composer {
  background:#fff;
}
#digistream-ai-root.dsai-chat-open .dsai-launcher {
  display:none !important;
}
#digistream-ai-root .dsai-video-answer,
#digistream-ai-root .dsai-video-answer video,
#digistream-ai-root .dsai-video-loading {
  background:#fff !important;
}
#digistream-ai-root .dsai-video-loading {
  color:#075e47;
}
@media(max-width:480px) {
  #digistream-ai-root .dsai-header { padding:10px 12px; }
  #digistream-ai-root .dsai-avatar { width:38px; height:38px; border-radius:12px; font-size:18px; }
  #digistream-ai-root .dsai-heading strong { font-size:16px; }
  #digistream-ai-root .dsai-topics { padding:10px 10px 6px; gap:6px; }
  #digistream-ai-root .dsai-messages { padding:8px 10px 10px; }
  #digistream-ai-root .dsai-form { padding:8px 10px 0; }
  #digistream-ai-root .dsai-footer { padding:4px 10px 8px; }
  #digistream-ai-root .dsai-video-answer {
    width:min(310px,94%) !important;
  }
}


/* v1.0.17: cleaner YouTube presentation mode.
   YouTube controls are requested off, and direct taps inside the iframe are blocked
   so Like / Share / channel overlays cannot redirect the visitor away from the site. */
.dsai-full-video-shell iframe {
  pointer-events:none !important;
  user-select:none !important;
}
