/* =====================================================     

    . ROOT VARIABLES

   ===================================================== */

:root {
  --primary: #ff2f72; /* rgba(55, 47, 114,1.0) */
  /* Giro Roze */
  --background: #1a1a1d;
  --header-color: #f9f9f9;
  --background-box: #f9f9f9;
  --primary-dark: #a34b67;
  --text-color: #1a1a1d;
  --text-color-light: #f9f9f9;
  --box-color-color: #ff2f72;
  --font-body: "Montserrat", sans-serif;
  --white: #f9f9f9;

  --points-jersey: purple;
  --mountain-jersey: blue;

  --gray-dark: #333333;
  --gray-light: #bfc3c9;

  --border-gradient-country: linear-gradient(
      to right,
      #008c45,
      #008c45,
      #f4f5f0,
      #cd212a,
      #cd212a
    )
    1;
  --border-image-country-header: linear-gradient(
      to right,
      #008c45,
      #008c45,
      #f4f5f0,
      #cd212a,
      #cd212a
    )
    100% 1;

  --accent-green: #00c853;
  --accent-red: #e10600;
  --accent-orange: #ff7f50;
  --accent-secondary: gold;

  --text-color-btn-sec: white;
  --border-color-btn-alt: white;
  --tab-button-color: white;

  --fieldset: white;
  --session-block: white;
  --match-card: white;
  --joker-block: white;
  --selected_round: white;

  /* Info boxes */
  --info-box-gray: #cccccc39;
  --info-box-green: #dff0d8;
  --info-box-red: #f2dede;
  --info-box-yellow: #f5dd27;
  --info-box-border: 4px solid #777;
  --info-box-border-green: 4px solid green;
  --info-box-border-red: 4px solid #e10600;
  --info-box-border-yellow: 4px solid #eed511;
  --info-box-background: white;

  --table-border: rgba(176, 170, 170, 0.692);
  --table-row-even: rgba(151, 151, 151, 0.14);
  --table-divider: white;
}

/* =====================================================     

    . GLOBAL STYLES & RESETS

   ===================================================== */

body,
html {
  margin: 0;
  height: 100%;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text-color);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  max-height: 100rem;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}
h2,
h5 {
  font-variant: small-caps;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}
h2 {
  font-size: 1.4rem;
  color: var(--primary);
}
h4 {
  font-size: 0.9rem;
}
h5 {
  font-size: 1.2rem;
  margin-top: 1.25em;
}

p {
  margin-top: 0;
}
.h3_underline {
  border-bottom: 2px solid var(--primary);
  width: fit-content;
}
.hidden {
  display: none !important;
}

.show-block {
  display: block !important;
}

/* =====================================================     
     
    . LAY OUT BASICS

   ===================================================== */

.wrapper {
  flex: 1;
  width: 100%;
  padding: 0 0.625rem;
  box-sizing: border-box;
  max-width: 100rem;
  margin: 1rem auto 0;
}

