@font-face {
  font-family: 'Sacramento';
  src: url('fonts/Sacramento/Sacramento-Regular.ttf	') format('truetype');
  font-display: swap;
}

.matcher-wrapper .duell-name-wrapper.text_schreibschrift {
  font-family: 'Sacramento', cursive;
}

@font-face {
  font-family: 'Open Sans Light';
  src: url('fonts/OpenSans/OpenSans-Light.ttf') format('truetype');
  font-weight: light;
  font-display: swap;
}

.matcher-wrapper .duell-name-wrapper.text_standard {
  font-family: 'Open Sans Light', sans-serif;
}

/* Reset + Pico-kompatible Styles */
.matcher-wrapper * {
    /* all: unset; */
    box-sizing: border-box;
  }
  .matcher-wrapper,
  .matcher-wrapper * {
    font-family: system-ui, sans-serif;
    /* line-height: 1.5; */
    /* color: #111; */
  }
  .matcher-wrapper input,
  .matcher-wrapper select,
  .matcher-wrapper button,
  /* .matcher-wrapper label, */
  .matcher-wrapper fieldset,
  .matcher-wrapper legend {
    all: unset;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
  }
  .matcher-wrapper form {
    display: flex;
    flex-direction: column;
    /* gap: 1rem; */
    /* background: white; */
    /* padding: 2rem; */
    border-radius: 8px;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
  }
  .matcher-wrapper form > label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .matcher-wrapper input[type="text"],
  .matcher-wrapper select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    padding-left: 25px;
  }

  .matcher-wrapper fieldset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  

  .matcher-wrapper legend {
    font-weight: bold;
    /* margin-bottom: 0.5rem; */
    flex-basis: 100%;
  }

  .matcher-wrapper label {
    font-weight: 600;
  }

  .matcher-wrapper h1{
    font-weight: bold;
    font-size: 1.75em;
  }
  .matcher-wrapper h2{
    font-weight: bold;
    font-size: 1.2em;
  }
  .matcher-wrapper .grid-box select[multiple] {
    width: 100%;
    height: 400px;
  }

  .matcher-wrapper .grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
  }
  .matcher-wrapper .arrow-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    align-self: center; /* <-- das zentriert es vertikal im Grid */
  }
  .matcher-wrapper .arrow-buttons button {
    all: unset;
    background-color: #525f7a;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: bold;
    transition: background-color 0.2s;
  }
  .matcher-wrapper .arrow-buttons button:hover {
    background-color: rgba(82, 95, 122, 0.75);
  }
  .matcher-wrapper button.primary {
    margin-top: 1rem;
    background-color: #0d6efd;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s;
  }
  .matcher-wrapper button.primary:hover {
    background-color: #0b5ed7;
  }
  #matcher-response {
    padding: 1rem;
    margin-bottom: 1em;
    border-radius: 5px;
    background-color: #dff0d8;
    color: #3c763d;
    font-weight: bold;
  }
  
  /* Listbox (Mehrfach-Auswahl) korrekt darstellen */
.matcher-wrapper select[multiple] {
    height: 200px;
    padding: 0.75rem;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow-y: auto;
  }
  
  .matcher-wrapper .hint-wrap {
    width: 100%;
  }

  .matcher-wrapper .input-hint {
    font-size: 0.85rem;
    color: #666;
    /* margin-top: -1rem; */
    /* margin-bottom: 0.5rem; */
    /* display: block; */
  }

  /* Checkboxen korrekt anzeigen */
  .matcher-wrapper input[type="checkbox"] {
    appearance: auto;
    margin: 0;
    width: 1rem;
    height: 1rem;
  }
  
  /* Checkbox-Labels nebeneinander */
  .matcher-wrapper fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
  }

  /* Radio-Buttons wieder sichtbar machen */
  .matcher-wrapper .radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .matcher-wrapper .radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
  }
  
  .matcher-wrapper input[type="radio"] {
    appearance: radio;
    width: 1rem;
    height: 1rem;
  }
