/* ── AI Quiz Modal ─────────────────────────────────────── */

/* Overlay */
.aiq-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.aiq-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.aiq-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 92%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 32px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s;
}
.aiq-overlay.active .aiq-modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.aiq-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100, #f5f5f5);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500, #737373);
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.aiq-close:hover {
  background: var(--gray-200, #e5e5e5);
  color: var(--black, #000);
}

/* ── Screen: Intro ─────────────────────────────────────── */
.aiq-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100, #f5f5f5);
  color: var(--gray-600, #525252);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.aiq-intro h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black, #000);
  margin: 0 0 12px;
}
.aiq-intro p {
  font-size: 15px;
  color: var(--gray-600, #525252);
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Shared button ─────────────────────────────────────── */
.aiq-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  background: var(--black, #000);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.aiq-btn:hover {
  opacity: 0.85;
}
.aiq-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Screen: Questions ─────────────────────────────────── */
.aiq-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.aiq-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--gray-200, #e5e5e5);
  transition: background 0.3s;
}
.aiq-progress-bar.filled {
  background: var(--black, #000);
}

.aiq-question-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400, #a3a3a3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}
.aiq-question-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--black, #000);
  line-height: 1.4;
  margin: 0 0 20px;
}

.aiq-answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aiq-answer {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--gray-200, #e5e5e5);
  border-radius: 10px;
  font-size: 14px;
  color: var(--gray-700, #404040);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.aiq-answer:hover {
  border-color: var(--black, #000);
}
.aiq-answer.selected {
  border-color: var(--black, #000);
  background: var(--gray-50, #f9f9f9);
  font-weight: 600;
  color: var(--black, #000);
}

/* ── Screen: Email Gate ────────────────────────────────── */
.aiq-gate h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--black, #000);
  margin: 0 0 8px;
}
.aiq-gate p {
  font-size: 14px;
  color: var(--gray-500, #737373);
  line-height: 1.6;
  margin: 0 0 24px;
}
.aiq-field {
  margin-bottom: 14px;
}
.aiq-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700, #404040);
  margin-bottom: 6px;
}
.aiq-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200, #e5e5e5);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--black, #000);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.aiq-field input:focus {
  outline: none;
  border-color: var(--black, #000);
}
.aiq-gate-error {
  color: #ef4444;
  font-size: 13px;
  margin: 0 0 12px;
  display: none;
}

/* ── Screen: Results ───────────────────────────────────── */
.aiq-results-badge {
  display: inline-block;
  background: var(--black, #000);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.aiq-results h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--black, #000);
  margin: 0 0 6px;
}
.aiq-results-score {
  font-size: 14px;
  color: var(--gray-400, #a3a3a3);
  margin: 0 0 16px;
}
.aiq-results-desc {
  font-size: 15px;
  color: var(--gray-600, #525252);
  line-height: 1.7;
  margin: 0 0 8px;
}
.aiq-results-cta-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--black, #000);
  margin: 0 0 24px;
}

/* ── Floating Bubble ───────────────────────────────────── */
.aiq-bubble {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--black, #000);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 12px 20px 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.aiq-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.aiq-bubble.visible {
  display: inline-flex;
}
.aiq-bubble svg {
  flex-shrink: 0;
}

/* ── State visibility ──────────────────────────────────── */
.aiq-screen { display: none; }
.aiq-screen.active { display: block; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 540px) {
  .aiq-modal {
    padding: 32px 20px 24px;
    border-radius: 10px;
  }
  .aiq-intro h2,
  .aiq-results h2 {
    font-size: 20px;
  }
  .aiq-question-text {
    font-size: 16px;
  }
  .aiq-bubble {
    bottom: 16px;
    left: 16px;
    font-size: 13px;
    padding: 10px 16px 10px 14px;
  }
}
