/**
 * WiseIQ Network Effect Flywheel — Community Data Engine Styles v1.0
 */

/* ── Approval Intelligence Widget ─────────────────────────────── */
.wiq-ai-widget {
  border-top: 1px solid #E5E7EB;
  padding: 10px 0 2px;
  margin-top: 10px;
}
.wiq-ai-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1D4ED8;
  margin-bottom: 7px;
}
.wiq-ai-count {
  margin-left: auto;
  font-size: 10px;
  color: #9CA3AF;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.wiq-ai-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.wiq-ai-tier-label { font-size: 11px; color: #6B7280; }
.wiq-ai-approval-rate { font-size: 13px; font-weight: 800; }
.wiq-ai-bar-wrap {
  height: 5px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.wiq-ai-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.wiq-ai-offered-rate {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 7px;
}
.wiq-ai-offered-rate strong { color: #111827; }
.wiq-ai-contribute-btn {
  background: none;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #1D4ED8;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  transition: background 0.15s;
}
.wiq-ai-contribute-btn:hover { background: #EFF6FF; }

/* ── People Like You section ──────────────────────────────────── */
.wiq-ply-section {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 20px;
}
.wiq-ply-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #1D4ED8;
  margin-bottom: 12px;
}
.wiq-ply-tier-badge {
  margin-left: auto;
  background: #DBEAFE;
  color: #1E40AF;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
}
.wiq-ply-stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.wiq-ply-stat { flex: 1; text-align: center; }
.wiq-ply-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #1E3A8A;
  line-height: 1.2;
}
.wiq-ply-stat-label {
  font-size: 10px;
  color: #3B82F6;
  line-height: 1.4;
  margin-top: 2px;
}
.wiq-ply-footer {
  font-size: 11px;
  color: #6B7280;
  text-align: center;
}
.wiq-ply-contribute {
  background: none;
  border: none;
  font-size: 11px;
  color: #1D4ED8;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Underwriting Speed Leaderboard ──────────────────────────── */
.wiq-uw-leaderboard {
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 20px;
}
.wiq-uw-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.wiq-uw-header span:first-of-type {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}
.wiq-uw-sub {
  font-size: 11px;
  color: #9CA3AF;
  margin-left: auto;
}
.wiq-uw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.wiq-uw-rank { font-size: 14px; width: 28px; flex-shrink: 0; text-align: center; }
.wiq-uw-name { font-size: 12px; font-weight: 600; color: #374151; width: 90px; flex-shrink: 0; }
.wiq-uw-bar-wrap {
  flex: 1;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}
.wiq-uw-bar {
  height: 100%;
  background: linear-gradient(90deg, #1D4ED8, #3B82F6);
  border-radius: 3px;
  transition: width 0.8s ease;
}
.wiq-uw-speed { font-size: 11px; color: #6B7280; width: 70px; text-align: right; flex-shrink: 0; }
.wiq-uw-footer {
  font-size: 11px;
  color: #9CA3AF;
  border-top: 1px solid #F3F4F6;
  padding-top: 8px;
  margin-top: 4px;
}
.wiq-uw-contribute {
  background: none;
  border: none;
  font-size: 11px;
  color: #1D4ED8;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Micro-Survey Modal ───────────────────────────────────────── */
.wiq-ms-modal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.wiq-ms-modal.wiq-ms-open { opacity: 1; pointer-events: auto; }
.wiq-ms-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.wiq-ms-dialog {
  position: relative;
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 20px 28px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transform: translateY(40px);
  transition: transform 0.35s cubic-bezier(0.34,1.2,0.64,1);
}
.wiq-ms-modal.wiq-ms-open .wiq-ms-dialog { transform: translateY(0); }
.wiq-ms-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9CA3AF;
  cursor: pointer;
}
.wiq-ms-icon {
  width: 48px; height: 48px;
  background: #EFF6FF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.wiq-ms-title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin: 0 0 4px;
}
.wiq-ms-sub {
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  margin: 0 0 16px;
}
.wiq-ms-q {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}
.wiq-ms-optional { font-size: 11px; color: #9CA3AF; font-weight: 400; }
.wiq-ms-tier-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wiq-ms-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  flex: 1;
  min-width: 55px;
  transition: border-color 0.15s, background 0.15s;
}
.wiq-ms-tier span { font-size: 10px; color: #9CA3AF; font-weight: 400; margin-top: 2px; }
.wiq-ms-tier:hover, .wiq-ms-active { border-color: #1D4ED8 !important; background: #EFF6FF !important; color: #1D4ED8 !important; }
.wiq-ms-outcome-btns { display: flex; gap: 8px; }
.wiq-ms-outcome {
  flex: 1;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.wiq-ms-outcome:hover, .wiq-ms-outcome.wiq-ms-active { border-color: #1D4ED8; background: #EFF6FF; color: #1D4ED8; }
.wiq-ms-rate-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.wiq-ms-rate-input {
  flex: 1;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  color: #111827;
}
.wiq-ms-rate-input:focus { outline: none; border-color: #1D4ED8; }
.wiq-ms-rate-unit { font-size: 13px; color: #6B7280; }
.wiq-ms-submit {
  width: 100%;
  background: #1D4ED8;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}
.wiq-ms-submit:hover { background: #1E40AF; }
.wiq-ms-skip {
  width: 100%;
  background: none;
  border: none;
  font-size: 13px;
  color: #9CA3AF;
  cursor: pointer;
  text-decoration: underline;
}
.wiq-ms-hidden { display: none !important; }
.wiq-ms-done {
  text-align: center;
  padding: 10px 0;
}
.wiq-ms-done svg { margin-bottom: 8px; }
.wiq-ms-done-title { font-size: 18px; font-weight: 800; color: #059669; margin-bottom: 4px; }
.wiq-ms-done-sub   { font-size: 13px; color: #374151; margin-bottom: 6px; }
.wiq-ms-done-contrib { font-size: 12px; color: #9CA3AF; }
.wiq-ms-progress {
  height: 3px;
  background: #E5E7EB;
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}
.wiq-ms-prog-bar {
  height: 100%;
  background: #1D4ED8;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── 14-day Review Toast ──────────────────────────────────────── */
.wiq-review-toast {
  position: fixed;
  bottom: -120px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 9997;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-left: 4px solid #1D4ED8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transition: bottom 0.4s cubic-bezier(0.34,1.2,0.64,1);
}
.wiq-review-toast.wiq-rt-visible { bottom: 80px; }
.wiq-rt-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  flex-wrap: wrap;
}
.wiq-rt-text { flex: 1; min-width: 140px; }
.wiq-rt-title { font-size: 13px; font-weight: 700; color: #111827; }
.wiq-rt-sub   { font-size: 11px; color: #6B7280; }
.wiq-rt-cta {
  background: #1D4ED8;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.wiq-rt-dismiss {
  background: none;
  border: none;
  font-size: 12px;
  color: #9CA3AF;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Dark mode ────────────────────────────────────────────────── */
[data-theme="dark"] .wiq-ply-section { background: #1E3A5F; border-color: #3B82F6; }
[data-theme="dark"] .wiq-uw-leaderboard { background: #1F2937; border-color: #374151; }
[data-theme="dark"] .wiq-uw-header span:first-of-type { color: #F9FAFB; }
[data-theme="dark"] .wiq-ms-dialog { background: #1F2937; }
[data-theme="dark"] .wiq-ms-title { color: #F9FAFB; }
[data-theme="dark"] .wiq-ms-tier  { background: #111827; border-color: #374151; color: #D1D5DB; }
[data-theme="dark"] .wiq-ms-outcome { background: #111827; border-color: #374151; color: #D1D5DB; }
[data-theme="dark"] .wiq-ms-rate-input { background: #111827; border-color: #374151; color: #F9FAFB; }
[data-theme="dark"] .wiq-review-toast { background: #1F2937; border-color: #374151; }
[data-theme="dark"] .wiq-rt-title { color: #F9FAFB; }