.matcher-wrapper input[type="checkbox"] {
  appearance: auto;
  margin: 0;
  vertical-align: middle;
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

.matcher-wrapper select[multiple] option {
    display: block;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
  }

  /* Standard: Desktop-Grid */
.matcher-wrapper .grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
  }
  
  /* Labels über Listboxen */
  .matcher-wrapper .grid > div > label {
    font-weight: bold;
    font-size: 0.8em;
    margin-bottom: 0.25rem;
    display: block;
  }
  
  /* Mobilansicht: Grid in eine Spalte umwandeln */
  @media (max-width: 600px) {
    .matcher-wrapper .grid {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto auto auto auto;
    }
  
    .matcher-wrapper .arrow-buttons {
        flex-direction: row;
        justify-content: center;
        align-self: stretch;
        /* margin: 1rem 0; */
      }
  
    .matcher-wrapper .arrow-buttons button {
      font-size: 1.2rem;
      padding: 0.5rem 1rem;
    }
  }
  /* Standard-Ansicht (Desktop): zeige → und ← */
#to-right::before {
    content: "→";
  }
  #to-left::before {
    content: "←";
  }
  
  /* Mobile-Ansicht: ersetze Icons */
  @media (max-width: 600px) {
    #to-right::before {
      content: "⬇️";
    }
    #to-left::before {
      content: "⬆️";
    }
  }
  
  /* Optional: leeren Button-Inhalt verbergen */
  #to-right,
  #to-left {
    font-size: 1.5rem;
    text-align: center;
  }
  #to-right,
  #to-left {
    color: transparent; /* Inhalt unsichtbar */
    position: relative;
  }
  #to-right::before,
  #to-left::before {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
  }
 
/* Basis-Button-Styles */
.matcher-wrapper button,
.matcher-wrapper .action-normal,
.matcher-wrapper .action-normal-focus,
.matcher-wrapper .action-start,
.matcher-wrapper .action-delete-big,
.matcher-wrapper .action-delete {
  font-family: "Poppins", Sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: capitalize;
  font-style: normal;
  text-decoration: none;
  line-height: 1em;
  letter-spacing: 0px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: 1px solid;
  border-radius: 100px;
  padding: 12px 24px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Edit */
.matcher-wrapper .action-normal {
  background-color: var(--e-global-color-e426606);
  border-color: var(--e-global-color-e426606);
  color: #fff;
}
.matcher-wrapper .action-normal:hover, .matcher-wrapper .action-normal:focus {
  background-color: var(--e-global-color-f3ff394);
  border-color: var(--e-global-color-f3ff394);
  color: var(--e-global-color-d6cea4e);
}

.matcher-wrapper .action-normal-focus {
  background-color: var(--e-global-color-f3ff394);
  border-color: var(--e-global-color-f3ff394);
  color: var(--e-global-color-d6cea4e);
}
.matcher-wrapper .action-normal-focus:hover, .matcher-wrapper .action-normal-focus:focus {
  background-color: var(--e-global-color-e426606);
  border-color: var(--e-global-color-e426606);
  color: #fff;
}

/* Start */
.matcher-wrapper .action-start {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}
.matcher-wrapper .action-start:hover, .matcher-wrapper .action-start:focus {
  background-color: #218838;
  border-color: #218838;
  color: #fff;
}

/* Delete: immer rund */
.matcher-wrapper .action-delete {
  background-color: #fff;
  border-color: #dc3545;
  color: #c82333;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
}
/* Delte -Button: normale Größe */
 .matcher-wrapper .action-delete-big {
  background-color: #fff;
  border-color: #dc3545;
  color: #c82333;
  /* border-radius: 50%; */
  /* padding: 0; */
  font-size: 18px;
}

.matcher-wrapper .action-delete:hover,.matcher-wrapper .action-delete:focus,.matcher-wrapper .action-delete-big:hover,.matcher-wrapper .action-delete-big:focus {
  background-color: #c82333;
  border-color: #c82333;
  color: #fff;
}

/* Icons (falls vorhanden) nicht anzeigen */
button.action-normal::before,
button.action-start::before,
button.action-delete::before {
  display: none;
}


.liste-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.liste-header {
  margin-bottom: 0.5rem;
}

.liste-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.liste-date {
  font-size: 0.85rem;
  color: #888;
}

.matcher-card .button-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Abstand zwischen den Buttons */
  align-items: flex-start;
}
.liste-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Mehr Abstand zwischen den Cards */
  margin-top: 1rem;
}
/* .liste-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.liste-actions button {
  flex: 1;
} */

