/**
 * Pro Tourny — Premium UI layer (public site)
 * Card tournament list (web), empty states, poster placeholders, pillar icons
 */

/* ----- Shared empty states ----- */
.pt-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: clamp(2rem, 5vw, 3rem) 1.25rem;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  color: #64748b;
}

.pt-empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.35rem;
  line-height: 1;
}

.pt-empty-state-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.pt-empty-state-text {
  max-width: 28rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #64748b;
}

body.welcome-home-v2 .tabs-empty.pt-empty-state,
body.welcome-home-v2 .tabs-empty:empty {
  border: none;
  background: transparent;
}

body.welcome-home-v2 #tabsEmpty.pt-empty-state {
  margin-top: 0.5rem;
}

/* ----- Rich poster placeholder ----- */
.tournament-poster-placeholder--rich {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  height: 100%;
  min-height: 4.5rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #e0e7ff 0%, #f1f5f9 48%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  color: #475569;
  overflow: hidden;
}

.tournament-poster-placeholder-initial {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: #1e40af;
  letter-spacing: -0.03em;
}

.tournament-poster-placeholder-sport {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- Home pillar icons ----- */
body.welcome-home-v2 .welcome-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

body.welcome-home-v2 .welcome-pillar-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

body.welcome-home-v2 .welcome-pillar-icon--gold {
  background: #fef3c7;
  color: #d97706;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

body.welcome-home-v2 .welcome-pillar-icon--green {
  background: #d1fae5;
  color: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.12);
}

/* ----- Web desktop: premium tournament cards ----- */
@media (min-width: 901px) {
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap {
    overflow: visible;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table thead {
    display: none;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row {
    display: grid;
    grid-template-columns: 5.75rem minmax(0, 1fr) minmax(0, 1.25fr) auto auto 9.25rem;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.3rem 0.65rem;
    padding: 1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.04),
      0 8px 28px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover {
    border-color: #bfdbfe;
    box-shadow:
      0 2px 4px rgba(15, 23, 42, 0.04),
      0 14px 36px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover td {
    background: transparent;
    border-bottom-color: transparent;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody tr.welcome-tournament-row:hover td:first-child {
    box-shadow: none;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    vertical-align: middle;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td::before {
    display: none !important;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.88rem;
    color: #64748b;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    text-align: center;
    width: 100%;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    justify-self: center;
    text-align: center;
    width: 100%;
    font-size: 0.88rem;
    color: #475569;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(5) {
    grid-column: 4;
    grid-row: 1 / 3;
    align-self: center;
    text-align: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(6) {
    grid-column: 5;
    grid-row: 1 / 3;
    align-self: center;
    text-align: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(7) {
    grid-column: 6;
    grid-row: 1 / 3;
    align-self: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td:nth-child(8) {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: stretch;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table tbody td strong {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournament-poster,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournament-poster-placeholder--rich {
    width: 5.75rem;
    height: 5.75rem;
    min-height: 5.75rem;
    border-radius: 14px;
    object-fit: cover;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-poster-stack {
    width: 5.75rem;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .th-poster,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-poster {
    border-left: none;
    min-width: 0;
    max-width: none;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack {
    flex-direction: column;
    gap: 0.4rem;
    min-width: 8.5rem;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-score {
    background: #fff;
    color: #1a2332;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    box-shadow: none;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-score:hover,
  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-action-stack .btn-score:active {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-date-line {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-dates-cell {
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-date-line--range {
    line-height: 1.35;
    text-align: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .tournaments-table .td-stat {
    width: auto;
    min-width: 0;
    padding: 0 0.1rem !important;
    font-size: 0.82rem;
    color: #64748b;
    text-align: center;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .welcome-tournament-stat {
    gap: 0.22rem;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .welcome-tournament-stat-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .welcome-tournament-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .welcome-tournament-stat-label {
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  body.welcome-page:not(.pt-native-app) .welcome-tournaments-table-wrap .td-venue-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-home-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: auto;
    max-width: 100%;
    min-width: 0;
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-home-name {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-gmaps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-gmaps-btn:hover,
  body.welcome-page:not(.pt-native-app) .welcome-venue-gmaps-btn:focus-visible {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-gmaps-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
  }

  body.welcome-page:not(.pt-native-app) .welcome-venue-maps-empty {
    color: #94a3b8;
  }
}

/* Public directory pages — subtle polish */
body.pt-directory-v2.pt-public-page {
  background:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(37, 99, 235, 0.1), transparent 55%),
    linear-gradient(180deg, #e8eef8 0%, #f1f5f9 28%, #f8fafc 100%);
}

body.pt-directory-v2 .pt-directory-about,
body.pt-directory-v2 .pt-directory-list-section {
  border-radius: 18px;
}

/* Tournament details — no dashed empty banners on public tabs */
body.td-details-page .dash-empty[hidden] {
  display: none !important;
}