.columns {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =====================================================     
     
    . BOXES & INFO BOXES

   ===================================================== */

.box,
.box_color {
  padding: 1rem;
  border: 1px solid var(--box-color-color);
  border-radius: 12px;
  background: var(--background-box);
  scroll-margin-top: 10px;

}

.box_color {
  background: var(--primary);
  color: var(--box-color-color);
}

/* Info & Instructie blokken */
.info-box,
.info-box_green,
.info-box_main,
.info-box_red {
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-box_green {
  background: var(--info-box-green);
  border-left: var(--info-box-border-green);
  color: var(--text-color);
}

.info-box_red {
  background: var(--info-box-red);
  border-left: var(--info-box-border-red);
}

/* =====================================================     
     
    . BUTTONS & LINKS

   ===================================================== */

.btn-submit,
.btn-submit_sec {
  padding: 10px 20px;
  color: var(--text-color-light);
  border-radius: 24px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  text-decoration: none;
  margin-top: auto;
  align-self: flex-start;
}

.btn-submit_sec {
  background: var(--background);
  border: var(--background);
}

.btn-submit {
  background: var(--primary);
  border: var(--primary);
}

.header-with-button {
  display: flex;
  justify-content: space-between; /* Kop links, knop rechts */
  align-items: center; /* Verticaal in het midden */
  margin-bottom: 15px; /* Ruimte onder de header */
  flex-wrap: wrap; /* Zorgt dat het op mobiel onder elkaar past indien nodig */
  gap: 10px;
}

.header-with-button h2 {
  margin: 0; /* Verwijder standaard marges voor betere uitlijning */
}

/* Specifieke styling voor de button als 'btn-submit_alt' nog niet bestaat */
.btn-submit_sl {
  background-color: var(--primary);
  color: var(--text-color-light);
  padding: 4px 8px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: background 0.2s ease;
  white-space: nowrap; /* Voorkomt dat de tekst van de knop afbreekt */
}

.btn-submit_sl:hover {
  background-color: var(--primary);
  color: white !important;
}

        .btn-more {
            display: block;
            width: 100%;
            padding: 10px;
            margin-top: 10px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            text-align: center;
            font-family: var(--body);
            font-size: 0.9rem;
        }

        .btn-more:hover { background: var(--primary);opacity: 0.9;}

/* =====================================================     
    
    . CUSTOM DROPDOWN

   ===================================================== */

/* ##########  Wrappers  ########## */

.custom-select-wrapper,
.custom-select-wrapper-picks {
  position: relative;
  margin-bottom: 15px;
  font-family: "Montserrat";
}

/* Ranking breedte */
.custom-select-wrapper {
  min-width: 240px;
  width: fit-content;
}

/* Picks breedte */
.custom-select-wrapper-picks {
  max-width: 420px;
  width: 100%;
}

.custom-select-wrapper-picks .custom-select-trigger {
  font-weight: normal;
}

/* ##########  Options Dropdown  ########## */

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 9999;
  display: none;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-options.open {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

.custom-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
}

.custom-option:hover {
  background: #f1f1f1;
}

.custom-optgroup-label {
  background: #eee;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 4px 12px;
  color: var(--text-color);
  text-transform: uppercase;
}

.custom-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ##########  Triggers (basis)  ########## */

.custom-select-trigger,
.custom-select-trigger-A {
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  position: relative;
  padding-right: 35px;
  gap: 4px;
  justify-content: flex-start;
}

/* Varianten */
.custom-select-trigger {
  border: 2px solid var(--primary);
}

.custom-select-trigger-A {
  border: 2px solid #000;
}

/* ##########  Arrow  ########## */

.custom-select-trigger:after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid black;
  pointer-events: none;
  transition: transform 0.2s ease;
}

/* Arrow flip */
.custom-select-wrapper.open .custom-select-trigger:after,
.custom-select-wrapper-picks.open .custom-select-trigger:after {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-date {
  font-size: 0.75rem;
  color: #888;
}

.stage-number-margin {
  margin-right: 8px;
}

/* ========================================
     
    . TABLES

   ======================================== */

/* General tables styling */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: center;
  font-family: var(--font-body);
  margin: 1.25rem 0;
  font-size: 1rem;
  overflow: hidden;
  background: var(--background-box);
  border-left: 1px solid rgba(176, 170, 170, 0.3);
  border-right: 1px solid rgba(176, 170, 170, 0.3);
  border-bottom: 1px solid #ddd;
  /* Duidelijke grijze border tussen rows */
  border-radius: 8px 8px 0 0;
}

/* Headers styling */
table th {
  background-color: var(--primary);
  color: var(--header-color);
  padding: 10px 0.5rem;
  text-transform: uppercase;
  border: none;
}

/* Cellen styling */
table td {
  padding: 8px 4px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid rgba(176, 170, 170, 0.1);
}

/* Verwijder de rechter border bij de laatste kolom */
table td:last-child {
  border-right: none;
}

/* Zebra-strepen */
table tr:nth-child(even) {
  background-color: rgba(151, 151, 151, 0.1);
}

/* Divider voor tussen groepen */
.table-divider {
  height: 1rem;
  background-color: var(--gray-light);
  border: none;
}


.highlight-row {background-color: rgba(255, 47, 114,0.3) !important;}

/* ------------------------------------------
    Index.php - tables 
  ------------------------------------------ */
.standings-table {
  font-size: 1rem;
  text-align:left; 
  font-size:1rem; 
  width:fit-content;
}

.standings-table th{
  font-size: 0.85rem;
}

.standings-table th:first-child, 
.standings-table td:first-child {
    text-align:center; 
    color:var(--primary);
}

.standings-table td:nth-child(3) {
    color: #666;
    font-size: 0.9rem;
}

.standings-table td:last-child {
    color: #666;
    text-align: right; 
    font-size:0.75rem;
    padding-right: 10px;
}

.standings-table th:last-child {
    text-align: right; 
    padding-right: 10px;
}

.standings-table {
  width: 100%; /* Of laat op fit-content als dat de voorkeur heeft */
  border-collapse: collapse;
}

.standings-table td {
  vertical-align: top;
  padding: 6px 0; /* Padding verticaal gecentraliseerd */
}

/* Specifieke correcties die je in picks.php nodig had */
.standings-table td.team-label {
  font-size: 0.85em;
  color: #666;
  display: block;
  margin-top: 3px;
}
/* ------------------------------------------
    Picks.php - tables 
  ------------------------------------------ */
.rider_categories {
  font-size: 0.8rem;
  text-align: left;
}
.rider_categories td:first-child {
  white-space: nowrap;
  width: 1%;
  /* Zorgt dat deze kolom niet breder wordt dan nodig */
  vertical-align: top;
  padding-left: 8px;
}

/* ------------------------------------------
    Ranking.php - tables 
  ------------------------------------------ */
.classification-table {
  display: none;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.classification-table.active {
  display: table;
}

/* Vaste breedte voor de eerste kolom (#) */
.classification-table td:first-child,
.classification-table th:first-child {
  width: 20px;
  min-width: 20px;
}

/* Vaste breedte voor de laatste kolom (#) */
.classification-table td:last-child,
.classification-table th:last-child {
  width: 20px;
  max-width: fit-content;
  padding-right: 20px;
}

/* Vaste breedte voor de laatste kolom (#) */
.classification-table td:last-child {
text-align: right;
}

/* De gevraagde aanpassing voor de 2e kolom (Alias/Naam) */
.classification-table td:nth-child(2),
.classification-table th:nth-child(2) {
  text-align: left;
}

.classification-table thead tr:first-child th {
  border-bottom: 2px solid var(--white);
}

/* Subleague header kleuren via data-attributes */
#subleague-table[data-color="gc"] thead tr:first-child th {
  background-color: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  color: white;
}
#subleague-table[data-color="mountain"] thead tr:first-child th {
  background-color: var(--mountain-jersey);
  color: white;
}
#subleague-table[data-color="points"] thead tr:first-child th {
  background-color: var(--points-jersey);
  color: white;
}

