/* ─── ev-bazaar.css – EV Tauschbörse ────────────────────────────────────────── */

/* ─── Bazaar-Sektion ─────────────────────────────────────────────────────────── */
.bz-section {
  margin-top: 60px;
  padding: 20px;
  border-top: 2px solid #fff;
}

.bz-title {
  font-family: Arial, sans-serif;
  font-size: clamp(28px, 7vw, 66pt);
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin: 0 auto 8px;
  letter-spacing: 0.08em;
}

.bz-subtitle {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  margin: 0 0 28px;
}

/* ─── Angebots-Reihe ─────────────────────────────────────────────────────────── */
.bz-offers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 16px;
}

/* ─── Angebots-Karte (CxSwap) ────────────────────────────────────────────────── */
.bz-offer-card {
  background: #1a1a1a;
  border: 2px solid #555;
  border-radius: 8px;
  width: 210px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, opacity 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bz-offer-card:hover:not(.bz-offer-traded) {
  border-color: #999;
  transform: translateY(-2px);
}

/* bz-offer-selected: Spieler hat dieses Angebot angeklickt */
.bz-offer-card.bz-offer-selected {
  border-color: #FFD700;
  box-shadow: 0 0 0 2px #FFD70033;
}

/* Letzter-Platz-Karte: rote Umrandung */
.bz-offer-card.bz-last-place-card {
  border-color: #c44;
}

.bz-offer-card.bz-last-place-card:hover:not(.bz-offer-traded) {
  border-color: #e66;
}

/* Nach dem Tausch: ausgegraut, nicht mehr klickbar */
.bz-offer-card.bz-offer-traded {
  opacity: 0.45;
  pointer-events: none;
  border-color: #2a7;
}

/* ─── Team-Label (LSwapT) ─────────────────────────────────────────────────────── */
.bz-offer-team {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #aaa;
  min-height: 20px;
}

.bz-team-name {
  font-weight: bold;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.bz-lp-tag {
  background: #c44;
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Fahrzeug-Bild ──────────────────────────────────────────────────────────── */
.bz-car-img-wrap {
  position: relative;
  width: 100%;
  height: 96px;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
}

.bz-car-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bz-brand-logo {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.75;
}

/* ─── Fahrzeug-Info ──────────────────────────────────────────────────────────── */
.bz-car-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bz-car-name {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
}

.bz-car-badges {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

/* ─── Stats (Sterne) ─────────────────────────────────────────────────────────── */
.bz-car-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 6px;
}

.bz-stat-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.bz-stat-label {
  color: #777;
  font-size: 10px;
  width: 24px;
  flex-shrink: 0;
}

.bz-stat-stars {
  font-size: 8px;
  letter-spacing: -1px;
}

/* Fallback-Farbe wenn kein lvlClass-Stern passt */
.bz-stat-stars:not([class*="-stars"]) {
  color: #d4c030;
}

/* ─── Fahrer-Zeile ───────────────────────────────────────────────────────────── */
.bz-car-driver {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #bbb;
}

.bz-car-value {
  font-size: 11px;
  color: #999;
}

/* ─── Flags ──────────────────────────────────────────────────────────────────── */
.bz-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.bz-flag-sm {
  width: 15px;
  height: 10px;
  object-fit: cover;
  border-radius: 1px;
  flex-shrink: 0;
}

/* ─── CxSwap2: Info nach Tausch ──────────────────────────────────────────────── */
.bz-offer-done {
  background: #0d2b1a;
  border: 1px solid #2a7;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bz-done-icon { font-size: 13px; }

.bz-done-text { color: #6f6; line-height: 1.3; }

/* ─── CTA-Zeile ──────────────────────────────────────────────────────────────── */
.bz-offer-cta {
  text-align: center;
  font-size: 11px;
  color: #FFD700;
  margin-top: auto;
  padding-top: 4px;
}

.bz-offer-traded .bz-offer-cta { display: none; }

/* ─── Letzter-Platz-Label (BidL1) ────────────────────────────────────────────── */
.bz-last-label {
  text-align: center;
  font-size: 13px;
  color: #e88;
  background: #2a1a1a;
  border: 1px solid #c44;
  border-radius: 6px;
  padding: 8px 16px;
  margin: 0 auto 24px;
  max-width: 520px;
}

/* ─── Garage-Panel (BackSelCarT) ─────────────────────────────────────────────── */
.bz-garage-panel {
  background: #131313;
  border: 2px solid #FFD700;
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
}

.bz-garage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.bz-garage-label {
  font-size: 15px;
  font-weight: bold;
  color: #FFD700;
}

.bz-garage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

/* ─── Spieler-Auto-Karte (BackSelCarTL) ──────────────────────────────────────── */
.bz-player-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: #1e1e1e;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  width: 275px;
  transition: border-color 0.15s, opacity 0.15s;
}

.bz-player-card:hover {
  border-color: #888;
}

/* Spec: gewählte Karte → Opacity 66 (das abzugebende Auto) */
.bz-player-card.bz-pcar-selected {
  border-color: #FFD700;
  opacity: 0.66;
}

.bz-pcar-img-wrap {
  width: 76px;
  height: 54px;
  flex-shrink: 0;
  position: relative;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
}

.bz-pcar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bz-pcar-brand {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.75;
}

.bz-pcar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bz-pcar-driver {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #bbb;
}

.bz-select-indicator {
  font-size: 11px;
  color: #FFD700;
  margin-left: auto;
  padding-left: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.bz-pcar-selected .bz-select-indicator {
  color: #4d4;
}

.bz-pcar-selected .bz-select-indicator::before {
  content: '✓ ';
}

.bz-empty {
  color: #888;
  font-size: 14px;
  text-align: center;
  width: 100%;
  padding: 12px;
}

/* ─── OK-Bar ─────────────────────────────────────────────────────────────────── */
.bz-ok-bar {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.bz-btn-ok {
  background: #2a7;
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.bz-btn-ok:hover { background: #3b9; }

.bz-btn-cancel {
  background: #a22;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.bz-btn-cancel:hover { background: #c33; }

/* ─── Bestätigungs-Banner (BackSelCarTCA) ────────────────────────────────────── */
.bz-confirmation {
  background: #0d2b1a;
  border: 2px solid #2a7;
  border-radius: 8px;
  padding: 28px 20px;
  margin-top: 24px;
  text-align: center;
}

.bz-confirm-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.bz-confirm-icon { font-size: 40px; }

.bz-confirm-msg {
  color: #6f6;
  font-size: 15px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0;
}
