/* ============================================
   Bot Compare Modal — side-by-side comparison
   ============================================ */

.bld-compare-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  animation: compare-fade-in 0.2s ease;
}

.bld-compare-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

@keyframes compare-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bld-compare-inner {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  animation: compare-slide-up 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes compare-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.bld-compare-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.bld-compare-close:hover {
  background: #334155;
  color: #e2e8f0;
}

.bld-compare-title {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 20px;
  padding-right: 40px;
}

/* ── Compare queue indicator (shown in bottom team bar) ─── */
.bld-compare-queue {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
}

.bld-compare-queue-bot {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 2px 10px 2px 4px;
  font-size: 12px;
  color: #e2e8f0;
}

.bld-compare-queue-bot img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.bld-compare-queue-remove {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  padding: 0 0 0 6px;
  line-height: 1;
}
.bld-compare-queue-remove:hover { color: #ef4444; }

.bld-compare-open-btn {
  background: #6366f1;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.bld-compare-open-btn:hover {
  background: #4f46e5;
}

/* ── Bot compare columns ─── */
.bld-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.bld-compare-col {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.bld-compare-col-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
}

.bld-compare-col-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.bld-compare-col-name {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.bld-compare-col-tagline {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.bld-compare-col-score {
  display: inline-block;
  background: #1e293b;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  color: #a78bfa;
  font-weight: 600;
  margin-bottom: 10px;
}

.bld-compare-col-price {
  font-size: 14px;
  color: #34d399;
  font-weight: 600;
}

.bld-compare-col-add-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: #334155;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  padding: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.bld-compare-col-add-btn:hover,
.bld-compare-col-add-btn.in-cart {
  background: #22c55e22;
  border-color: #22c55e;
  color: #34d399;
}

/* ── Shared radar chart ─── */
.bld-compare-radar-section {
  margin-bottom: 24px;
}

.bld-compare-radar-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bld-compare-radar-wrap {
  display: flex;
  justify-content: center;
}

.bld-compare-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
}

.bld-compare-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

/* ── Feature table ─── */
.bld-compare-table-section {
  margin-bottom: 24px;
}

.bld-compare-table-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bld-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bld-compare-table th,
.bld-compare-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #1e293b;
}

.bld-compare-table th {
  color: #64748b;
  font-weight: 600;
  background: #0f172a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bld-compare-table td {
  color: #cbd5e1;
}

.bld-compare-table td:first-child {
  color: #64748b;
  width: 30%;
  font-weight: 500;
}

.bld-compare-table tr:last-child td {
  border-bottom: none;
}

.bld-compare-table .winner {
  color: #34d399;
  font-weight: 600;
}

/* ── Synergy indicator ─── */
.bld-compare-synergy {
  background: #14532d;
  border: 1px solid #22c55e44;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #86efac;
  margin-top: 16px;
}

.bld-compare-synergy-icon {
  font-size: 22px;
}

.bld-compare-synergy strong {
  color: #4ade80;
}

.bld-compare-no-synergy {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #475569;
  text-align: center;
  margin-top: 16px;
}

/* ── Bot card compare button ─── */
.bld-bot-card {
  position: relative;
}

.bld-bot-card .bld-compare-btn {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.bld-bot-card:hover .bld-compare-btn {
  display: block;
}

.bld-bot-card .bld-compare-btn:hover,
.bld-bot-card .bld-compare-btn.queued {
  background: #4f46e5;
  border-color: #6366f1;
  color: #fff;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bld-compare-modal,
  .bld-compare-inner {
    animation: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .bld-compare-cols {
    grid-template-columns: 1fr;
  }
  .bld-compare-inner {
    padding: 16px;
    margin: 10px;
    max-height: 95vh;
  }
}
