table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
}

th, td {
  border: 1px solid #ccc !important;
  padding: 0 5px;
  height: 50px;
}

td:has(button) {
  text-align: center;
  vertical-align: middle;
}

th {
  background-color: #f2f2f2;
}

tr:hover {
  background-color: #f9f9f9;
}

/* Alternado de filas */
tr:nth-child(odd) td {
  background-color: #fff;
}

tr:nth-child(even) td {
  background-color: #f4f4f2;
}

/* Botones dentro de tabla */
td .buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 5%;
  height: 100%;
}

td .buttons a {
  display: flex;
  align-items: center;
  height: 100%;
  cursor: pointer;
}

td .buttons img {
  height: 90%;
  width: 100%;
  transition: 0.1s;
}

td .buttons img:hover {
  transform: scale(1.05);
}

/* Imagen */
.img-equipo {
  height: 50px;
  padding: 3%;
  cursor: pointer;
}

/* Overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#overlayImg {
  max-width: 90%;
  max-height: 90%;
}

#overlay .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

/* Filtrado */
tr.hidden {
  display: none;
}

/* Botón tabla */
.btn-table {
  border: none;
  background: transparent;
  width: 50px;
  transition: 0.2s;
}

.btn-table:hover {
  transform: scale(1.04);
}

/* Tabla principal */
#items-table {
  width: 100%;
  table-layout: auto;
  margin-bottom: 5%;
}

#items-table th,
#items-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 110px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

/* MOBILE */
@media (max-width: 800px) {
  
  #items-table {
    width: 100%;
  }

  #items-table th,
  #items-table td { 
    word-break: initial;
    padding: 4px;
    min-width: 120px;
  }
}