/* ==================================================================== */
/*  PAMELDING (påmelding)  –  unika stilar för registreringsflödet      */
/* ==================================================================== */

/* -------------------------------------------------------------------- */
/*  0. Extra färg‑variabler (knapp‑nyanser osv.)                         */
/* -------------------------------------------------------------------- */
:root {
  --color-success: #28a745;
  --color-success-dark: #218838;
  --color-danger: #d9534f;
  --color-danger-dark: #c9302c;
  --color-warning-bg: #fffde7;
  --color-warning-border: #fbc02d;
  --color-info-bg: #fef9e7;
  --color-info-border: #fadf9e;
}

/* -------------------------------------------------------------------- */
/*  1. Hero – sida‑specifik variant med turneringsbild                  */
/* -------------------------------------------------------------------- */
.hero.pamelding {
  /* Lägger bild ovanpå den globala gradienten (från shared.css)       */
  background:
    linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-primary-light) 100%),
    url('/ttranking/images/hero-pamelding.jpg') center/cover;
  min-height: 360px;
}

.hero.pamelding .tournament-header h1,
.hero.pamelding .tournament-header .subheading {
  color: #fff;
}

/* ==========================================================================
   REGISTRATION INFO COMPONENT
   ========================================================================== */

/* === 1. GRUNNLEGGENDE LAYOUT & CONTAINER === */

