/* ============================================================
   ProFX League - adapted from profxleague theme (light theme)
   Source: assets/frontend/css/style.css lines 20095–20373
   --theme-color  → #15831d
   --theme-color2 → #c19d38
   --black-color3 → #fff  (was dark card bg)
   --black-color  → #f9f9f5
   --title-color  → #1a1a1a
   ============================================================ */

/* ── Base tournament-card ──────────────────────────────────── */
.tournament-card {
  --border-width: 1px;
  --border-radius: 30px;
  display: flex;
  align-items: center;
}

/* ── style2 variant ───────────────────────────────────────── */
.tournament-card.style2 {
  background: transparent;
  padding: 0;
}

.tournament-card.style2 .tournament-card-img {
  text-align: center;
  margin: 0;
  padding: 42px 72px;
  border: 0;
  position: relative;
  z-index: 1;
}

.tournament-card.style2 .tournament-card-img:before,
.tournament-card.style2 .tournament-card-img:after {
  -webkit-clip-path: polygon(
    22% 0%,
    78% 0%,
    100% 50%,
    78% 100%,
    22% 100%,
    0% 50%
  );
  clip-path: polygon(22% 0%, 78% 0%, 100% 50%, 78% 100%, 22% 100%, 0% 50%);
  content: "";
  position: absolute;
  background: #d8d8d8;
  z-index: -1;
  inset: 0;
  transition: 0.4s;
}

.tournament-card.style2 .tournament-card-img:after {
  inset: 1px;
  background: #f9f9f5;
}

