/* Judo Turnier Übersicht – Frontend-Styles */

/* Grundlayout */
.turnier-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.turnier-table thead th {
  background: #003b70;
  color: #fff;
  padding-right: 0.75rem;
  text-align: left;
}

.turnier-table tbody tr:nth-child(even) {
  background: #f5f7fa;
}

.turnier-table tbody tr:hover {
  background: #e7f3ff;
}

/* Buttons */
.turnier-table .button {
  margin-bottom: 2px;
  line-height: 1.3;
  padding: 0.35em 0.9em;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.turnier-table .button .dashicons {
  line-height: 1;
}

.turnier-table .button.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #005177;
}

.turnier-table .button-primary {
  background: #0073aa;
  border-color: #0073aa;
}

.turnier-table .button-primary:hover,
.turnier-table .button-primary:focus {
  background: #006598;
  border-color: #006598;
}


/* Details/Dropdown in Tabelle */
.turnier-table details.turnier-actions {
  position: relative;
  display: inline-block;
}

.turnier-table details.turnier-actions summary {
  list-style: none;
  cursor: pointer;
}

.turnier-table details.turnier-actions summary::-webkit-details-marker {
  display: none;
}

.turnier-table .actions-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 0.5em;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  white-space: nowrap;
  border-radius: 0.5em;
}

.turnier-table details.turnier-actions[open] .actions-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25em;

}
@media (min-width: 550.5px) {
  .turnier-table details.turnier-actions[open] .actions-dropdown {
    left: -130px;
    right: 0px;
  }
}
/* Einzelfelder schmaler machen */
.turnier-table .actions-dropdown .button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.3em;
}



/* etwas pastellig-blauer Hintergrund und dunklere Schrift */
.turnier-table .turnier-admin-btn {
  background-color: #e7f3ff;
  border-color: #a2c9f1;
  color: #034f84;
}

/* beim Hover leicht abdunkeln */
.turnier-table .turnier-admin-btn:hover {
  background-color: #d0e7ff;
  border-color: #7eaee3;
}
/* Header-Button “Neues Turnier anlegen” auffällig machen */
.turnier-header-aktionen {
  position: relative;
}

.add-new-tournament-btn {
  margin-left: 0.5em;
  padding: 0.4em 0.8em;
  font-weight: bold;
  background-color: #ffba00!important;
  border-color: #e6a700!important;
  color: #222;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.add-new-tournament-btn:hover {
  background-color: #ffc94d!important;
  border-color: #e8b000!important;
}


/* 1) Stelle sicher, dass das Details‐Element relativ positioniert ist */
.header-admin-options {
  position: relative;
  display: inline-block; /* damit der absolute Kontext passt */
}

/* 2) Style das Dropdown als schwebendes Fenster */
.header-admin-options .header-admin-dropdown {
  position: absolute;
  top: 100%;        /* direkt unter dem Summary */
  right: 0;         /* am rechten Rand der Zelle */
  background: #fff; /* weißer Hintergrund */
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 0.5em;
  z-index: 200;     /* über allem anderen */
  display: none;    /* standardmäßig versteckt */
  min-width: 200px; /* passende Breite */
  border-radius: 0.5em;
}

/* 3) Sobald das Details geöffnet ist, Dropdown zeigen */
.header-admin-options[open] .header-admin-dropdown {
  display: flex;
  flex-direction: column; /* Buttons untereinander */
  gap: 0.5em;
  width: 204px;
}

/* 4) Entferne den Standard-Pfeil im Summary */
.header-admin-options > summary::-webkit-details-marker {
  display: none;
}

/* 5) Summary wie Button gestalten */
.header-admin-options > summary {
  
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0.5em 1em;
  font-weight: bold;
  background-color: #dc3545;
  border: 1px solid #c82333;
  border-radius: 0.5rem;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  user-select: none;
}
.extra-action-cell {
  padding: 15px !important;
}
/* Icon‐Abstand */
.header-admin-options > summary .dashicons {
  margin-right: 0.5em;
}

/* 6) Button‐Styles im Overlay */
.header-admin-dropdown .button-small {
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: #212529;
  width: 100%;
  text-align: left;
}