.registration-info {
  background: var(--color-background-secondary, #fff);
  border: 1px solid var(--color-border, #e0e0e0);
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  margin: 2rem auto;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.registration-info:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Automatisk vertikal avstand for en jevn rytme */
.registration-info>*+* {
  margin-top: 1.5rem;
}

.registration-info h4 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--color-text-heading);
  text-align: center;
}

.registration-info p {
  margin: 0;
  line-height: 1.6;
}

/* === 2. PROFILHEADER & BRUKERINFO === */

.user-profile-header {
  text-align: center;
  /* Sentrerer alt innhold */
}

/* Legg til litt luft mellom overskrift og knappen under */
.user-profile-header h4 {
  margin-bottom: 0.75rem;
}

.user-email {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--color-background-subtle, #f7f7f7);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.user-email strong {
  color: var(--color-text-secondary);
}


/* === 3. KNAPPESYSTEM (BTN) === */

/* Baseklasse for alle knapper */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.8rem 1.75rem;
  font-size: 1em;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* -- Primærknapp (grønn/hovedhandling) */
.btn--primary {
  background: var(--color-success, #28a745);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-success-dark, #218838);
}

/* -- Sekundærknapp (gul/alternativ handling) */
.btn--secondary {
  background: var(--color-warning-bg, #fff3cd);
  color: var(--color-warning-text, #856404);
  border-color: var(--color-warning-border, #ffeeba);
}

.btn--secondary:hover {
  background: var(--color-warning-bg-hover, #ffe8a1);
}

/* -- Tekstknapp (for "logg ut") */
.btn--text-danger {
  width: auto;
  padding: 0.25rem 0.5rem;
  color: var(--color-danger, #dc3545);
  background: transparent;
  box-shadow: none;
  font-weight: normal;
}

.btn--text-danger:hover {
  background: var(--color-danger-bg-light, rgba(220, 53, 69, 0.1));
  transform: none;
  box-shadow: none;
}


/* === 4. SKJEMAELEMENTER === */

/* Wrapper for label og input-felt */

.registration-info label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--color-text-secondary);
}

/* Tekstfelter og select-boks */
.registration-info input[type="email"],
.registration-info input[type="text"],
.registration-info select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1em;
  border: 1px solid var(--color-border-input, #ccc);
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background-color: var(--color-background-input, #fff);
}

/* Egen stil for checkbox */
.registration-info input[type="checkbox"] {
  width: auto;
  padding: 0;
  vertical-align: middle;
  margin-right: 0.5rem;
  box-shadow: none;
}

/* Tydelig fokus-state */
.registration-info input:focus,
.registration-info select:focus {
  border-color: var(--color-primary, #007bff);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}


/* === 5. INFO-IKON & PANEL === */

/* Egen stil for form-group som skal ha label og ikon på samme rad */
.form-group--label-with-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group--label-with-info+select {
  margin-top: 0.5rem;
  /* Justerer avstand mellom label-rad og select-boks */
}

/* Container for posisjonering */
.info-container {
  position: relative;
}

/* Klikkbart ikon */
.info-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--color-text-secondary);
}

.info-trigger svg {
  display: block;
}

/* Skjuler tekst for skjermlesere */
.info-trigger .sr-only,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Selve panelet som vises */
.info-panel {
  position: absolute;
  bottom: 125%;
  /* Plasseres over ikonet */
  right: 0;
  /* Justeres til høyre for ikonet */
  width: 280px;
  background: var(--color-background-dark, #333);
  color: var(--color-text-inverted, #fff);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
  text-align: left;
}

/* Pil på panelet */
.info-panel::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 10px;
  /* Plasserer pilen under ikonet */
  border-width: 6px;
  border-style: solid;
  border-color: var(--color-background-dark, #333) transparent transparent transparent;
}


/* === 6. DIVERSE === */

.email-hint {
  text-align: center;
  font-size: 0.9em;
  color: var(--color-text-secondary);
  background: var(--color-background-subtle, #f7f7f7);
  padding: 0.75rem;
  border-radius: 8px;
}

/* -------------------------------------------------------------------- */

/* småskärm – fullbredds‑knapp */
@media (max-width: 576px) {
  .registration-info {
    width: calc(100% - 2rem);
    padding: 1.25rem;
    margin: 0 1rem 2rem;
  }

  .registration-info button {
    width: 100%;
    padding: 0.75rem;
  }
}

/* -------------------------------------------------------------------- */
/*  3. Spelar‑ / Klass‑valet                                            */
/* -------------------------------------------------------------------- */

/* växel‑toggle (Spelare / Klasser) */
.toggle-switch-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.toggle-switch {
  position: relative;
  width: 250px;
}

.toggle-switch input {
  display: none;
}

.toggle-switch label {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  background: #e4e4e4;
  border-radius: 8px;
  cursor: pointer;
}

.toggle-switch span {
  width: 50%;
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  transition: .3s;
}

.toggle-switch input:not(:checked)+label .toggle-class,
.toggle-switch input:checked+label .toggle-player {
  background: var(--color-success);
  color: #fff;
}

/* spela‑list‑container */
.player-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 30px auto 0;
  padding: 0 15px;
  max-width: 940px;
  box-sizing: border-box;
}

.player-list,
.selected-list {
  flex: 1 1 320px;
  min-width: 300px;
  max-width: 450px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  /*15px 20px;*/

  box-shadow: 0 2px 5px rgba(0, 0, 0, .08);
  text-align: left;
}

.player-list {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
}

.selected-list {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

/* list‑rubriker */
.player-list-header,
.selected-list-header {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.player-list-header h2,
.selected-list-header h2 {
  margin: 0;
  font-size: 1.2em;
  color: #333;
  text-align: center;
}

.player-list-header h2 span,
.selected-list-header h2 span {
  font-weight: normal;
  font-size: .85em;
  color: #666;
  margin-left: 8px;
}

.selected-list-header {
  display: flex;
  flex-direction: column;
  /* 🟢 Lägger rubrik + Totalt under varandra */
  align-items: center;
}

.selected-list-header #totalCostDisplay {
  font-weight: 700;
  font-size: 1.1em;
  margin: 4px 0 0;
  /* Lite luft ovanför */
  text-align: center;
}

.list-subtext {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin: 4px 0 0;
}

.player-list-header h2,
.selected-list-header h2 {
  height: 30px;
  /* Justera detta värde efter behov */
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-list-header,
.selected-list-header {
  min-height: 60px;
  /* Justera efter behov */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Centrera innehållet vertikalt */
}

/* enstaka spelar‑rad */
.player-list li.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  margin-bottom: 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .2s;
}

.player-list li.player-item:hover {
  background: #fff3cd;
}

.player-item.selected-player {
  background: #d4edda;
  border-left: 4px solid var(--color-success);
}

.player-name-text {
  flex-grow: 1;
}

.edit-player-icon {
  font-size: 1.1em;
  color: #007bff;
  opacity: .7;
  transition: opacity .2s, color .2s;
  padding: 0 5px;
}

.player-item:hover .edit-player-icon,
.edit-player-icon:hover {
  opacity: 1;
  color: #0056b3;
}

#playerList {
  padding: 0;
}

.add-player-form-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 0.95em;
  background-color: #f5f5f5;
  /* Ljusgrå, diskret */
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.add-player-form-button:hover {
  background-color: #eaeaea;
  border-color: #999;
}

.add-player-form-button:focus {
  outline: 2px solid var(--color-primary, #2196f3);
  outline-offset: 2px;
}


/* klasser under spelare */
.eligible-classes {
  margin-top: 8px;
  padding: 8px 0 8px 15px;
  border-left: 3px solid #a5d6a7;
  background: #f8f9fa;
  border-radius: 0 5px 5px 0;
}

.eligible-classes .class-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
}

.eligible-classes .add-btn {
  background: var(--color-success);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
}

.eligible-classes .add-btn:disabled {
  background: #aaa !important;
  color: #eee !important;
  cursor: not-allowed !important;
}

.eligible-classes .add-btn:not(:disabled):hover {
  background: var(--color-success-dark);
  transform: scale(1.05);
}

/* responsiv stackning */
@media(max-width:700px) {
  .player-container {
    flex-direction: column;
    gap: 20px;
  }

  .player-list,
  .selected-list {
    max-width: 100%;
    width: 100%;
  }
}

/* -------------------------------------------------------------------- */
/*  4. Sticky / Fixed total‑bar                                         */
/* -------------------------------------------------------------------- */
#stickyTotalBar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-warning-bg);
  border-top: 2px solid var(--color-warning-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .1);
  z-index: 9999;
}

.sticky-total-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

#totalCostDisplaySticky {
  background: #f5f5f5;
  border: 1px solid #ddd;
  font-weight: 700;
  padding: 0 20px;
  height: 44px;
  display: flex;
  align-items: center;
  border-radius: 22px;
}

#submitBtn {
  background: var(--color-success);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 0 26px;
  height: 44px;
  border-radius: 22px;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
}

#submitBtn:hover:not(:disabled) {
  background: var(--color-success-dark);
  transform: scale(1.02);
}

@media(max-width:600px) {
  .sticky-total-content {
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
  }

  #totalCostDisplaySticky,
  #submitBtn {
    width: 90%;
    justify-content: center;
    font-size: 1em;
  }
}

/* -------------------------------------------------------------------- */
/*  5. Modal (gemensam)                                                 */
/* -------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  /* visas via JS */
  background: rgba(0, 0, 0, .65);
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 550px;
  width: 95%;
  margin: 40px auto;
  padding: 25px 30px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
}

.modal-box h3 {
  margin: 0 0 20px;
  font-size: 1.4em;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.modal-actions {
  text-align: right;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.modal-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
}

/* grå avbryt */
.modal-actions .btn-cancel {
  background: #ccc;
  color: #333;
}

.modal-actions .btn-cancel:hover {
  background: #bbb;
}

/* primär */
.modal-actions .btn-primary {
  background: var(--color-success);
  color: #fff;
}

.modal-actions .btn-primary:hover {
  background: var(--color-success-dark);
}

/* röd “Slett” */
.modal-actions .btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.modal-actions .btn-danger:hover {
  background: var(--color-danger-dark);
}

/* === MODAL OVERLAY === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* halvt transparent svart */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* === MODAL BOX === */
.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 30px 25px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-box h3 {
  margin-top: 0;
  font-size: 1.4em;
  margin-bottom: 20px;
}

.modal-box label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
}

.modal-box input[type="text"],
.modal-box input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-box input[type="radio"] {
  margin-right: 5px;
}

.modal-actions {
  text-align: right;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.modal-actions p {
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}

@media(max-width: 600px) {
  .modal-box {
    width: 90%;
    padding: 20px 15px;
  }
}


/* -------------------------------------------------------------------- */
/*  6. Toast‑notiser                                                    */
/* -------------------------------------------------------------------- */
#toast {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  font-size: 1em;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
  z-index: 10000;
  max-width: 90%;
  border: 1px solid transparent;
  text-align: center;
  opacity: 0;
  transition: opacity .3s ease;
}

#toast.toast-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

#toast.toast-error {
  background: #fff;
  color: var(--color-danger);
  border-color: var(--color-danger);
}

#toast.toast-info {
  background: #e2e3e5;
  color: #383d41;
  border-color: #d6d8db;
}

