/* ═══════════════════════════════════════════════════════════
   LLM Visibility Checker — Widget Styles
   AI Pirates Design System
   ═══════════════════════════════════════════════════════════ */

/* ── Widget Container ── */
.llm-widget {
  max-width: 640px;
  margin: 0 auto;
  background: #080f1e;
  border: 1px solid rgba(0,240,255,0.12);
  border-radius: 16px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.llm-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f0ff, transparent);
  opacity: 0.6;
}

/* ── Phase containers ── */
.llm-phase { display: none; }
.llm-phase.active { display: block; }

/* ── Input Phase ── */
.llm-input-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.llm-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px 16px;
  color: #e2e8f0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}

.llm-input:focus {
  border-color: rgba(0,240,255,0.4);
}

.llm-input::placeholder {
  color: #64748b;
}

.llm-btn-primary {
  background: #00f0ff;
  color: #020617;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  transition: background 0.3s, transform 0.15s;
}

.llm-btn-primary:hover {
  background: #33f5ff;
  transform: translateY(-1px);
}

.llm-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Loading Phase ── */
.llm-loading-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.llm-loading-dots span {
  width: 10px; height: 10px;
  background: #00f0ff;
  border-radius: 50%;
  animation: llmPulse 1.4s infinite ease-in-out both;
}

.llm-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.llm-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.llm-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes llmPulse {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.llm-status-text {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

/* ── Result Phase ── */
.llm-score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
}

.llm-score-ring svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.llm-score-ring .bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 8;
}

.llm-score-ring .fg {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease-out, stroke 0.5s;
}

.llm-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.llm-score-number {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.llm-score-label {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── LLM Bars ── */
.llm-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.llm-bar-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.llm-bar-item.locked {
  cursor: default;
}

.llm-bar-item.locked .llm-bar-inner {
  filter: blur(3px);
}

.llm-bar-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 2;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.02) 8px,
    rgba(255,255,255,0.02) 16px
  );
}

.llm-bar-name {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.llm-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.llm-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s ease-out;
  width: 0;
}

.llm-bar-score {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}

/* ── Tech Chips ── */
.llm-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.llm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.llm-chip.good {
  color: #00ff9d;
  border-color: rgba(0,255,157,0.2);
  background: rgba(0,255,157,0.06);
}

.llm-chip.bad {
  color: #ff2a2a;
  border-color: rgba(255,42,42,0.2);
  background: rgba(255,42,42,0.06);
}

.llm-chip.warn {
  color: #f59e0b;
  border-color: rgba(245,158,11,0.2);
  background: rgba(245,158,11,0.06);
}

/* ── Top Issue ── */
.llm-issue-box {
  background: rgba(255,42,42,0.06);
  border: 1px solid rgba(255,42,42,0.15);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}

.llm-issue-box .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ff2a2a;
  font-weight: 700;
  margin-bottom: 6px;
}

.llm-issue-box .text {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Gating Phase (Email) ── */
.llm-gate-box {
  background: rgba(0,240,255,0.04);
  border: 1px solid rgba(0,240,255,0.12);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.llm-gate-box h3 {
  color: #00f0ff;
  font-size: 16px;
  margin-bottom: 12px;
}

.llm-email-group {
  display: flex;
  gap: 10px;
  margin: 16px 0 12px;
}

.llm-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 16px;
}

.llm-consent-row input[type="checkbox"] {
  accent-color: #00f0ff;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.llm-consent-row label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.llm-consent-row label a {
  color: #00f0ff;
  text-decoration: underline;
}

.llm-trust-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.llm-trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.llm-trust-badge svg {
  width: 14px;
  height: 14px;
  fill: #64748b;
}

/* ── Done Phase ── */
.llm-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(0,255,157,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #00ff9d;
}

.llm-quickwin-box {
  background: rgba(0,255,157,0.06);
  border: 1px solid rgba(0,255,157,0.15);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}

.llm-quickwin-box .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #00ff9d;
  font-weight: 700;
  margin-bottom: 6px;
}

.llm-quickwin-box .text {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
}

/* ── SEO Page Styles ── */
.llm-factors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

.llm-factor-card {
  background: #080f1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s;
}

.llm-factor-card:hover {
  border-color: rgba(0,240,255,0.2);
}

.llm-factor-icon {
  width: 40px;
  height: 40px;
  background: rgba(0,240,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #00f0ff;
  font-size: 20px;
}

.llm-factor-card h3 {
  color: #e2e8f0;
  font-size: 16px;
  margin-bottom: 8px;
}

.llm-factor-card p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.llm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.llm-step {
  text-align: center;
  padding: 24px;
}

.llm-step-num {
  width: 36px;
  height: 36px;
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #00f0ff;
  font-weight: 700;
  font-size: 14px;
}

.llm-step h3 {
  color: #e2e8f0;
  font-size: 15px;
  margin-bottom: 8px;
}

.llm-step p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Research Source Cards ── */
.llm-sources {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.llm-source {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 20px;
}

.llm-source .author {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #00f0ff;
  font-weight: 600;
  margin-bottom: 6px;
}

.llm-source p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .llm-widget {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .llm-input-group {
    flex-direction: column;
  }

  .llm-btn-primary {
    width: 100%;
    text-align: center;
  }

  .llm-bars {
    grid-template-columns: 1fr;
  }

  .llm-email-group {
    flex-direction: column;
  }

  .llm-factors-grid {
    grid-template-columns: 1fr;
  }

  .llm-steps {
    grid-template-columns: 1fr;
  }

  .llm-score-ring {
    width: 120px;
    height: 120px;
  }

  .llm-score-ring svg {
    width: 120px;
    height: 120px;
  }

  .llm-score-number {
    font-size: 28px;
  }
}