#subleague-table td:last-child {
        text-align: right !important;
    }

/* Bottom voor de GC Trui */
#table-gc thead tr:first-child th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

/* Bottom voor de Berg/Punten Trui */
#table-mountain thead tr:first-child th,
#table-points thead tr:first-child th {
  border-bottom: 1px solid rgba(255, 255, 255, 0);
}

/* ------------------------------------------
    Stats.php - tables 
  ------------------------------------------ */
.hun-picks td:nth-child(2),
.hun-picks th:nth-child(2),
.hun-stage td:nth-child(-n + 2),
.hun-stage th:nth-child(-n + 2),
.hun-teams td:nth-child(-n + 2),
.hun-teams th:nth-child(-n + 2),
.hun-vergelijk td:nth-child(n + 2):nth-child(-n + 3),
.hun-vergelijk th:nth-child(n + 2):nth-child(-n + 3) {
  text-align: left;
}

/* ===========================================
    
    INDEX.PHP

  =========================================== */

.filter-container {
  display: flex;
  width: 100%;
  max-width: 300px;
  border-radius: 6px;
  background-color: #fff;
  margin-bottom: 15px;
  overflow: hidden; 
  border: 1px solid #ddd;
  border-left: 4px solid var(--background); 
}

#giroSearchInput {

  border: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box; 
  padding: 6px 12px;
}

/* ===========================================
    
    PICKS.PHP

  =========================================== */
/* ------------------------------------------
    Stage Cards - General 
  ------------------------------------------ */

.stage-card {
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  background: #f9f9f9;
}

.stage-card h3 {
  margin-top: 0;
  color: #000;
  background: #cccccc;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-detail {
  line-height: 1.3;
  font-size: 0.8rem;
  font-variant: small-caps;
  text-transform: uppercase;
}