.tournament-card.style2 .tournament-card-img img {
  max-width: 90px;
  height: 100px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.tournament-card.style2 .tournament-card-versus {
  display: none;
}

.tournament-card.style2 .tournament-card-content {
  position: relative;
  margin: 0 -28.5px;
  width: -webkit-fill-available;
  width: -moz-available;
  width: fill-available;
  flex: 1 1 0%;
  min-width: 0;
}

.tournament-card.style2 .tournament-card-content .tournament-card-meta {
  position: absolute;
  bottom: -11px;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: max-content;
}

.tournament-card.style2 .tournament-card-content .tournament-card-meta span {
  padding: 5px 24px;
  --border-radius: 8px;
  background-color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.tournament-card.style2 .tournament-card-content .tournament-card-details {
  padding: 28px 40px 56px;
  display: flex;
  position: relative;
  z-index: 1;
  gap: 30px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tournament-card.style2
  .tournament-card-content
  .tournament-card-details:before,
.tournament-card.style2
  .tournament-card-content
  .tournament-card-details:after {
  -webkit-mask-image: url(../images/league/tournament-card2-bg.png);
  mask-image: url(../images/league/tournament-card2-bg.png);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  content: "";
  position: absolute;
  background: #d8d8d8;
  z-index: -1;
  inset: 0;
  transition: 0.4s;
}

.tournament-card.style2
  .tournament-card-content
  .tournament-card-details:after {
  inset: 1px 2px;
  background: #fff;
}

.tournament-card.style2 .tournament-card-content .card-title-wrap {
  flex: none;
  min-width: 200px;
}

.tournament-card.style2 .tournament-card-content .tournament-card-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #15831d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  display: block;
}

.tournament-card.style2.final-round
  .tournament-card-content
  .tournament-card-subtitle {
  color: #c19d38;
}

.tournament-card.style2 .tournament-card-content .tournament-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0;
  margin-top: 0;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.tournament-card.style2 .tournament-card-content .tournament-card-date-wrap {
  background: #f9f9f5;
  border-radius: 20px;
  padding: 15px 30px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Hover - green */
.tournament-card.style2.active .tournament-card-details:before,
.tournament-card.style2.active .tournament-card-img:before,
.tournament-card.style2:hover .tournament-card-details:before,
.tournament-card.style2:hover .tournament-card-img:before {
  background: #15831d;
}

/* Final round - always gold */
.tournament-card.style2.final-round .tournament-card-details:before,
.tournament-card.style2.final-round .tournament-card-img:before {
  background: #c19d38;
}
.tournament-card.style2.final-round:hover .tournament-card-details:before,
.tournament-card.style2.final-round:hover .tournament-card-img:before {
  background: #c19d38;
}

/* ── Gradient border tag ──────────────────────────────────── */
.gradient-border {
  --border-radius: 8px;
  position: relative;
  background:
    linear-gradient(to right, #15831d, #c19d38),
    linear-gradient(to right, #15831d, #c19d38);
  background-position:
    var(--border-radius) 0,
    var(--border-radius) 100%;
  background-repeat: no-repeat;
  background-size: calc(100% - var(--border-radius) - var(--border-radius)) 1px;
}
.gradient-border:before {
  content: "";
  display: block;
  position: absolute;
  width: var(--border-radius);
  top: 0;
  bottom: 0;
  left: 0;
  border: 1px solid #15831d;
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
  border-right-color: transparent;
}
.gradient-border:after {
  content: "";
  display: block;
  position: absolute;
  width: var(--border-radius);
  top: 0;
  bottom: 0;
  right: 0;
  border: 1px solid #c19d38;
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  border-left-color: transparent;
}

/* ── Countdown ────────────────────────────────────────────── */
.league-countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.league-countdown .time-box {
  text-align: center;
}
.league-countdown .time-box span {
  display: block;
  padding: 6px 10px;
  color: #0e5941;
  border: 2px solid #0e5941;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  min-width: 38px;
  background: rgba(14, 89, 65, 0.06);
}
.league-countdown .time-box small {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  color: #888;
  font-weight: 600;
}
.league-status-completed {
  font-weight: 700;
  padding: 6px 16px;
  color: #0e5941;
  border: 2px solid rgba(14, 89, 65, 0.3);
  border-radius: 50px;
  font-size: 0.82rem;
  background: rgba(14, 89, 65, 0.07);
  white-space: nowrap;
}
.league-status-started {
  font-weight: 700;
  padding: 6px 16px;
  color: #15831d;
  border: 2px solid rgba(21, 131, 29, 0.4);
  border-radius: 50px;
  font-size: 0.82rem;
  background: rgba(21, 131, 29, 0.1);
  white-space: nowrap;
}

/* ── btn-wrap ─────────────────────────────────────────────── */
.btn-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

/* ── th-btn ───────────────────────────────────────────────── */
.th-btn {
  position: relative;
  z-index: 2;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-align: center;
  background: linear-gradient(135deg, #0e5941, #15831d);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  padding: 14px 28px;
  min-width: 140px;
  clip-path: polygon(
    15px 0%,
    calc(100% - 15px) 0%,
    100% 50%,
    calc(100% - 15px) 100%,
    15px 100%,
    0% 50%
  );
  transition: 0.25s;
  text-decoration: none;
  cursor: pointer;
}
.th-btn:hover {
  background: linear-gradient(135deg, #c19d38, #e8c96b);
  color: #1a1a1a;
  transform: scale(1.04);
}
.th-btn.btn-sm {
  padding: 10px 22px;
  min-width: 100px;
  font-size: 0.8rem;
}

/* ── Tournament table ─────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  overflow-y: hidden;
}
.tournament-table {
  border: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-top: -10px;
  margin-bottom: -10px;
  width: 100%;
}
.tournament-table thead {
  background: linear-gradient(135deg, #0e5941, #15831d);
  clip-path: polygon(2% 0%, 98% 0%, 100% 50%, 98% 100%, 2% 100%, 0% 50%);
}
.tournament-table thead th {
  border: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 48px;
  padding: 0 16px;
}
.tournament-table thead th:first-child {
  padding-left: 50px;
  text-align: left;
}
.tournament-table thead th:nth-child(2) {
  text-align: left;
}
.tournament-table thead th:last-child {
  padding-right: 50px;
}

@media (max-width: 575px) {
  .tournament-table thead th {
    font-size: 0.72rem;
    line-height: 36px;
    padding: 0 8px;
    letter-spacing: 0;
  }
  .tournament-table thead th:first-child {
    padding-left: 20px;
  }
  .tournament-table thead th:last-child {
    padding-right: 20px;
  }
  .tournament-table tbody tr th,
  .tournament-table tbody tr td {
    font-size: 0.8rem;
    padding: 8px 8px;
  }
  .tournament-table tbody tr th {
    font-size: 0.85rem;
  }
}
.tournament-table tbody tr {
  clip-path: polygon(2% 0%, 98% 0%, 100% 50%, 98% 100%, 2% 100%, 0% 50%);
  background: #f9f9f5;
  transition: background 0.2s;
}
.tournament-table tbody tr:hover {
  background: rgba(14, 89, 65, 0.06);
}
.tournament-table tbody tr.top1 {
  background: rgba(193, 157, 56, 0.1);
}
.tournament-table tbody tr.top2 {
  background: rgba(150, 150, 150, 0.08);
}
.tournament-table tbody tr.top3 {
  background: rgba(176, 112, 54, 0.08);
}
.tournament-table tbody tr.top1:hover {
  background: rgba(193, 157, 56, 0.18);
}
.tournament-table tbody tr th,
.tournament-table tbody tr td {
  border: 0;
  vertical-align: middle;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  padding: 10px 16px;
}
.tournament-table tbody tr th {
  text-align: center;
  font-size: 1.1rem;
  color: #888;
}
.tournament-table tbody tr td {
  text-align: center;
}
.tournament-table tbody tr td:nth-child(2) {
  text-align: left;
}
.tournament-table tbody tr td .prize-amount {
  color: #0e5941;
  font-weight: 700;
}
.tournament-table tbody tr.top1 td .prize-amount,
.tournament-table tbody tr.top2 td .prize-amount,
.tournament-table tbody tr.top3 td .prize-amount {
  color: #c19d38;
  font-size: 1.05rem;
}

/* ── Checklist ────────────────────────────────────────────── */
.checklist ul {
  padding-left: 0;
  list-style: none;
  margin-bottom: 0;
}
.checklist li {
  color: #444;
  font-weight: 400;
  font-size: 0.93rem;
  line-height: 1.6;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.checklist li:not(:last-child) {
  margin-bottom: 14px;
}
.checklist li > i {
  color: #15831d;
  margin-top: 4px;
  flex-shrink: 0;
}

/* ── League sub-title ─────────────────────────────────────── */
.league-sub-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #15831d;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── cfx-stats pills ──────────────────────────────────────── */
.cfx-stats {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.cfx-stats li {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
}
.cfx-stats li strong {
  color: #e8c96b;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* 992px–1199px: images on top row, content below - details still in a row */
@media (max-width: 1199px) {
  .tournament-card.style2 {
    display: flex;
    text-align: start;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
  }
  .tournament-card.style2 .tournament-card-versus {
    display: block;
  }
  .tournament-card.style2 .tournament-card-content {
    order: 3;
    margin: 0;
    width: 100%;
    flex: 1 1 100%;
  }
  .tournament-card.style2 .tournament-card-content .tournament-card-title {
    font-size: 30px;
  }
}

/* 768px–991px: wrap the 3-column details panel to prevent overflow */
@media (max-width: 991px) {
  .tournament-card.style2 .tournament-card-content .tournament-card-details {
    flex-wrap: wrap;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    padding: 28px 30px 85px;
    gap: 20px;
  }
  .tournament-card.style2
    .tournament-card-content
    .tournament-card-details:after,
  .tournament-card.style2
    .tournament-card-content
    .tournament-card-details:before {
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .tournament-card.style2
    .tournament-card-content
    .tournament-card-details:after {
    inset: 1px;
  }
  .tournament-card.style2 .tournament-card-content .card-title-wrap {
    min-width: auto;
    width: 100%;
    text-align: center !important;
  }
  .tournament-card.style2 .tournament-card-content .tournament-card-meta {
    bottom: 30px;
  }
}

/* ≤767px: tighten image padding, shrink versus */
@media (max-width: 767px) {
  .tournament-card.style2 .tournament-card-img {
    padding: 35px 55px;
  }
  .tournament-card.style2 .tournament-card-versus {
    width: 80px;
  }
  .tournament-card.style2 .tournament-card-content .tournament-card-details {
    padding: 28px 40px 85px;
    gap: 25px;
  }
}

/* ≤575px: match original theme padding + shrink images */
@media (max-width: 575px) {
  .tournament-card.style2 .tournament-card-img img {
    max-width: 60px;
    height: auto;
  }
  .tournament-card.style2 .tournament-card-versus {
    width: 60px;
  }
  .tournament-card.style2 .tournament-card-img {
    padding: 30px 47px;
  }
  .tournament-card.style2 .tournament-card-content .tournament-card-meta {
    width: 100%;
  }
}

/* ≤375px: match original theme */
@media (max-width: 375px) {
  .tournament-card.style2 .tournament-card-img {
    padding: 20px 37px;
  }
  .tournament-card.style2 .tournament-card-img img {
    max-width: 50px;
  }
}

/* ≤320px: match original theme */
@media (max-width: 320px) {
  .tournament-card.style2 .tournament-card-img {
    padding: 20px 31px;
  }
  .tournament-card.style2 .tournament-card-versus {
    width: 40px;
  }
}
