/* Trainerliste Widget Styles */
.trainer-list-widget {
  width: 100%;
  overflow-x: auto;
}

/* Suchfeld Styles */
.trainer-search-container {
  position: relative;
  margin-bottom: 1.5rem;
  width: 100%;
}
.trainer-search-container .trainer-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  border: 2px solid #e1e5e9;
  border-radius: 0.5rem;
  font-family: var(--e-global-typography-text-font-family);
  line-height: var(--e-global-typography-text-line-height);
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.trainer-search-container .trainer-search-input:focus {
  outline: none;
  border-color: var(--e-global-color-primary);
  box-shadow: 0 0 0 3px rgba(var(--e-global-color-primary), 0.1);
}
.trainer-search-container .trainer-search-input::placeholder {
  color: #6c757d;
  opacity: 1;
}
.trainer-search-container .trainer-search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 0.875rem;
  pointer-events: none;
}

/* Keine Ergebnisse Meldung */
.trainer-no-results {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  font-style: italic;
}
.trainer-no-results p {
  margin: 0;
  font-family: var(--e-global-typography-text-font-family);
}

.trainer-list-table {
  width: 100%;
  font-size: 1.125rem;
  border-collapse: collapse;
  border: 1px solid #e1e5e9;
  background-color: #ffffff;
  font-family: var(--e-global-typography-text-font-family);
  line-height: var(--e-global-typography-text-line-height);
}
.trainer-list-table thead th {
  background-color: var(--e-global-color-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #e1e5e9;
  font-family: var(--e-global-typography-primary-font-family);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}
.trainer-list-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}
.trainer-list-table thead th.sortable:hover {
  background-color: var(--e-global-color-accent, #0056b3);
}
.trainer-list-table thead th.sortable.sorted-asc, .trainer-list-table thead th.sortable.sorted-desc {
  background-color: var(--e-global-color-accent, #0056b3);
}
.trainer-list-table thead th .sort-indicator {
  display: inline-block;
  margin-left: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.trainer-list-table thead th .sort-indicator i {
  font-size: 0.75rem;
}
.trainer-list-table thead th.sortable:hover .sort-indicator, .trainer-list-table thead th.sortable.sorted-asc .sort-indicator, .trainer-list-table thead th.sortable.sorted-desc .sort-indicator {
  opacity: 1;
}
.trainer-list-table tbody tr {
  transition: background-color 0.2s ease;
}
.trainer-list-table tbody tr:hover {
  background-color: #f8f9fa;
}
.trainer-list-table tbody tr.odd {
  background-color: #f8f9fa;
}
.trainer-list-table tbody td {
  padding: 0.75rem 1rem;
  border: 1px solid #e1e5e9;
  vertical-align: top;
  font-weight: var(--e-global-typography-text-font-weight);
}
.trainer-list-table tbody td.trainer-name {
  font-weight: 500;
}
.trainer-list-table tbody td.trainer-firstname {
  font-weight: 500;
}
.trainer-list-table tbody td.trainer-team {
  font-weight: 500;
}
.trainer-list-table tbody td.trainer-phones {
  font-weight: 500;
}
.trainer-list-table tbody td.trainer-phones a {
  color: var(--e-global-color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.trainer-list-table tbody td.trainer-phones a:hover {
  color: var(--e-global-color-accent, #0056b3);
  text-decoration: underline;
}
.trainer-list-table tbody td.trainer-phones br {
  line-height: 1.5;
}

@media screen and (max-width: 767px) {
  .trainer-list-widget {
    background-color: transparent;
  }
  .trainer-list-table {
    background-color: transparent !important;
    border: none !important;
  }
  .trainer-list-table,
  .trainer-list-table thead,
  .trainer-list-table tbody,
  .trainer-list-table th,
  .trainer-list-table td,
  .trainer-list-table tr {
    display: block;
  }
  .trainer-list-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .trainer-list-table tbody {
    background-color: transparent !important;
  }
  .trainer-list-table tr {
    border: 1px solid var(--e-global-color-border, #e1e5e9);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  .trainer-list-table tr::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
  }
  .trainer-list-table tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
  .trainer-list-table tr:hover::before {
    left: 100%;
  }
  .trainer-list-table .trainer-list-table tbody tr:nth-child(odd),
  .trainer-list-table .trainer-list-table tbody tr:nth-child(even),
  .trainer-list-table .trainer-list-table tbody tr.odd,
  .trainer-list-table .trainer-list-table tr:nth-child(odd),
  .trainer-list-table .trainer-list-table tr:nth-child(even),
  .trainer-list-table .trainer-list-table tr.odd {
    background-color: #ffffff !important;
  }
  .trainer-list-table .trainer-list-table tbody tr:hover,
  .trainer-list-table .trainer-list-table tr:hover {
    background-color: #ffffff !important;
  }
  .trainer-list-table td {
    border: none !important;
    position: relative;
    padding: 0.25rem 0 0.25rem 35% !important;
    text-align: left;
    font-size: rem;
    line-height: 1.2;
    z-index: 1;
  }
  .trainer-list-table td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0;
    width: 32%;
    font-weight: 600;
    color: var(--e-global-color-primary);
    letter-spacing: 0.3px;
  }
  .trainer-list-table td.trainer-name:before {
    content: "Name: ";
  }
  .trainer-list-table td.trainer-firstname:before {
    content: "Vorname: ";
  }
  .trainer-list-table td.trainer-team:before {
    content: "Team: ";
  }
  .trainer-list-table td.trainer-phones:before {
    content: "Telefon: ";
  }
}