.stage-label {
  font-weight: bold;
  display: inline-block;
  width: 85px;
}

.parcours-icon {
  max-width: 30px;
  height: 12px;
}

.parcours-circle,
.parcours-circle1 {
  display: inline-block;
  width: 0.71rem;
  height: 0.71rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin: -1px 0;
}
.parcours-circle {
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: middle;
}

.parcours-circle1 {
  width: 0.81rem;
  height: 0.81rem;
}

/* Specifieke categorie kleuren */
.circle-sprint {
  background: green;
}
.circle-classic {
  background: orange;
}
.circle-hills {
  background: red;
}
.circle-tt {
  background: violet;
}
.circle-climber {
  background: blue;
}
.circle-gc {
  background: lime;
}

.team-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-clip: padding-box;
  box-sizing: border-box;
  flex-shrink: 0;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-variant: small-caps;
  text-transform: uppercase;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
}

.radio-group label {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  margin-bottom: 5px;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

/* ------------------------------------------
    Stage Cards - Start & End Banners 
  ------------------------------------------ */

.stage-locked1 {
  opacity: 0.6;
  filter: grayscale(0.5);
}

/* Etappe begonnen */
.stage-started-banner {
  position: relative;
  background: #fdf2f2;
  padding: 10px 0;
  overflow: hidden;
  border-radius: 8px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  border-left: 1px solid #000;
}

/* De tekst in de banner */
.stage-ended-text,
.stage-started-text {
  background: var(--background);
  color: var(--primary);
  text-align: center;
  position: relative;
  z-index: 0;
  vertical-align: middle;
  margin-top: -10px;
  border-radius: 5px 5px 0 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  padding: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.1;
}

/* De tekst in de banner */
.stage-ended-text {
  margin-top: 10px;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
  padding: 20px;
  border-bottom: 3px solid var(--primary);
}

/* De basis voor elke fietser */
.cyclist-layer {
  position: absolute;
  bottom: 4px;
  font-size: 1.2rem;
  z-index: 1;
  display: inline-block;
  transform: scaleX(-1);
  /* Spiegelen zodat ze naar rechts kijken */
  /* De animatie-naam koppelen */
  animation-name: slowRide;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.rider-1 {
  animation-duration: 22s;
  animation-delay: -3s;
  bottom: 2px;
}
.rider-2 {
  animation-duration: 20s;
  animation-delay: -1s;
  bottom: 6px;
}
.rider-3 {
  animation-duration: 24s;
  animation-delay: -5s;
  bottom: 4px;
}
.rider-4 {
  animation-duration: 21s;
  animation-delay: -1s;
  bottom: 6px;
}
.rider-5 {
  animation-duration: 23s;
  animation-delay: -5s;
  bottom: 4px;
}
.rider-6 {
  animation-duration: 25s;
  animation-delay: -7s;
  bottom: 2px;
}

/* ------------------------------------------
    Confirmation Cards 
  ------------------------------------------ */

.pick-confirmation {
  container-type: inline-size;
  background: var(--background);
  border: 1px solid #ddd;
  border-radius: 12px;
  position: relative;
  display: flex;
  min-height: 150px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
  margin-bottom: 0;
  flex: 1;
  padding: 10px 15px;
  z-index: 5;
  flex-direction: column;
  justify-content: center;
}

.joker-tag {
  background: #f1c40f;
  color: #000;
  display: inline-block;
  padding: 3px 10px;
  font-weight: 900;
  font-size: 0.75rem;
  border-radius: 2px;
  margin-top: 10px;
  transform: skew(-10deg);
}

.joker-block {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  /* Subtiele achtergrond */
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
  user-select: none;
  margin-top: 10px;
}

/* Hover effect */
.joker-block:hover {
  background: #f9f9f9;
  border-color: #bbb;
}

/* Wanneer de checkbox is aangevinkt */
.joker-block:has(input:checked) {
  background: #fff9db;
  border-color: #f1c40f;
  color: #856404;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.2);
}

/* Verberg de standaard checkbox een beetje of stijl hem mee */
.joker-block input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #f1c40f;
}

/* Animatie voor de emoji */
.joker-block input:checked + span {
  display: inline-block;
  animation: bounce 0.4s ease;
}

.joker-used-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1px dashed #ccc;
  padding: 8px 12px;
  border-radius: 8px;
  color: #888;
  font-style: italic;
  margin-top: 10px;
  cursor: not-allowed;
}

