.zsf-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: grid;
  max-width: min(360px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  color: #f8fafc;
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 14px;
  background: rgba(5, 11, 20, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.zsf-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.zsf-stage {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.zsf-button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(300px, calc(100vw - 2rem));
  padding: 0.55rem 0.7rem;
  color: #ffffff;
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

.zsf-avatar {
  position: relative;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 20%, rgba(251, 191, 36, 0.24), rgba(0, 163, 255, 0.12));
}

.zsf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zsf-status {
  position: absolute;
  right: 0.2rem;
  bottom: 0.22rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #050b14;
  border-radius: 999px;
  background: #10b981;
}

.zsf-button-text {
  display: grid;
  gap: 0.05rem;
  text-align: right;
  line-height: 1.35;
}

.zsf-button-text strong {
  color: #ffffff;
  font-size: 0.95rem;
}

.zsf-button-text span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
}

.zsf-chat {
  width: min(390px, calc(100vw - 2rem));
  max-height: min(620px, calc(100vh - 7rem));
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 22px;
  background: rgba(8, 19, 36, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.zsf-stage.is-open .zsf-chat {
  display: grid;
}

.zsf-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.zsf-header img {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.08);
}

.zsf-header-text {
  display: grid;
  flex: 1;
  min-width: 0;
  text-align: right;
}

.zsf-header-text strong { color: #ffffff; }
.zsf-header-text span { color: #94a3b8; font-size: 0.82rem; font-weight: 800; }

.zsf-close {
  width: 2.2rem;
  height: 2.2rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.zsf-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.8rem;
}

.zsf-choices button,
.zsf-form button {
  min-height: 2.55rem;
  color: #02121f;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #00f0ff, #fbbf24);
  cursor: pointer;
  font-weight: 900;
}

.zsf-messages {
  max-height: 250px;
  display: grid;
  gap: 0.55rem;
  overflow: auto;
  padding: 0 0.8rem 0.8rem;
}

.zsf-message {
  width: fit-content;
  max-width: 88%;
  padding: 0.65rem 0.75rem;
  color: #f8fafc;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.075);
  line-height: 1.6;
}

.zsf-message.is-user {
  justify-self: end;
  background: rgba(0, 240, 255, 0.14);
}

.zsf-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.zsf-form input {
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.55rem 0.75rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.76);
  outline: none;
}

.zsf-form button {
  padding: 0.55rem 0.9rem;
}

@media (max-width: 620px) {
  .zsf-stage {
    left: 0.75rem;
    right: 0.75rem;
    justify-items: stretch;
  }

  .zsf-button,
  .zsf-chat {
    width: 100%;
    max-width: 100%;
  }
}
