/* ==========================================================================
   Swiss Unihockey Widgets - Gemeinsames Styling (Tabelle & Spielplan)
   ========================================================================== */

.suh-container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: Arial, sans-serif;
  color: #1F2937;
}

.suh-container h2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* Tabellen-Styles */
.suh-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.suh-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.suh-table th, .suh-table td {
  padding: 12px 15px;
  border: 1px solid #E5E7EB;
  text-align: center;
}

.suh-table th {
  color: #ffffff;
  background-color: #060664;
  font-weight: bold;
}

.suh-table tbody tr:nth-child(even) {
  background-color: #F9FAFB;
}

.suh-team-logo {
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Spielplan-Styles */
.suh-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1rem;
}

.suh-tabs button {
  all: unset;
  cursor: pointer;
  padding: .5rem 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: background .2s, color .2s;
}

.suh-tabs button.active {
  background: #060664;
  color: #fff;
  border-color: #002366;
}

.suh-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  padding: 1rem;
  margin-bottom: 1rem;
}

.suh-card.win { background: #ddffdd; }
.suh-card.loss { background: #ffdddd; }
.suh-card.draw { background: #dddddd; }

.suh-team {
  display: flex;
  align-items: center;
  font-weight: 600;
  justify-self: start;
}

.suh-team.away {
  justify-self: end;
  text-align: right;
}

.suh-match-info {
  justify-self: center;
  text-align: center;
}

.suh-match-time {
  font-weight: 700;
  color: #0D47A1;
}

.suh-venue {
  font-size: .85rem;
  color: #64748B;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .suh-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.5rem;
  }

  .suh-team, .suh-team.away {
    justify-self: center;
    text-align: center;
    justify-content: center;
  }
  
  .suh-team.away {
    grid-row: 3;
  }

  .suh-match-info {
    grid-row: 2;
    width: 100%;
  }
}