.joker-used-warning span {
  font-style: normal;
}

.rider-firstname {
  font-size: clamp(1rem, 6cqw, 1.9rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 30px;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.1;
}

.rider-lastname {
  font-size: clamp(1.2rem, 10cqw, 3.4rem);
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: -0.5px;
  line-height: 0.9;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* De standaard eigenschap (lost de melding op) */
  /* Breekt af na 2 regels mocht het echt niet passen */
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.rider-teamname {
  font-size: clamp(0.6rem, 3cqw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-badge .dot {
  height: 8px;
  width: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 4px #2ecc71;
  display: inline-block;
  animation: pulse-green 2s infinite;
}

.dot-red {
  height: 10px;
  /* Iets groter voor de banner */
  width: 10px;
  background-color: #e74c3c;
  border-radius: 50%;
  margin-right: 4px;
  box-shadow: 0 0 4px #e74c3c;
  display: inline-block;
  animation: pulse-red 1.5s infinite;
  /* Iets sneller voor 'Live' gevoel */
  line-height: 1.1rem;
}

.trofee-container {
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1;
  pointer-events: none;
}

.trofee-img {
  height: 140%;
  width: auto;
  object-fit: cover;
  object-position: right;
  opacity: 0.4;
  filter: drop-shadow(-10px 5px 15px rgba(0, 0, 0, 0.3));
}

/* ------------------------------------------
    No Pick Banner
  ------------------------------------------ */

.no-pick-card {
  margin-top: 10px;
  background: #f8f9fa;
  border: 1px solid #c8cacd;
  padding: 20px;
  text-align: left;
  border-radius: 5px;
}

.no-pick-content p {
  color: #4a5568;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

.no-pick-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 5px;
}

/* ------------------------------------------
    Stage Numbers
  ------------------------------------------ */

.stage-number,
.stage-number-stats,
.stage-number-menu {
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.stage-number-menu {
  font-size: 0.9rem;
  width: 1.5rem;
  height: 1.5rem;
}

.stage-number-stats {
  margin-right: 6px;
}

/* ------------------------------------------
    picks.php - rechter kolom & instructies
  ------------------------------------------ */

/* rechter kolon */
#helpExtra {
  display: none;
}

.btn-help-toggle {
  font-size: 0.9rem;
  display: inline-block;
  margin: 0.5rem 0;
  color: var(--primary-dark);
  text-decoration: none;
  cursor: pointer;
}

#instruction-text {
  padding: 10px;
  text-align: left;
  color: var(--text-color);
  font-style: italic;
}

/* ========================================
     
    RANKING.PHP

   ======================================== */

/* Algemene Layout */
.tab-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: left;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  color: var(--white);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-family: var(--font-body);
  opacity: 0.5;
}

.tab-btn.active {
  opacity: 1;
  transform: scale(1.1);
  outline: 1px solid rgba(220, 220, 220, 0.5);
  outline-offset: -1px;
  /* Zorgt dat de outline netjes binnen de knop valt of er strak tegenaan */
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 0 15px;
}

/* Kleuren Klassementen */
.btn-gc {
  background-color: var(--primary);
}
.btn-mountain {
  background-color: var(--mountain-jersey);
}
.btn-points {
  background-color: var(--points-jersey);
}

/* Specifieke Tabel Headers */
#table-mountain thead tr:first-child th {
  background: var(--mountain-jersey);
  color: white;
}
#table-points thead tr:first-child th {
  background: var(--points-jersey);
  color: white;
}
/* Search input */
.filter-input {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-left: 4px solid var(--background);
  border-radius: 6px;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

/* Stage Container Basis */
.update_ranking {
  padding: 15px 0;
  border-top: 1px solid #eee;
}

.stage-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: 10px;
  font-family: var(--font-body);
}

.label-text {
  font-weight: normal;
  margin-left: 10px;
  color: var(--text-color);
  margin-left: 10px;
}

.update-time {
  font-size: 0.85rem;
  text-align: left;
  margin-left: 1.1rem;
}

.stage-info {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  /* Houdt nummer en naam op desktop naast elkaar */
}

