:root {
  --tevz-primary: #111111;
  --tevz-secondary: #cccccc;
  --tevz-bg: #fafafa;
  --tevz-ink: #333333;
  --tevz-button-bg: #fafafa;
  --tevz-button-ink: #111111;
}

#tevz-chat-button {
  position: fixed;
  bottom: 20px; 
  right: 20px;
  background: var(--tevz-button-bg);
  color: var(--tevz-button-ink);
  border: none;
  width: 50px; height: 50px;
  border-radius: 50%;
  cursor: pointer; 
  font-size: 20px;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,.2);
}

.tevz-head {
   width: 33px;
   height: 33px;
}

.tevz-hand {
   width: 33px;
}

#tevz-eye-left {
  transform-origin: center;
  animation: tevzBlink 6s infinite;
}
@keyframes tevzBlink {
  0%, 97%, 100% { transform: scaleY(1); }
  98%, 99% { transform: scaleY(0.1); }
}


#tevz-close {
  background: transparent;
  color: #fafafa;
  border: none;
  font-size: 20px;
}

#tevz-close:hover {
  cursor: pointer;
}

#tevz-chat-container {
  position: fixed;
  bottom: 90px; 
  right: 10px;
  width: 420px; 
  height: 724px;
  background: #fafafaee;
  backdrop-filter: blur(3px); /* Apply blur effect to background */
  color: var(--tevz-ink);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  isolation: isolate; /* ensures overlay stays inside */
}

#tevz-chat-container::before {
  content: "";
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  background: url('https://assets.iceable.com/img/noise-transparent.png') repeat 0 0;
  opacity: 0.3;
  animation: tevz-noise-shift 6s infinite linear;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* ensures actual chat body sits on top */
.tevz-chat-header, .tevz-chat-body, .tevz-chat-footer {
  position: relative;
  z-index: 2;
}

@keyframes tevz-noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, -2%); }
  50% { transform: translate(2%, 2%); }
  75% { transform: translate(-2%, 2%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #tevz-chat-container::before { animation: none; }
}

#tevz-chat-button:hover img { filter: invert(0.7); transition: 0.2s ease; }


.tevz-chat-header {
  background: #111111; color: #fff;
  padding: 14px 16px; font-weight: 600; 
  font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
}
.tevz-chat-body {
  flex: 1; padding: 12px 12px 0 12px; 
  overflow-y: auto;
  display: flex; 
  flex-direction: column; 
  gap: 8px;
}
.tevz-chat-body p {
  margin: 0; padding: 10px 12px; border-radius: 8px; 
  font-size: 14px; 
  line-height: 1.5em;
  word-wrap: break-word; 
  max-width: 90%;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.tevz-bubble-user { background: #fafafa; color: #111111; align-self: flex-end; }
.tevz-bubble-bot { background: var(--tevz-primary); color: #fafafa; align-self: flex-start; }
.tevz-bubble-typing { background: #111111; color: #fafafa; font-style: italic; align-self: flex-start; }

.tevz-chat-footer {
  padding: 10px; border-top: 0px solid #ddd; display: flex; gap: 8px;
}
#tevz-chat-input {
  flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 10px; outline: none; background: #fff; color: #333;
}
#tevz-chat-send {
  background: #111111; color: white; border: none; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}