/* ═══════════════════════════════════════════════════════════════
   TestSuite Pro — MBTI Addon CSS
   Built on Metronic 8 Demo22 design tokens
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero card ────────────────────────────────────────────────── */
.tspmbti-hero {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--type-color, #5c6bc0) 85%, black 15%) 0%,
    color-mix(in srgb, var(--type-color, #5c6bc0) 60%, black 40%) 100%
  );
  border-radius: .875rem;
  padding: 2.5rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.1);
  position: relative;
  overflow: hidden;
}
.tspmbti-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.tspmbti-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

/* ── Type badge ───────────────────────────────────────────────── */
.tspmbti-type-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px; height: 130px;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(0,0,0,.25), 0 0 0 4px rgba(255,255,255,.2);
}
.tspmbti-type-letters {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: 2px;
}
.tspmbti-type-group {
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: .25rem;
}

/* ── Dichotomy bars ───────────────────────────────────────────── */
.tspmbti-dichotomies {
  padding: .5rem 0;
}
.tspmbti-dichotomy {}
.tspmbti-pole-label {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.tspmbti-bar-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.12);
  display: flex;
  overflow: hidden;
  position: relative;
}
.tspmbti-bar-fill-left {
  height: 100%;
  border-radius: 6px 0 0 6px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.tspmbti-bar-fill-right {
  height: 100%;
  border-radius: 0 6px 6px 0;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.tspmbti-active-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.tspmbti-active-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-weight: 800;
  font-size: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* ── Dimension cards ──────────────────────────────────────────── */
.tspmbti-dim-card {
  border: 1px solid rgba(0,0,0,.06) !important;
  transition: transform .2s, box-shadow .2s;
}
.tspmbti-dim-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.09) !important;
}
.tspmbti-dim-letter {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Type grid tiles ──────────────────────────────────────────── */
.tspmbti-type-tile {
  background: var(--t-light, #f5f5f5);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: .625rem;
  padding: .75rem;
  transition: all .2s;
  cursor: default;
}
.tspmbti-type-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.tspmbti-type-tile.active {
  background: var(--t-color, #5c6bc0) !important;
  border-color: var(--t-color, #5c6bc0) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.2) !important;
}
.tspmbti-type-tile.active .tspmbti-tile-code,
.tspmbti-type-tile.active .tspmbti-tile-name,
.tspmbti-type-tile.active .tspmbti-tile-pct {
  color: #fff !important;
}
.tspmbti-tile-code {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--t-color, #333);
  line-height: 1;
}
.tspmbti-tile-name {
  font-size: .7rem;
  font-weight: 600;
  color: #666;
  margin-top: .2rem;
  line-height: 1.3;
}
.tspmbti-tile-pct {
  font-size: .65rem;
  color: #999;
  margin-top: .1rem;
}

/* ── Wizard: boolean/choice question styling for MBTI ─────────── */
/* Override the default tsp-bool-btn for MBTI's A/B format */
.tsp-wizard-form .tsp-bool-option {
  flex: 1;
  min-width: 0;
}
.tspmbti-choice-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.tspmbti-choice-option {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  border: 2px solid #f1f1f4;
  background: #fdfdfd;
  cursor: pointer;
  transition: all .18s;
  user-select: none;
}
.tspmbti-choice-option:hover {
  border-color: #d1d5ff;
  background: #f5f7ff;
}
.tspmbti-choice-option.selected {
  border-color: #5688f5;
  background: #eef2ff;
}
.tspmbti-choice-option input[type="radio"] {
  display: none;
}
.tspmbti-choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #e8eaf6;
  color: #5c6bc0;
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
  transition: background .18s, color .18s;
}
.tspmbti-choice-option.selected .tspmbti-choice-letter {
  background: #5688f5;
  color: #fff;
}
.tspmbti-choice-option.selected .tspmbti-choice-text {
  color: #3451b2;
  font-weight: 600;
}
.tspmbti-choice-text {
  font-size: .9rem;
  color: #374151;
  line-height: 1.45;
}

/* Override the default boolean buttons when rendering MBTI questions */
#tsp-wizard-wrap .tsp-bool-option .tsp-bool-btn {
  display: none; /* hide default A/B button */
}

/* ── Question step indicator dots ─────────────────────────────── */
.tspmbti-step-dots {
  display: flex;
  gap: .4rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.tspmbti-step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e4e6ef;
  transition: background .2s, transform .2s;
}
.tspmbti-step-dot.active {
  background: #5688f5;
  transform: scale(1.3);
}
.tspmbti-step-dot.done {
  background: #50cd89;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 767px) {
  .tspmbti-hero { padding: 1.5rem; }
  .tspmbti-type-badge { width: 100px; height: 100px; }
  .tspmbti-type-letters { font-size: 2rem; }
}