.update-time i {
  font-size: 0.85em;
  color: #666;
}

.no-data-msg {
  text-align: center;
  padding: 10px;
}


/* ----------------------------------------
  Pop-up bij naam klik
---------------------------------------- */

/* POPUP BASE OVERLAY */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      z-index: 9999;
      justify-content: center;
      align-items: center;
    }

    /* POPUP CONTENT (Desktop base) */
    .modal-content {
      background: white;
      padding: 20px;
      border-radius: 8px;
      width: 50%;
      max-width: 900px;
      min-width: 320px;
      max-height: 85vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
      margin: auto;
    }

    .modal-close {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 28px;
      cursor: pointer;
      color: #aaa;
    }

    .modal-close:hover {
      color: #000;
    }

    #modalTitle {
      margin-top: 0;
      border-bottom: 3px solid #ff2f72;
      padding-bottom: 5px;
      font-size: 1.3rem;
      color: #333;
    }

    .clickable-name {
      cursor: pointer;
      text-decoration: none;
    }

    .clickable-name:hover {
      color: #ff2f72;
    }

 

    /* CSS-toggles voor responsive werking van de modal kolommen */
    @media (max-width: 768px) {

      .modal-content th.col-gc,
      .modal-content td.col-gc,
      .modal-content th.col-mountain,
      .modal-content td.col-mountain,
      .modal-content th.col-points,
      .modal-content td.col-points {
        display: none;
      }

      .modal-content th.active-col,
      .modal-content td.active-col {
        display: table-cell !important;
      }

      .modal-overlay {
        align-items: flex-start !important;
        padding: 0;
      }

      .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 12px 12px;
        margin-top: 0 !important;
        margin-left: auto;
        margin-right: auto;
        max-height: 95vh;
      }

      .table-controls.mobile-only {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        justify-content: flex-end;
      }
    }

    @media (min-width: 769px) {
      .table-controls.mobile-only {
        display: none;
      }
    }


/* ========================================
     
    STATS.PHP

   ======================================== */

.fa-shirt {
  background: var(--white);
  border-radius: 50%;
  padding: 4px;
}
.icon-gc {
  color: var(--primary);
}
.icon-points {
  color: var(--points-jersey);
}
.icon-mountain {
  color: var(--mountain-jersey);
}

/* Vergelijk Sectie Styling */
.compare-container {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.compare-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.compare-label {
  font-size: 0.8em;
  color: var(--background);
  text-transform: uppercase;
}
.select-cmpA,
.select-cmpB {
  min-width: 200px;
}

/* Grafiek en Tabel */
.chart-wrapper {
  height: 350px;
  margin-bottom: 20px;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
}

#statsMasterForm { display: none; margin: 0; padding: 0; }
/* Tabel layout */

/* Tabel instellingen */
.table-vergelijk {
    width: 100% !important;
    table-layout: fixed; /* Dwingt de tabel binnen de box */
    border-collapse: collapse;
    padding: 4px;
}

/* 1e kolom (Et.) - Vaste breedte */
.table-vergelijk th:nth-child(1),
.table-vergelijk td:nth-child(1) {
    width: 20px; 
    text-align: center;
}

/* 4e kolom (Verschil/Diff.) - Vaste breedte */
.table-vergelijk th:nth-child(4),
.table-vergelijk td:nth-child(4) {
    width: 40px; /* Pas deze waarde aan naar wat jij mooi vindt voor de tijdnotatie */
    text-align: right;
    white-space: nowrap;
}



/* De middelste kolommen (Keuze A & B) krijgen de rest */
.table-vergelijk th:nth-child(2), .table-vergelijk td:nth-child(2),
.table-vergelijk th:nth-child(3), .table-vergelijk td:nth-child(3) {
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis; /* Dit kapt lange namen af met ... als ze écht niet passen */
    white-space: nowrap;
}

/* Mobiele regels */
@media (max-width: 600px) {
    .desktop { display: none !important; } /* Verbergt Totaal + kop 'Verschil' */
    .mobile { display: inline !important; } /* Toont kop 'Diff.' */
    .table-vergelijk { font-size: 12px; }

        /* 4e kolom (Verschil/Diff.) - Vaste breedte */
    .table-vergelijk th:nth-child(4),
    .table-vergelijk td:nth-child(4) {
        width: 40px; /* Pas deze waarde aan naar wat jij mooi vindt voor de tijdnotatie */
        text-align: right;
        white-space: nowrap;
    }
}

/* ===========================================
    
    MIJN PICKS

  =========================================== */

    .team-circle {
        display: inline-block;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        margin-right: 8px;
        vertical-align: middle;
        border: 1px solid rgba(0, 0, 0, 0.15);
        flex-shrink: 0; /* Zorgt dat het bolletje nooit vervormt */
    }

    /* Flexbox wrapper binnen de TD zorgt dat de boel op 1 regel blijft zonder te breken */
    .team-container {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
}

/* ===========================================
    
    MIJN PROFIEL

  =========================================== */

input {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

/* Game list */
ul.game-list {
  list-style: none;
  padding: 0;
  color: var(--text-color);
}

ul.game-list li {
  margin-bottom: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

ul.game-list a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.04);
  text-decoration: none;
  font-weight: 500;
  color: var(--text-color);
  transition: background-color 0.3s ease;
}
ul.game-list a:hover {
  background-color: rgba(0, 0, 0, 0.12);
  font-weight: bold;
  color: var(--primary);
}

ul.game-list .game-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

ul.game-list .game-logo {
  width: 1.2rem;
  height: 1.2rem;
}

/* Action list */
ul.action-list {
  list-style: none;
  padding: 0;
  color: var(--text-color-light);
}

ul.action-list li {
  margin-bottom: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

ul.action-list a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.04);
  text-decoration: none;
  font-weight: 500;
  color: var(--text-color);
  transition: background-color 0.3s ease;
}

