/* bootstrap */
body {
--bs-body-bg: rgb(37, 62, 86);
--bs-body-color: #e0e0e0;
}

.table {
--bs-table-hover-bg: rgb(255, 102, 102);
--bs-table-hover-color: #000;
--bs-table-striped-bg: rgba(255, 255, 255, 0.03);
--bs-border-color: rgba(255, 255, 255, 0.15);
}

/* custom */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background-color: rgb(255, 102, 102); }
.sort-icon { font-size: 0.8em; margin-left: 4px; opacity: 0.4; }
th .sort-icon { opacity: 0; }
th.active-sort .sort-icon { opacity: 1; color: #000; }
.table-responsive { border-radius: 10px; }

.form-control:focus,
.form-select:focus {
    box-shadow: none;
}

.player-search { max-width: 220px; }

@media (max-width: 600px) {
    table { font-size: 0.8em; }
}

@media (max-width: 1000px) {
    th .sort-icon { display: none; }
}

@media (min-width: 1000px) {
  .table { table-layout: fixed; width: 100%; }
  .table th[data-key="lastname"] { width: 19.5%; }
  .table th.sortable:not([data-key="lastname"]) { width: 11.5%; }
}

@media (min-height: 500px) {
    /* Erlaubt internes Scrollen für die Tabelle */
    .table-responsive {
      max-height: 75vh;
      overflow-y: auto;
    }
    
    /* Fixiert die Header-Zeile oben im Container */
    .table thead th {
      position: sticky;
      top: 0;
      z-index: 10;
    }
    
    .top-link {
        display: none;
    }
}

/* Formulardetails auf kleinen Bildschirmen verkleinern */
@media (max-width: 767.98px) {
  /* Buttons verkleinern */
  .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Suchfeld & Icons verkleinern */
  .input-group .input-group-text,
  .input-group .form-control {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .player-search { max-width: 200px; }

  /* Dropdowns verkleinern */
  .form-select {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.8rem;
  }
}


/* Container übernimmt die absolute Platzierung oben rechts */
.top-nav-container {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2em;
}

/* Gemeinsames Grunddesign für beide Buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a !important;
  background: #e9e9ed;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  padding: 0; /* padding: 0 sorgt dafür, dass width & height exakt greifen */
}

/* Desktop-Größe für die Buttons */
.top-nav-container .nav-btn {
  width: 3rem;
  height: 3rem;
}

/* Desktop-Inhaltsgrößen */
#home .bi-house {
  width: 1.8rem;
  height: 1.8rem;
}

#gender-switch {
  font-size: 1.8rem;
}

/* Hover & Focus für beide Buttons (Desktop) */
@media (min-width: 769px) {
  .nav-btn:hover,
  .nav-btn:focus {
    background: #f9e88b;
  }
}

/* Mobilgeräte (kompakter & untereinander) */
@media (max-width: 767.98px) {
  .top-nav-container {
    top: 0.4rem;
    right: 0.5rem;
    flex-direction: column-reverse; /* Home oben, Gender-Button darunter */
    align-items: flex-end;
    gap: 0.35rem; /* Etwas geringerer Abstand */
  }

  /* Feste Button-Größe mobil reduzieren */
  .top-nav-container .nav-btn {
    width: 2.4rem;
    height: 2.4rem;
  }

  /* Icons & Text proportional für mobile Größe anpassen */
  #home .bi-house {
    width: 1.3rem;
    height: 1.3rem;
  }

  #gender-switch {
    font-size: 1.1rem;
  }
}
