/* Tej Quote Orb */
#tej-orb-widget {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1000;
  font-family: var(--font-body, Inter, system-ui, sans-serif);
}

.tej-orb {
  position: relative;
  width: 82px;
  height: 76px;
  border: 0;
  border-radius: 46% 54% 52% 48% / 45% 42% 58% 55%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 8%, #00f5d4 9% 23%, #9d4edd 58%, #101024 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 32px rgba(0, 245, 212, 0.25);
  cursor: pointer;
  overflow: hidden;
  animation: tej-blob 6s ease-in-out infinite, tej-float 3.2s ease-in-out infinite;
}

.tej-orb::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.02));
}

.tej-orb-image {
  position: absolute;
  inset: 11px;
  width: calc(100% - 22px);
  height: calc(100% - 22px);
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.28;
  mix-blend-mode: screen;
}

.tej-orb-shadow {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -12px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  filter: blur(8px);
}

.tej-face {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: transform 0.2s ease;
}

.tej-eye {
  position: absolute;
  top: 30px;
  width: 9px;
  height: 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.tej-eye-left { left: 27px; }
.tej-eye-right { right: 27px; }

.tej-mouth {
  position: absolute;
  left: 34px;
  top: 48px;
  width: 15px;
  height: 7px;
  border-radius: 0 0 999px 999px;
  border-bottom: 3px solid #fff;
}

.tej-face-happy .tej-mouth {
  width: 22px;
  left: 30px;
  height: 11px;
}

.tej-face-thinking .tej-eye-right {
  height: 4px;
  top: 35px;
}

.tej-face-listening .tej-mouth {
  width: 12px;
  height: 12px;
  left: 35px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.tej-face-listening {
  animation: tej-listen 0.7s ease-in-out infinite alternate;
}

.tej-speech-pop {
  position: absolute;
  right: 0;
  bottom: 94px;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(9, 8, 22, 0.94);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  color: var(--text-white, #fff);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  visibility: hidden;
  transition: 0.25s ease;
}

.tej-orb-nudging .tej-speech-pop {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.tej-speech-pop p {
  margin: 0 26px 12px 0;
  color: var(--text-gray-100, #f4f4f5);
  font-size: 0.9rem;
  line-height: 1.45;
}

.tej-pop-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
}

.tej-mini-cta,
.tej-primary-btn,
.tej-secondary-btn,
.tej-icon-btn,
.tej-option {
  font: inherit;
}

.tej-mini-cta,
.tej-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: linear-gradient(135deg, #00c2a8, #7b2cbf);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.tej-quote-flow {
  position: absolute;
  right: 0;
  bottom: 94px;
  width: min(390px, calc(100vw - 32px));
  min-height: 430px;
  max-height: min(620px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(9, 8, 22, 0.96);
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow: 0 24px 70px rgba(0,0,0,0.58), 0 0 45px rgba(0,245,212,0.12);
  color: #fff;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  visibility: hidden;
  transition: 0.25s ease;
}

.tej-flow-open .tej-quote-flow {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.tej-flow-open .tej-speech-pop {
  display: none;
}

.tej-flow-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tej-flow-kicker,
.tej-question-count,
.tej-result-label {
  display: block;
  color: #00f5d4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tej-flow-top h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.tej-icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.tej-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
}

.tej-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00f5d4, #f72585);
  transition: width 0.25s ease;
}

.tej-flow-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
}

.tej-question {
  margin: 8px 0 18px;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.45;
  font-weight: 700;
}

.tej-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tej-option-grid-multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tej-option {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  color: #f7f7fb;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  transition: 0.18s ease;
}

.tej-option:hover,
.tej-option.active {
  border-color: #00f5d4;
  background: rgba(0,245,212,0.12);
  box-shadow: 0 0 18px rgba(0,245,212,0.12);
}

.tej-free-answer {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  padding: 13px 14px;
  line-height: 1.45;
  outline: none;
}

.tej-free-answer:focus {
  border-color: #9d4edd;
  box-shadow: 0 0 0 3px rgba(157,78,221,0.18);
}

.tej-flow-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.tej-flow-actions .tej-primary-btn {
  flex: 1;
}

.tej-secondary-btn {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.tej-secondary-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.tej-secondary-btn.listening {
  border-color: #f72585;
  color: #fff;
  box-shadow: 0 0 20px rgba(247,37,133,0.25);
}

.tej-thinking {
  display: flex;
  gap: 7px;
  margin: 28px 0 18px;
}

.tej-thinking span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00f5d4;
  animation: tej-bounce 0.8s ease-in-out infinite alternate;
}

.tej-thinking span:nth-child(2) { animation-delay: 0.12s; }
.tej-thinking span:nth-child(3) { animation-delay: 0.24s; }

.tej-result-card {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(0,245,212,0.16), rgba(157,78,221,0.14));
  border: 1px solid rgba(255,255,255,0.12);
}

.tej-result-card h4 {
  margin: 8px 0;
  font-size: 1.65rem;
  letter-spacing: 0;
}

.tej-result-card p {
  margin: 0;
  color: #e7e7ec;
  line-height: 1.55;
}

.tej-result-meta,
.tej-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tej-result-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.tej-shake {
  animation: tej-shake 0.25s ease;
}

@keyframes tej-blob {
  0%, 100% { border-radius: 46% 54% 52% 48% / 45% 42% 58% 55%; }
  35% { border-radius: 58% 42% 45% 55% / 52% 60% 40% 48%; }
  70% { border-radius: 42% 58% 59% 41% / 44% 38% 62% 56%; }
}

@keyframes tej-float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-8px,-12px,0); }
}

@keyframes tej-listen {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@keyframes tej-bounce {
  from { transform: translateY(0); opacity: 0.5; }
  to { transform: translateY(-9px); opacity: 1; }
}

@keyframes tej-shake {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-6px); }
  66% { transform: translateX(6px); }
}

@media (max-width: 520px) {
  #tej-orb-widget {
    right: 16px;
    bottom: 16px;
  }

  .tej-quote-flow {
    position: fixed;
    inset: auto 10px 104px 10px;
    width: auto;
    max-height: calc(100vh - 124px);
  }

  .tej-option-grid,
  .tej-option-grid-multi {
    grid-template-columns: 1fr;
  }

  .tej-orb {
    width: 72px;
    height: 68px;
  }
}