@media (max-width: 480px) {
  .matcher-card .button-group,
  .liste-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .liste-actions {
    gap: 0.5rem;
  }

  .liste-actions .action-normal-delete-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  .liste-actions .action-normal {
    flex: 1;
    width: auto;
  }

  .liste-actions .action-delete {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    align-self: flex-start;
  }

  .liste-actions .action-start {
    width: 100%;
  }
}

  
  .custom-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
  }
  
  .selected-option {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
  }
  
  .custom-options {
    list-style: none;
    margin-top: 15px;
    border-radius: 4px;
    padding: 0;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    background: #fff;
    display: none;
    z-index: 10;
  }
  
  .custom-options li {
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  

  .color-box {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid #ccc;
    font-size: 0.7rem;
    font-weight: bold;
    color: #000;
    margin-right: 0.25rem;
  }
  
  .color-box.male {
    margin-right: 0.3rem;
    font-size: 0.5em;
    /* color: rgba(80, 80, 80, 0.484); */
  }
  
  .color-box.female {
    margin-right: 0.75rem;
    font-size: 0.5em;
    /* color: rgba(80, 80, 80, 0.484); */
  }

  .hidden {
    display: none !important;
  }

  .modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .modal.hidden {
    display: none;
  }
  
  .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    text-align: center;
  }
  
  .modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
  }
  
  /* Modal Grundlayout */
#delete-modal.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#delete-modal .modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#delete-modal .modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}





/* Matcher Duell */
.matcher-wrapper .duell-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.matcher-wrapper .duell-grid .duell-card {
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Responsive Maße */
  width: min(90vw, 450px);  /* max 400px, sonst 90% der Viewport-Breite */
  height: min(60vw, 400px); /* max 300px, sonst 60% der Viewport-Breite */

  padding: 2rem;
  border: none;
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.duell-card:hover {
  transform: scale(1.05);
  /* Rainbow */
  /* box-shadow: rgb(85, 91, 255) 0px 0px 0px 3px, rgb(31, 193, 27) 0px 0px 0px 6px, rgb(255, 217, 19) 0px 0px 0px 9px, rgb(255, 156, 85) 0px 0px 0px 12px, rgb(255, 85, 85) 0px 0px 0px 15px!important; */
    /* box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25); */
}

@media (max-width: 1200px) {
  .matcher-wrapper .duell-grid {
    gap: 2rem;
  }

  .text_schreibschrift {
    font-family: 'Sacramento', cursive;
    font-size: 3em!important;
    font-weight: 400;
  }

  .matcher-wrapper .duell-grid .duell-card {
    width: 90vw;
    height: auto;
    min-height: 140px;
    padding: 1.2rem;
    font-size: 1rem;
    border-radius: 1.2rem;

    box-shadow: rgba(0, 0, 0, 0.15) 0px 4px 8px;
    transform: none !important;
    transition: none !important;
  }

  .matcher-wrapper .duell-grid .duell-card:hover {
    transform: none;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 10px;
  }

  .matcher-wrapper .duell-grid .duell-name-wrapper {
    line-height: 1.2;
  }

  .duell-vorname,
  .duell-nachname {
    font-size: 1.2rem;
  }
}


.versus {
  font-size: 4rem;
  font-weight: 900;
  align-self: center;
  margin: 0 1rem;
}

.duell-name-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-align: center;
}