.header-admin-dropdown .button-small:hover {
  background-color: #e2e6ea;
}

/* turnier-table.css */
.table-action-row {
    background: #f8f9fa;
}
.table-action-row td {
    padding: 0.75rem 1rem;
}

/* --- Bestätigungs­meldung ------------------------------------------------ */
.table-confirmation-row .turnier-confirmation {
    background: #e8fae8;          /* dezentes Grün */
    color: #19692c;               /* dunkles Textgrün */
    border-left: 4px solid #33a633;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    animation: fade-in 0.35s ease-in-out;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Zentriert die Überschrift „Turnieranmeldung“ */
.turnier-table thead th[colspan="2"] {
    padding-left: 1.5em;
}

/* Mehr Abstand für die erste Zelle jeder Zeile */
.turnier-table tbody td:first-child {
    padding-left: 1.5em;
}
/* Mehr vertikales und horizontales Padding für alle Zellen */
.turnier-table tbody td {
    padding: 0.75em 1em;
}

/* “Aktionen”-Summary hervorheben */
.turnier-actions summary {
  background-color: #f5f5f5;      /* leichter Grau-Ton */
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.5rem;          /* schöne Rundung */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0.5rem 1rem;
  transition: 
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}

/* Hover: Schatten verstärken, Hintergrund leicht abdunkeln */
.turnier-actions summary:hover {
  background-color: #e0e0e0;      /* etwas dunkleres Grau */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Fokus-Ring für bessere Zugänglichkeit */
.turnier-actions summary:focus {
  background-color: #e0e0e0;      /* etwas dunkleres Grau */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.header-admin-options summary {
  background-color: #c82333;      /* bestehende Danger-Farbe */
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.header-admin-options summary:hover {
  background-color: #dc3545;      /* dunkelere Danger-Variante */
  /* dunkles Shadow für Tiefe + weißen Glow */
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.3); /* weißer Glow */
}



/* 1) Desktop: alles weiter wie gehabt */

/* 2) Mobile ab z.B. 768 px Breite */
@media (max-width: 550px) {
  /* === 0) Tabelle & Kopfzeile wieder einblenden === */
  .turnier-table,
  .turnier-table thead,
  .turnier-table tbody,
  .turnier-table tr,
  .turnier-table td {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .extra-action-cell {
  padding: 0px !important;
}

  .turnier-table thead {
    height: auto !important;
    overflow: visible !important;
  }

  /* === 1) Kopfzeile als Flex-Container === */
  .turnier-table thead tr {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-right: 0.75rem;
    background: #003b70;
    margin-bottom: 1rem;
  }

  /* Überschrift links */
  .turnier-table thead th:first-child {
    flex: 1;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0;
    margin: 0;
  }

  /* Optionen/Logout rechts */
  .turnier-table thead th.turnier-header-aktionen {
    flex: 0;
    padding: 0;
    margin: 0;
    text-align: right;
  }



  /* === 2) Jede Zeile als Karte === */
  .turnier-row {
    border-bottom: 1px solid #ddd;
    border-radius: 0;       /* wenn du nur Unterkante willst */
    padding: 1rem !important;
    margin-bottom: 1rem;
  }

  /* === 3) Feld-Container als Block === */
  .turnier-info .turnier-field {
    display: block;
    margin: 0rem;
    padding-left: 0;
  }

  /* === 4) Label ohne Leerzeichen nach ':' === */
  .turnier-field::before {
    font-weight: 600;
    margin-right: 0.25rem;
  }

  /* === 5) Buttons full-width mit Abstand === */
  .turnier-actions-column {
    padding: 0 !important;
    margin: 0 !important;
  }

  .turnier-actions-column .button {
    display: block;
    width: 100%;
  }
  /* 1) Alle Körper-Zellen umbrechen */
  .turnier-field,
  .turnier-table tbody td {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  /* 2) In der Kopfzeile kein Umbruch */
  .turnier-table thead th,
  .turnier-table thead th * {
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: nowrap;
  }
  .cum-count-button {
    margin: 15px !important;
  }
  .wkp-count-button{
    margin: 15px !important;
  }

}




.turnier-header-title {
  font-size: 1.25rem; /* oder ein beliebiger anderer Wert */
  font-weight: bold;

}
@media (max-width: 340px) {
  /* -----------------------------------------------------
 *  Nur das Wort „Hallo“ ausblenden (Name bleibt sichtbar)
 *  Breakpoint beliebig anpassen – hier 640 px
 
  .turnier-table .header-title .greeting {
    display: none;
  }
    * ----------------------------------------------------- */
    /* Nur das Wort "Optionen" ausblenden, Icon behalten */
  .turnier-table .header-admin-options summary {
    /* Text verschwinden lassen, Klick-Fläche bleibt */
    font-size: 0;          /* Text verschwindet … */
    line-height: 0;
  }
  .turnier-table .header-admin-options summary .dashicons {
    /* … Icon wieder auf normale Größe setzen */
    font-size: 20px;       /* ggf. anpassen */
    line-height: 1;
  }
  .header-admin-options > summary .dashicons {
      margin-right: 0em;
  }

}


 .first-col .turnier-location,
 .first-col .turnier-date {
     display: block;
 }
 .label-in,
 .label-am,
 .label-ak,
 .label-ms {
    font-weight: 600;
 }
 .turnier-name {
    font-weight: 600;
 }

 .turnier-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px
}

.header-title {
    margin-left: 1rem;
}

/* Orange für „Mitglieder verwalten“ und „Vereinsdaten ändern“ */
.turnier-header .header-admin-dropdown button[onclick*="#verein_role_manager"],
.turnier-header .header-admin-dropdown button[onclick*="#edit_club"] {
    background-color: orange;
    border-color: orange;
    color: #fff;
}

/* Rot für Logout */
/* Orange für „Mitglieder verwalten“ und „Vereinsdaten ändern“ */
.turnier-header .header-admin-dropdown button[onclick*="#verein_role_manager"],
.turnier-header .header-admin-dropdown button[onclick*="#edit_club"] {
    background-color: orange;
    border-color: orange;
    color: #fff;
}
.turnier-header .header-admin-dropdown button[onclick*="#verein_role_manager"]:hover,
.turnier-header .header-admin-dropdown button[onclick*="#edit_club"]:hover {
    filter: brightness(90%);
}

/* Rot für Logout mit dem Farbcode #c82333 */
.turnier-header .header-admin-dropdown button.logout-button {
    background-color: #c82333;
    border-color: #c82333;
    color: #fff;
}
.turnier-header .header-admin-dropdown button.logout-button:hover {
    filter: brightness(90%);
}

.turnier-trainer-btn{
  background-color: #77a6d4;
}

/* sanft-grüner Hintergrund für die Bestätigungszeile */
.cmsc-confirmation-row {
  background-color: #e6f9e6; /* sehr helles Grün */
}

/* optional: Textfarbe und Padding anpassen */
.cmsc-confirmation-message {
  color: #2b6a2b;    /* dunkleres Grün für den Text */
  padding: 0.5em;    /* etwas Innenabstand */
  font-weight: bold; /* Hervorhebung */
}

.turnier-table #ts-root {
  margin: 0 !important;
  padding: 0 !important;
}

.admin-button{
background-color: #ee9d81 !important;
color: black;
}

.turnier-ersteller-button{
  background-color: #ffbe47 !important;
  color: black !important;
}
.trainer-button{
  background-color: #008e92 !important;
}
.turnier-btn-anmeldung-bearbeiten {
  pointer-events: none;
  opacity: 0.6; /* optional: optisch abgehängt wirken lassen */
  cursor: default;
}
.relevantCheckbox {
  background-color: #f5f7fa;
  width: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.4em 0.6em;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  user-select: none; /* verhindert Text-Markierung bei Doppelklick */
}
.relevantCheckbox input[type="checkbox"] {
  margin: 0;
  margin-right: 0.5em;
  cursor: pointer;
}
.relevantCheckbox label {
  margin: 0;
  cursor: pointer;
}

.turnier-header {               /* = <th colspan="3" …> */
  position: fixed;           /* hält sich am Viewport fest */
  top: 0;                     /* direkt unter dem Browser-/Tab-Rand */
  z-index: 1000;              /* über allen Tabellenzeilen */
  width: 100%;
}
