/* Hero - menší verzia pre podstránky */
.hero--small {
  min-height: max(400px, 700px);
  padding-top: 80px;
}

/* Banlist layout */
.banlist {
  max-width: 95rem;
  margin: 0 auto;
  padding: 0 3rem 4rem;
}

/* Vyhľadávanie hráča - pôvodný dizajn */
.search-player {
  display: flex;
  width: 100%;
  background: linear-gradient(135deg, #fcecec, #ffefd9);
  padding: 20px;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.search-player__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  margin: auto;
}

.search-player__label {
  font-size: 1.3em;
  font-weight: 600;
  color: #000;
  margin-bottom: 10px;
}

.search-player__input {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border: 2px solid #6a11cb;
  border-radius: 5px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-family: inherit;
}

.search-player__input:focus {
  border-color: #2575fc;
  outline: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.search-player__btn {
  background-color: #2575fc;
  color: #fff;
  padding: 10px 20px;
  font-size: 1.1em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 600;
}

.search-player__btn:hover {
  background-color: #6a11cb;
  transform: translateY(-3px);
}

.search-player__btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Info text */
.banlist__info {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.2rem;
  width: 100%;
}

/* Empty state */
.banlist__empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
  font-size: 1.25rem;
}

/* Tabuľka wrapper - KRITICKÉ pre scroll len na tabuľke */
.banlist__table-wrapper {
  overflow-x: auto; /* Horizontal scroll */
  overflow-y: visible;
  min-height: 600px;
  position: relative;
  width: 100%; /* Nepresahuj container */
  max-width: 100%; /* KRITICKÉ - zabráň overflow celej stránky */
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  -webkit-overflow-scrolling: touch; /* Smooth scroll na iOS */
}

.banlist__table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  border: 1px solid #ddd;
  table-layout: fixed;
  min-width: 100%; /* Na desktope sa zmestí */
}

/* Fixné šírky pre každý stĺpec */
.banlist__table th:nth-child(1),
.banlist__table td:nth-child(1) {
  width: 80px; /* Typ */
}

.banlist__table th:nth-child(2),
.banlist__table td:nth-child(2) {
  width: 60px; /* ID */
}

.banlist__table th:nth-child(3),
.banlist__table td:nth-child(3) {
  width: 150px; /* Hráč */
}

.banlist__table th:nth-child(4),
.banlist__table td:nth-child(4) {
  width: 150px; /* Admin */
}

.banlist__table th:nth-child(5),
.banlist__table td:nth-child(5) {
  width: auto; /* Dôvod - zvyšok miesta */
  min-width: 200px;
}

.banlist__table th:nth-child(6),
.banlist__table td:nth-child(6) {
  width: 180px; /* Vyprší */
}

.banlist__table th,
.banlist__table td {
  padding: 0.75rem;
  vertical-align: middle;
  /*text-align: left;*/
  white-space: nowrap;
  overflow: hidden;
}

.banlist__table th {
  text-align: center;
}

.banlist__table td:first-child {
  text-align: center;
}

.banlist__table thead {
  background: #f8f9fa;
}

.banlist__table th {
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

.banlist__table tbody tr {
  border-bottom: 1px solid #ddd;
}

.banlist__table tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

.banlist__table tbody tr:hover {
  background: #f0f0f0;
}

.banlist__table tbody tr.hidden {
  display: none;
}

/* Centrované správy v prázdnej tabuľke */
.banlist__table tbody td[colspan="6"] {
  text-align: center !important;
  vertical-align: middle;
  height: 500px;
  font-size: 1.1rem;
  white-space: normal;
  overflow: visible;
}

/* Typ badge */
.type {
  display: block;
  width: 60px;
  padding: 0.5rem 0;
  margin: 0 auto;
  font-weight: bold;
  color: #fff;
  text-align: center;
  border-radius: 4px;
}

.type--ban {
  background: linear-gradient(to bottom right, #ed213a, #c4071e);
}

.type--kick {
  background: linear-gradient(to bottom right, #ff9d0a, #f5af19);
}

.type--mute {
  background: linear-gradient(to bottom right, #8a3ab7, #512da8);
}

.type--warn {
  background: linear-gradient(to bottom right, #0575e6, #0053a7);
}

/* Hráč s avatarom */
.player {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player img {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Dôvod */
.reason {
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center !important;
}

.duration {
  width: 90px !important;
  text-align: center !important;
}

/* Expiry badge */
.badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--success {
  background: #28a745;
  color: #fff;
}

.badge--warning {
  background: #ffc107;
  color: #fff;
}

.badge--danger {
  background: #dc3545;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .banlist {
    padding: 0 1rem 2rem;
  }

  .search-player {
    padding: 15px;
    margin-bottom: 1.5rem;
  }

  .search-player__form {
    padding: 15px;
    max-width: 100%;
  }

  /* Wrapper - scrolluje LEN toto */
  .banlist__table-wrapper {
    padding: 0.75rem;
    min-height: 400px;
    max-width: 100vw; /* Nikdy nepresahuj viewport */
    margin: 0 -0.75rem; /* Kompenzuj padding */
  }

  /* Tabuľka - fixná šírka, bude scrollovať */
  .banlist__table {
    min-width: 700px; /* Minimálna šírka - väčšia než mobile viewport */
    table-layout: fixed;
  }

  .banlist__table tbody td[colspan="6"] {
    height: 300px;
  }

  .banlist__table th,
  .banlist__table td {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
  }

  /* Fixné šírky na mobile - všetky stĺpce viditeľné */
  .banlist__table th:nth-child(1),
  .banlist__table td:nth-child(1) {
    width: 70px;
  }

  .banlist__table th:nth-child(2),
  .banlist__table td:nth-child(2) {
    width: 50px;
  }

  .banlist__table th:nth-child(3),
  .banlist__table td:nth-child(3) {
    width: 120px;
  }

  .banlist__table th:nth-child(4),
  .banlist__table td:nth-child(4) {
    width: 120px;
  }

  .banlist__table th:nth-child(5),
  .banlist__table td:nth-child(5) {
    width: 200px;
    min-width: 200px;
  }

  .banlist__table th:nth-child(6),
  .banlist__table td:nth-child(6) {
    width: 140px;
  }

  .player img {
    width: 24px;
    height: 24px;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Extra malé mobily */
@media (max-width: 480px) {
  .banlist {
    padding: 0 0.5rem 2rem;
  }

  .banlist__table-wrapper {
    padding: 0.5rem;
    margin: 0 -0.5rem;
  }

  .banlist__table {
    min-width: 650px; /* Mierne menšia min. šírka */
  }

  .banlist__table th,
  .banlist__table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.8rem;
  }
}