/* -------------------------------------------------------------------- */
/*  7. Mindre hjälpelement                                              */
/* -------------------------------------------------------------------- */
.info-box {
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  font-weight: 500;
}

.info-box.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.info-box.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* deadline‑infotext */
.deadline-info {
  font-style: italic;
  color: #5a6268;
  margin: 5px 0 15px;
  font-size: .95em;
  text-align: center;
}

/* befintlig registrering */
#existingRegistration {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .05);
  padding: 20px;
  max-width: 600px;
  margin: 30px auto;
}

.existing-reg-actions {
  text-align: center;
  margin-top: 25px;
}

.existing-reg-actions button {
  display: inline-block;
  margin: 0 8px 5px 8px;
  padding: 8px 16px;
  font-size: 0.95em;
  font-weight: 500;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.existing-reg-actions button:hover {
  background: #0056b3;
}

.existing-reg-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.existing-reg-actions .btn-delete {
  background: #c82333;
  /* Bootstrap danger-ish */
}

.existing-reg-actions .btn-delete:hover {
  background: #a71d2a;
}


@media(max-width:420px) {
  .existing-reg-actions button {
    display: block;
    width: 80%;
    max-width: 280px;
    margin: 10px auto;
  }

  .hero.pamelding .tournament-header h1 {
    font-size: 1.5rem;
  }
}

/* =================================================================== */
/*  EXTRA FINPUTS  – existing registration + sen‑avgifts‑varning       */
/* =================================================================== */

/* 1. Existing registration – förvandla till en konsekvent “card”‑box  */
#existingRegistration {
  background: #fff;
  /* samma vita kort som övriga */
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  padding: 24px 28px;
  max-width: 680px;
  margin: 40px auto;
  /* lite mer luft */
}