ul.action-list a:hover {
  background-color: rgba(0, 0, 0, 0.12);
  font-weight: bold;
  color: var(--primary);
}

/* Active state for password link */
#toggle-password-link.active {
  font-weight: bold;
  color: var(--f1-white);
  background-color: var(--primary);
}

/* ===========================================
    
    SUBLEAGUE PAGE

  =========================================== */

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

.subleague-list li {
  margin-bottom: 0.5rem;
}

.subleague-list a {
  text-decoration: none;
  color: var(--text-color);
  display: block;
  padding: 1rem;
  background-color: #f0f0f0;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subleague-list h3 {
  margin: 0.5rem;
  font-size: 1.2rem;
}

.subleague-list a.active,
.subleague-list li.active a {
  background-color: #e0e0e0;
}
.subleague-list a:hover {
  background-color: #dcdcdc;
}
.subleague-list li.open a {
  background-color: var(--primary);
  color: var(--text-color-light);
}

.form-box-subleague {
  border: 1px solid var(--primary);
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  background-color: #f9f9f9;
}
.form-box-subleague_sec {
  border: 1px solid #ccc;
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.form-box-subleague input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  font-family: var(--font-body);
  margin-top: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Container styling */
.form-box-invite {
  margin-left: 0;
}

.form-container {
  display: none;
}

/* Ledenbeheer */
.form-inline {
  display: inline;
}

.invite_friends {
  margin-left: 1.5rem;
}

/* De textarea voor de uitnodiging */
.invite-input {
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.4;
  width: 100%; /* Voorheen 80%, nu 100% voor betere weergave */
  min-height: 100px;
  padding: 0.6em 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  resize: none;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow: hidden;
  margin-top: 0.5rem;
}

/* Uitnodiging details & Labels */
.invite-details {
  margin-top: 20px;
}

.invite-label-group {
  margin-left: 20px;
}

.invite-code-display {
  display: none;
}

/* Actie knoppen (Copy/WhatsApp etc) */
.invite-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
}

.btn-icon-delete {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-size: 1.2rem;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;

  /* Centreert de knoppen horizontaal */
  justify-content: center;

  /* Centreert de knoppen verticaal (indien de rij een vaste hoogte heeft) */
  align-items: center;
}


.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1em;
  gap: 1.4em;
  margin-left: 0.5rem;
}

/* De Pills basis */
.pill-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: var(--font-body), sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
  color: #ffffff !important;
}

/* Specifieke Pill Kleuren */
.pill-wa {
  background-color: #25d366;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.2);
}
.pill-wa:hover {
  background-color: #20ba5a;
}

