/* ============================================================
   Poker Odds Calculator Block
   ============================================================ */

/* ── Container ─────────────────────────────────────────────── */
.poker-odds-calculator {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #212529;
  padding: 2rem;
}

.poc-editor-placeholder {
  border: 2px dashed #9eeaf9;
  background: #e6f7fb;
  color: #0c5460;
  border-radius: 0;
  padding: 1rem 1.25rem;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.poc-editor-placeholder strong {
  font-size: 1rem;
  line-height: 1.2;
}

.poc-editor-placeholder span {
  font-size: 0.9rem;
  opacity: 0.85;
}

@media (max-width: 767.98px) {
  .poker-odds-calculator {
    margin: 2rem auto;
    padding: 16px;
  }
}

.poc-heading {
  text-align: left;
  margin: 0 0 20px;
  font-size: 1.5rem;
  color: #212529;
}

/* ── Layout ─────────────────────────────────────────────────── */
.poc-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.poc-table-section {
  flex: 1;
  min-width: 0;
}

.poc-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Poker Table ─────────────────────────────────────────────── */
.poc-table {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;

  /* Felt */
  background:
    radial-gradient(ellipse at 50% 60%, #226e55 0%, #145840 55%, #0c3f2c 100%);

  /* Rail – pill shape */
  border: 18px solid #4a2308;
  border-radius: 500px;

  box-shadow:
    inset 0 0 70px rgba(0,0,0,0.45),
    inset 0 0 20px rgba(0,0,0,0.25),
    0 10px 40px rgba(0,0,0,0.55);
}

/* Outer rim */
.poc-table::before {
  content: '';
  position: absolute;
  inset: -30px;
  border-radius: 500px;
  border: 10px solid #2c1400;
  pointer-events: none;
}

/* Inner felt edge highlight */
.poc-table::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 500px;
  border: 2px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

/* ── Board (center of table) ─────────────────────────────────── */
.poc-board-area {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, calc(-48% + 45px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 3;
}

.poc-board-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ── Table watermark logo ────────────────────────────────────── */
.poc-table-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 45px));
  width: 76%;
  max-width: 440px;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  filter: brightness(0) invert(1);
}

.poc-board-cards {
  display: flex;
  gap: 5px;
  transform: translateY(-1px);
}

/* ── Players area ────────────────────────────────────────────── */
.poc-players-area {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.poc-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: auto;
}

.poc-player-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(0,0,0,0.55);
  padding: 2px 7px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
}

.poc-player--hero .poc-player-label {
  background: rgba(185,130,20,0.75);
  color: #fff9e0;
}

.poc-player-cards {
  display: flex;
  gap: 2px;
  transform: translateY(-1px);
}

.poc-player-result {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Card slots ──────────────────────────────────────────────── */
.poc-card-slot {
  width: 36px;
  height: 50px;
  border: 2px dashed rgba(255,255,255,0.28);
  border-radius: 5px;
  background: rgba(0,0,0,0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.poc-card-slot:hover {
  border-color: rgba(255,255,255,0.65);
  background: rgba(0,0,0,0.35);
  transform: translateY(-2px);
}

.poc-card-slot--filled {
  border-style: solid;
  border-color: rgba(255,255,255,0.5);
}

.poc-card-slot img {
  display: none;
}

.poc-card-empty {
  font-size: 18px;
  opacity: 0.35;
  color: #fff;
  user-select: none;
}

.poc-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border-radius: 3px;
  background: #f5f0e8;
  color: #222;
}

/* Board slots slightly larger */
.poc-board-slot {
  width: 46px;
  height: 64px;
}

/* ── Remove player button ────────────────────────────────────── */
.poc-remove-player {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.poc-remove-player:hover { color: #ff6b6b; text-decoration: none; }

/* ── Result badges on player ─────────────────────────────────── */
.poc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  white-space: nowrap;
}
.poc-badge--win  { background: rgba(60,180,80,0.75); }
.poc-badge--tie  { background: rgba(200,160,20,0.75); }

/* ── Sidebar controls ────────────────────────────────────────── */
.poc-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Results panel ───────────────────────────────────────────── */
.poc-results {
  background: rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  color: #212529;
}

.poc-results-header {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto auto;
  gap: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.poc-result-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto auto;
  gap: 4px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 12px;
}
.poc-result-row:last-of-type { border-bottom: none; }

.poc-result-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1;
}

.poc-result-bar-wrap {
  grid-column: 2;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  align-self: center;
}

.poc-result-bar {
  height: 100%;
  background: linear-gradient(90deg, #3cb450, #5fd86e);
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 1px;
}

.poc-result-stats {
  grid-column: 3 / span 3;
  display: flex;
  gap: 6px;
  font-size: 11px;
}

.poc-win   { color: #157347; font-weight: 700; }
.poc-tie   { color: #856404; font-weight: 600; }
.poc-loss  { color: rgba(0,0,0,0.4); }

.poc-results-note {
  font-size: 10px;
  opacity: 0.45;
  text-align: right;
  margin-top: 8px;
  color: #212529;
}

/* ── Card Picker overlay ─────────────────────────────────────── */
.poc-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.poc-picker-overlay[hidden] { display: none; }

.poc-picker {
  background: #1c1c1c;
  border-radius: 14px;
  padding: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

.poc-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.poc-picker-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.poc-picker-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.poc-picker-close svg { display: block; }
.poc-picker-close:hover { background: rgba(255,80,80,0.3); color: #ff6b6b; }

/* Suit filter buttons */
.poc-picker-suits {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.poc-suit-filter {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #495057;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.poc-suit-filter:hover,
.poc-suit-filter:focus { text-decoration: none; }

.poc-suit-filter.active,
.poc-suit-filter:hover {
  background: #f0f0f0;
  border-color: #adb5bd;
  color: #212529;
}

/* Card grid */
.poc-picker-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
}

.poc-picker-card {
  position: relative;
  aspect-ratio: 5 / 7;
  border: 2px solid transparent;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, transform 0.1s;
  text-decoration: none;
}

.poc-picker-card:hover:not(:disabled) {
  border-color: #e8a020;
  transform: scale(1.08);
  z-index: 1;
}

.poc-picker-card img {
  display: none;
}

.poc-picker-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 800;
  background: #f5f0e8;
  color: #222;
  text-decoration: none;
}

.poc-picker-card--used {
  opacity: 0.2;
  cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .poc-wrapper {
    flex-direction: column;
  }
  .poc-sidebar {
    width: 100%;
  }
  .poc-controls {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .poc-btn {
    flex: 1;
    min-width: 120px;
  }

  .poc-card-slot {
    width: 32px;
    height: 45px;
  }
  .poc-board-slot {
    width: 38px;
    height: 53px;
  }
  .poc-player-label {
    font-size: 9px;
  }

  .poc-picker-grid {
    grid-template-columns: repeat(13, 1fr);
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .poc-picker-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}