.duell-vorname {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  max-width: 100%;
  word-break: break-word;
  text-align: center;
}


.duell-nachname {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  margin-top: 0.5rem;
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  max-width: 100%;
}


/* Statistik */
.matcher-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2rem auto;
  
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 1rem;
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .matcher-stats {
    gap: 0;
    row-gap: 0.5rem;
    column-gap: 0;
    padding: 0.5rem;
    font-size: 1rem;
  }
}

.stat-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-label {
  font-weight: 600;
  opacity: 0.8;
}

.stat-value {
  font-weight: 800;
}


/* Neu mischen */
.matcher-wrapper .duell-grid .duell-refresh {
  opacity: 0.8;
  width: 100px !important;
  height: 100px !important;
  border: none !important;
  border-radius: 20px !important;
  background-color: #4B4B4B !important; /* <- Weißer Kasten */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  transform-style: preserve-3d;
  perspective: 600px; /* wichtig für 3D */
}

.matcher-wrapper .duell-grid .duell-refresh:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
  transform: rotate(15deg) !important;
}

/* .matcher-wrapper .duell-grid .duell-refresh img.refresh-icon {
  width: 45px !important;
  height: 45px !important;
  transition: transform 0.2s ease !important;
}

.matcher-wrapper .duell-grid .duell-refresh img.refresh-icon {
  filter: brightness(0) invert(1);
} */

/* Wrapper: passt sich automatisch der Bildgröße an */
.matcher-wrapper .duell-grid .duell-refresh .refresh-icon-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0; /* verhindert Lücken bei inline-block */
}

/* Beide Bilder: blockweise Darstellung */
.matcher-wrapper .duell-grid .duell-refresh .refresh-icon-wrapper img.refresh-icon {
  display: block;
  transition: opacity 0.3s ease;
  width: auto;
  height: auto;
}

/* Positionierung für Überlagerung */
.matcher-wrapper .duell-grid .duell-refresh .refresh-icon-wrapper img.default {
  position: relative;
  z-index: 1;
  opacity: 1;
}

.matcher-wrapper .duell-grid .duell-refresh .refresh-icon-wrapper img.hover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0;

}

/* Hover-Logik */
.matcher-wrapper .duell-grid .duell-refresh:hover .refresh-icon-wrapper img.default {
  opacity: 0;
}

.matcher-wrapper .duell-grid .duell-refresh:hover .refresh-icon-wrapper img.hover {
  opacity: 1;
  /* transform: rotate(360deg) !important;
  transition: transform 0.5s ease !important; */
}

.matcher-wrapper .duell-grid .duell-hint {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  opacity: 0.8;
}

/* Schriftarten */
.text_uppercase {
  text-transform: uppercase;
  /* font-family: 'Open Sans Light', sans-serif; */
  font-family: "Poppins", Sans-serif;
  font-weight: 400;
}

.text_standard {
  font-family: inherit;
  font-family: "Poppins", Sans-serif;
  /* font-family: 'Open Sans Light', sans-serif; */
  font-weight: 400;
}

.text_schreibschrift {
  font-family: 'Sacramento', cursive;
  font-size: 4em;
  font-weight: 400;
}

.text_schreibschrift_settings {
  font-family: 'Sacramento', cursive;
  font-size: 1.5em;
}

button#rest_buben, button#rest_maedels {
  all: unset; /* entfernt ALLE Standardstile */
  cursor: pointer;
  background-color: transparent;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  transition: background-color 0.2s ease;
}

button#rest_buben:hover, button#rest_maedels:hover {
  background-color: rgba(0, 0, 0, 0.1); /* dezentes Grau z.B. */
}

.popup-overlay {
  font-family: "Poppins", Sans-serif;
}