/* ============================================================
   results.css — Shared styles for all tournament result pages
   Per-file: define --r-bg, --r-bg-img, --r-text, --r-th-hover,
             --r-hover, --r-shadow (as inline <style> :root block)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:    #ffffff;
  --offwhite: #f4f5f8;
  --text:     #111827;
  --muted:    #6b7280;
}

html { scroll-behavior: smooth; }

body {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 16px;
  background-color: var(--r-bg);
  background-image: var(--r-bg-img);
  background-size: auto;
  background-position: top center;
  background-attachment: scroll;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 40px;
}

.td-title {
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 800;
  background: var(--r-bg);
  color: var(--r-text);
  padding: 10px 20px;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  letter-spacing: .04em;
  text-align: center;
}

.infoTable-wrap {
  display: inline-block;
  border: 5px solid #000000;
}

.infoTable {
  background-color: #ffffff;
  color: #000000;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  border-collapse: collapse;
}

.infoTable td {
  padding: 6px 10px;
  border: 2px solid #000000;
  font-size: clamp(13px, 2.5vw, 17px);
}

.eventname {
  background-color: var(--r-bg);
  color: var(--r-text);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  font-size: clamp(14px, 3.5vw, 22px);
  font-weight: bold;
}

.description {
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
  font-size: clamp(13px, 2.5vw, 17px);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 16px 0;
  box-shadow: 0 4px 24px var(--r-shadow) !important;
  border-radius: 0 !important;
  display: flex;
  justify-content: center;
}

@media (max-width: 767px) {
  .table-wrap { justify-content: flex-start; }
}

#pTable {
  border-collapse: collapse;
  background: var(--white);
  font-size: clamp(13px, 2vw, 16px);
  min-width: 560px;
}

#pTable th, #pTable td { border: 2px solid #000000 !important; }

#pTable th {
  background: var(--r-bg);
  color: var(--r-text);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  padding: 12px 10px;
  font-size: clamp(11px, 1.8vw, 14px);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
#pTable th:hover { background: var(--r-th-hover); }

#pTable td {
  padding: 10px;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
}
#pTable td:nth-child(2) { text-align: left; }

#pTable tr.even { background-color: #ffffff; }
#pTable tr.odd  { background-color: #eeeeee; }
#pTable tbody tr:hover { background: var(--r-hover); }

#pTable tbody tr.rank-1 td:first-child { color: #d4a017; font-weight: 800; font-size: 1.15em; }
#pTable tbody tr.rank-2 td:first-child { color: #8a9bb0; font-weight: 800; }
#pTable tbody tr.rank-3 td:first-child { color: #b36a30; font-weight: 800; }

@media (max-width: 480px) {
  .table-wrap { margin: 16px 8px 0; }
}
@media (min-width: 900px) {
  .table-wrap { margin: 28px 24px 0; }
}