#existingRegistration h2 {
  margin: 0 0 18px;
  font-size: 1.4em;
  color: var(--color-primary);
  border-bottom: 1px solid #edf0f2;
  padding-bottom: 6px;
}

#existingRegistration p {
  margin: 0 0 12px;
  line-height: 1.55;
}

p.club-info-display {
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

/* punktlista – snyggare kulor + mellanrum */
#existingRegistration ul {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0 20px;
}

#existingRegistration li {
  margin-bottom: 4px;
}

/* 1b. Action‑knappar (Rediger / Slett) inline på desktop, staplat mobilt */
.existing-reg-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-bottom: 6px;
}

.existing-reg-actions .btn {
  min-width: 140px;
}

.existing-reg-actions .btn-delete {
  background: var(--color-danger);
  color: #fff;
}

.existing-reg-actions .btn-delete:hover {
  background: var(--color-danger-dark);
}

@media(max-width:480px) {
  .existing-reg-actions {
    flex-direction: column;
    gap: 12px;
  }

  .existing-reg-actions .btn {
    width: 100%;
    max-width: 260px;
  }
}

/* ------------------------------------------------------------------- */
/* 2. Sen‑avgifts‑varning   (.late-warning)                            */
/* ------------------------------------------------------------------- */
.late-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: 8px;
  padding: 18px 20px;
  max-width: 680px;
  margin: 25px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.late-warning::before {
  /* enkel emoji‑ikon – byt gärna mot SVG */
  content: "⚠️";
  font-size: 1.6em;
  line-height: 1;
}

.late-warning p {
  margin: 0;
  color: #856404;
  font-size: 1em;
  line-height: 1.55;
}

/* mindre text på mini‑skärmar */
@media(max-width:420px) {
  .late-warning {
    font-size: .95em;
    padding: 14px 16px;
  }
}