.pill-mail {
  background-color: #007bff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}
.pill-mail:hover {
  background-color: #0069d9;
}

/* Font Awesome Icon styling binnen de pill */
.pill-small i {
  font-size: 1.1rem;
}

/* Feedback box */
#temp-info-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  border: 1px solid var(--primary);
  background: var(--primary);
  border-radius: 8px;
  z-index: 10000;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: none;
  color: var(--text-color-light);
}

/* Code genereren box */
.generate-code-box {
  background: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0 15px 20px;
}

.generate-code-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.input-code-edit {
  text-transform: uppercase;
  width: 160px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn-generate {
  margin: 0;
  background-color: #6c757d;
}

.flash-border {
  animation: codeFlash 1.5s ease-in-out;
}

/* ========================================
     
    . RESPONSIVE

   ======================================== */

/* ########## Algemeen ########## */
.mobile {
  display: none;
}

@media (max-width: 499px) {
  h2 {
    font-size: 1.3rem;
    font-variant: small-caps;
    text-transform: uppercase;
    margin-bottom: 0.625rem;
  }

  .mobile {
    display: flex;
  }
  .desktop {
    display: none;
  }
  .columns {
    flex-direction: column;
  }

  /* ########## Picks Page ########## */
  .stage-detail {
    font-size: 0.7rem;
  }
  .stage-label {
    width: 75px;
  }
  .pick-confirmation {
    min-height: 100px;
  }

  /* ########## Ranking Page ########## */

  .rotate-icon {
    display: inline-block;
  }

  .stage-container {
    justify-content: center;
    margin-left: 0;
    text-align: left;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
  }

  .label-text {
    width: 100%;
  }

  .stage-info {
    width: 100%;
    justify-content: start;
  }

  /* ########## Stats Page ########## */
  .table-stats td,
  .table-stats th {
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .table-vergelijk {
    font-size: 0.65rem;
  }

  /* Verberg de specifieke kolommen standaard op mobiel */
  .col-gc,
  .col-mountain,
  .col-points {
    display: none !important;
  }
  .col-gc.active-col,
  .col-mountain.active-col,
  .col-points.active-col {
    display: table-cell !important;
  }

  /* Styling voor de toggle knoppen */
  .table-controls {
    display: flex;
    gap: 5px;
    margin-bottom: -10px;
    justify-content: flex-end;
  }

  .btn-toggle {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: #eee;
    opacity: 0.6;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
  }

  .btn-toggle i.fa-shirt {
    background: transparent !important;
    padding: 4px;
    transition: all 0.3s ease;
  }
  .btn-toggle.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .btn-toggle.active {
    opacity: 1;
    color: white;
  }

  /* Specifieke kleur voor GC */
  .btn-toggle.active[onclick*="col-gc"] {
    background: var(--primary);
    border-color: var(--primary);
  }

  /* Specifieke kleur voor Points/Shirt (bijv. Paars zoals je inline had) */
  .btn-toggle.active[onclick*="col-points"] {
    background: var(--points-jersey);
    border-color: var(--points-jersey);
  }

  /* Specifieke kleur voor Points/Shirt (bijv. Paars zoals je inline had) */
  .btn-toggle.active[onclick*="col-mountain"] {
    background: var(--mountain-jersey);
    border-color: var(--mountain-jersey);
  }

  /* Als de knop actief is, mag het shirt wel de witte cirkel krijgen */
  .btn-toggle.active i.fa-shirt {
    background: var(--white) !important;
  }

  /* Specifieke kleur voor de derde toggle (bijv. Blauw) */
  .btn-toggle.active[onclick*="col-mountain"] {
    background: var(--mountain-jersey);
    border-color: var(--mountain-jersey);
  }

  .hun-vergelijk {
    font-size: 0.6rem;
  }

  /* Closing Accolade */
}

/* ========================================
     
    . KEYFRAMES

   ======================================== */

@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
@keyframes slowRide {
  0% {
    left: -15%;
  }
  100% {
    left: 110%;
  }
}
@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}

@keyframes codeFlash {
  0% {
    border: 4px solid var(--primary);
    font-weight: bold;
    transform: scale(1.1);
  }
  100% {
    border: 1px solid #ccc;
    font-weight: normal;
    transform: scale(1);
  }
}