/* ------------------------------------------------------------------ */
/*  EXTRAFINPUNKT – centrerad knapp + mer luft i sen‑varning          */
/* ------------------------------------------------------------------ */

/* 1. Existing‑box: centrera även när det bara finns EN knapp */
.existing-reg-actions {
  justify-content: center;
  /* redan centrerat för flera knappar   */
}

.existing-reg-actions .btn {
  /* om du ibland bara har 1 knapp       */
  min-width: 160px;
}

/* 2. Late‑warning: större avstånd mellan ikon och text */
.late-warning {
  gap: 18px;
}

/* var 12 px – ökas till 18 px         */
.late-warning::before {
  flex-shrink: 0;
}

/* hindrar emoji från att krympa   */

#selectedClubDisplay {
  display: block;
  margin: 20px auto 10px auto;
  max-width: 600px;
  font-weight: bold;
  font-size: 1.1em;
  background: #f7f7f7;
  border-left: 4px solid #007bff;
  /* valfri accentfärg */
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.class-search-row {
  display: flex;
  justify-content: center;
  /* centrera hela raden */
  gap: 12px;
  /* space mellan select och input */
  flex-wrap: wrap;
  /* bra på mobil */
  margin: 20px 0;
}

.class-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}


.class-search-row select,
.class-search-row input[type="search"] {
  padding: 8px 10px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
  min-width: 180px;
}

.class-search-row input[type="search"] {
  flex: 1 1 220px;
  /* inputten får växa mer */
  max-width: 350px;
}

.class-search-row select:focus,
.class-search-row input[type="search"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, .2);
}

#resetFormButton {
  display: block;
  /* Gör den block för auto-marginal */
  margin: 20px auto 0;
  /* Auto = centrerad */
  padding: 8px 16px;
  font-size: 0.95em;
  font-weight: 500;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#resetFormButton:hover {
  background: #5a6268;
}

#resetFormButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select optgroup {
  font-weight: bold;
  color: #333;
}

select option {
  padding-left: 8px;
}

#classSelect {
  display: none;
}

#classSelect.visible {
  display: block;
}

.class-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* === BASSTILAR FÖR SPELARLISTAN === */
#playerList li.player-item {
  position: relative;
  padding: 8px 12px 8px 40px;
  /* Luftigare padding */
  margin: 2px 0;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  /*background: white;*/
  border: 1px solid #e4e4e4;
}

/* === HOVER-EFFEKT === */
#playerList li.player-item:hover {
  background: #f5f9ff;
  border-color: #c0d4f8;
}

/* === STATUSINDIKATORER === */
/* Partiellt vald */
#playerList li.player-item.partially-selected {
  border-left: 3px solid #4d9eff;
  background-color: #dbebff;
}

/* Fullt vald */
#playerList li.player-item.fully-selected {
  border-left: 3px solid #adb5bd;
  background-color: #f8f9fa;
}

/* === RÄKNAREN === */
.selection-count {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 40px;
  text-align: center;
  background: #f0f6ff;
  color: #0066cc;
  border: 1px solid #d0e0ff;
}

/* Fullt vald räknare */
#playerList li.player-item.fully-selected .selection-count {
  background: #e9ecef;
  color: #6c757d;
  border-color: #dee2e6;
}

/* === POPUP-FÖNSTER === */
.eligible-classes {
  position: relative;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  z-index: 10;
  max-height: 70vh;
  overflow-y: auto;
}

.popup-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f8f9fa;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.85em;
  font-weight: bold;
  color: #495057;
  border: 1px solid #dee2e6;
}

/* === KNAPPAR I POPUP === */
.add-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-btn:hover:not(:disabled) {
  background: #218838;
}

.btn-disabled {
  background-color: #e9ecef !important;
  color: #6c757d !important;
  border: 1px solid #dee2e6 !important;
  cursor: not-allowed !important;
}

/* === PASS-RUBRIKER === */
.pass-heading {
  color: #495057;
  font-size: 0.9em;
  margin: 15px 0 5px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #eee;
}

/* === KLASSLISTA === */
.class-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.class-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}

.class-name {
  font-size: 0.9em;
  color: #212529;
}