@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");

/*--------------------------------------------------------------
  1. Root Variables
--------------------------------------------------------------*/
:root {
  --primary: #c1cf4c;
  --primary-dark: #010102;
  --text-color: #17170d;
  --header-color: #17170d;
  --background: #17170d;
  --background-box: white;
  --box-color-color: white;
  --white: white;
  --gray-dark: #333333;
  --gray-light: #dddddd;
  --accent-green: #00c853;
  --accent-red: #d50000;
  --accent-orange: #ff7f50;
  --accent-secondary: gold;
  --color-secondary: black;
  --font-body: "Montserrat", sans-serif;

  --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 red;
  --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;

  --border-gradient-country: linear-gradient(
      to right,
      red,
      blue,
      white,
      white,
      white,
      blue,
      red
    )
    1;

  --border-image-country-header: linear-gradient(
      to right,
      red,
      red,
      blue,
      white,
      white,
      blue,
      red,
      red
    )
    100% 1;
}

/*--------------------------------------------------------------
  2. Global Styles & Resets
--------------------------------------------------------------*/
html,
body {
  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;
  font-weight: bold;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.4rem;
  font-variant: small-caps;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  color: var(--header-color);
}
h4 {
  font-size: 0.9rem;
}
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.text-align_l {
  text-align: left;
}
.text-align_r {
  text-align: right;
}
.text-align_c {
  text-align: center;
  color: var(--header-color); /* /* CHECK : is deze toevoeging nodig ? */
}

/*--------------------------------------------------------------
  3. Layout
--------------------------------------------------------------*/
.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;
}

.column_picks > .box_color {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Login/Reset Password Specific Layout */
.wrapper-login .columns {
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.wrapper-login .column {
  flex: 0 0 30rem;
  max-width: 100%;
}
.wrapper-login .column > .box,
.wrapper-login .column > .box_color {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

/*--------------------------------------------------------------
  4. Boxes & Panels
--------------------------------------------------------------*/
.box,
.box_color {
  padding: 1rem;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: var(--background-box);
}

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

.box_color h2 {
  color: var(--header-color);
}

.box_profile {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

.info-box,
.info-box_main,
.info-box_green,
.info-box_yellow,
.info-box_red {
  padding: 1rem;
  margin-bottom: 1rem;
}

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

.info-box_yellow {
  background: #faf3bc;
  border-left: var(--info-box-border-yellow);
  color: black;
}

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

.error-text {
  color: red;
}

/*--------------------------------------------------------------
  5. Logos & Icons
--------------------------------------------------------------*/
.logo,
.grey-logo,
.logo.desktop-only,
.logo.mobile-only,
.home_crest_1,
.away_crest_1,
img.logo {
  width: 1.2rem; /* vaste breedte */
  height: 0.85rem; /* vaste hoogte - gebruik verhouding vlaggen (40x30 etc). Pas aan naar wens */
  object-fit: cover; /* vul het vak; gebruik 'contain' als je geen crop wilt */
  border-radius: 2px; /* optioneel, mooier bij ronde of vierkante vlaggen */
  vertical-align: middle;
  margin: 0.2rem 0.25rem 0.15rem 0.25rem;
}
/* fallback highlight wanneer :has niet werkt */
.match-option.selected .team-name,
.match-option .team-name.highlighted-choice {
  border-bottom: 2px solid var(--accent-red);
  font-weight: bold;
}

.grey-logo {
  filter: grayscale(100%);
  opacity: 0.6;
}
.updateBtn {
  margin-top: 0rem;
  border: none;
}
.logo_large {
  width: 180px;
  height: auto;
  margin-top: 5px;
}
img.crestio {
  width: 100px;
  height: auto;
  margin-top: 5px;
}

/*--------------------------------------------------------------
  6. Tables
--------------------------------------------------------------*/
table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-family: var(--font-body);
  margin: 1.25rem 0;
  font-size: 1rem;
}

th,
td {
  padding: 0.25rem;
  border: 1px solid var(--gray-dark);
}

.table-divider {
  height: 1rem;
  background-color: var(--table-divider);
  border: none;
}

table th {
  background-color: var(--primary);
  color: var(--header-color);
  padding: 6px 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

table td {
  padding: 3px;
  border: 1px solid rgba(176, 170, 170, 0.692);
}
table tr:nth-child(even) {
  background-color: rgba(151, 151, 151, 0.14);
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2),
.club-table th:first-child,
.club-table td:first-child {
  text-align: left;
  padding-left: 0.5rem;
}

.order-of-merit-table th:nth-child(2),
.order-of-merit-table td:nth-child(2) {
  text-align: left;
  padding-left: 0.5rem;
}


.highlight-row {
    background-color: rgba(193, 207, 76, 0.5) !important; /* Lichtgroen of kies je eigen kleur */
}

  .search-container {
      margin-bottom: 15px;
      text-align: left;
      display: inline-block; margin-left: 0;"

  }
  .search-container input {
      width: 100%;
      max-width: 400px;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 1rem;
      box-sizing: border-box;
      font-family: var(--font-body);
        }

/*--------------------------------------------------------------
  7. Match Cards & Club Info
--------------------------------------------------------------*/
fieldset {
  background: var(--fieldset);
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  margin-bottom: 32px;
}

.session-block {
  background: var(--session-block);
  padding: 20px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  margin-bottom: 32px;
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 1rem;
  background: var(--match-card);
}

legend {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 1rem;
}

.matchday {
  background: var(--primary);
  padding: 5px;
  border-radius: 3px;
  color: var(--header-color);
  font-size: 1.6rem;
}
.matchday_large {
  font-size: 3rem;
  padding: 0px 10px;
}

.match-choices {
  display: flex;
  align-items: center;
}
.match-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding-bottom: 10px;
}

.match-option input[type="radio"] {
  margin: 0;
  vertical-align: middle;
}

.vs-text {
  font-weight: normal;
  font-size: 0.8rem;
  margin: 0px 3px 0.5rem 3px;
}

.match-dart.desktop {
  display: flex;
  align-items: center; /* verticaal centreren */
  gap: 5px; /* ruimte tussen items */
}

.match-dart.desktop .vs-text2 {
  font-size: 0.8rem; /* kleiner font */
  text-align: center;
  margin: 0 5px; /* lucht links/rechts */
  flex: 0 0 auto; /* voorkomt dat 'vs' verschuift */
}

.match-result {
  display: flex;
  align-items: center; /* verticaal centreren alle items */
  justify-content: start; /* horizontaal centreren de hele rij */
  gap: 0.3rem; /* ruimte tussen elementen */
}

/*
.match-result .logo {
  height: 1.1rem;          /* vaste hoogte voor consistentie 
} 
*/

.match-result .score {
  min-width: 20px; /* vaste breedte zodat score niet springt */
  text-align: center; /* horizontaal centreren */
  font-size: 1rem;
}

.vs-text1 {
  font-weight: normal;
  font-size: 0.8rem;
  margin: 0px 3px 0rem 3px;
}

.joker-block {
  display: flex;
  align-items: center;
  font: 500 0.9rem/1.2 var(--font-body);
  margin-left: -0.28rem;
  text-decoration: none;
  color: var(--joker-block);
  cursor: pointer;
  font-weight: bold;
  border-radius: 24px;
  background-color: var(--accent-orange);
  width: max-content;
  padding: 0.2rem;
  white-space: nowrap;
}

.team-name {
  margin: 0;
  padding: 0;
  vertical-align: middle;
}
.highlight-red {
  color: var(--accent-red);
  font-weight: bold;
}

label img,
.result img {
  height: 24px;
  vertical-align: middle;
  margin: 0 6px;
}

.match small {
  display: block;
  font-size: 0.8em;
  color: #555;
  margin-bottom: 28px;
}
.match-past {
  color: #999;
}
.match-future {
  color: #000;
}

label:has(input[type="radio"]:checked) .team-name,
.chosen-team-highlight,
.highlighted-choice {
  border-bottom: 2px solid var(--accent-red);
  font-weight: bold;
}

/*--------------------------------------------------------------
  8. Forms & Inputs
--------------------------------------------------------------*/
.selected_round {
  min-width: 160px;
  margin: 0 40px 15px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  padding: 10px 32px 10px 12px;
  appearance: none;
  background: var(--selected_round)
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'><path fill='%23333' d='M0 0l5 5 5-5z'/></svg>")
    no-repeat right 10px center/10px 5px;
  outline: none;
}

.contact-box input,
.register-box input,
.login-box input,
.reset-box input {
  width: calc(100% - 20px);
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--gray-dark);
  border-radius: 4px;
  font-size: 1em;
  font-family: var(--font-body);
}

.form-message {
  margin-top: 1rem;
  display: block;
}

/*--------------------------------------------------------------
  9. Buttons & Links
--------------------------------------------------------------*/
.btn-submit,
.btn-submit_alt,
.btn-submit_sec {
  padding: 10px 20px;
  color: var(--header-color);
  font-family: var(--font-body);
  border-radius: 24px;
  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 {
  background: var(--primary);
  border: none;
}
.btn-submit_alt {
  background: var(--primary);
  border: 2px solid var(--border-color-btn-alt); /* CHECK : color zetten als color btn-submit alt  */
}
.btn-submit_sec {
  background: var(--header-color);
  border: 1px solid var(--color-secondary);
  color: var(--text-color-btn-sec);
}

/* Knoppen Stand */
.tab-button,
.sub-tab-button {
  display: inline-block;
  padding: 10px 20px;
  margin-right: 5px;
  border: none;
  background: var(--primary);
  color: var(--header-color);
  cursor: pointer;
  border-radius: 24px;
  font-variant: small-caps;
  text-transform: uppercase;
}

.tab-button.active,
.sub-tab-button.active {
  background: var(--header-color);
  color: white;
  font-weight: bold;
  border: 1px solid black;
  font-family: var(--font-body);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.extra-links {
  text-align: right;
}
.extra-links a {
  color: var(--primary);
  text-decoration: none;
}
.extra-links a:hover {
  text-decoration: underline;
}

.change_club a {
  font-size: 0.7em;
  text-decoration: none;
  font-variant: small-caps;
  text-transform: uppercase;
  color: var(--primary);
}
.change_club a:visited {
  color: var(--primary);
}
.change_club a:hover {
  text-decoration: underline;
}

.login-actions .forgot-link {
  text-decoration: none;
  margin-left: 1rem;
  color: var(--primary);
}
.login-actions .forgot-link:hover {
  text-decoration: underline;
}

/*--------------------------------------------------------------
  10. Profile Page
--------------------------------------------------------------*/
.profile_header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.right-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.club-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
#club-form {
  display: none;
}

/*--------------------------------------------------------------
  11. Spinner & Modal
--------------------------------------------------------------*/
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  padding: 2rem;
  opacity: 1;
  transition: opacity 0.8s ease;
}
.spinner-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 8px solid #ccc;
  border-top: 8px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 1rem auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.loading-text {
    color: #666;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/*--------------------------------------------------------------
  12. Responsive
--------------------------------------------------------------*/
.mobile {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.desktop {
  display: flex;
}
.show-mobile {
  display: none;
}
.rotate-icon {
  display: none;
}

.mobile-only {
  display: none;
}
.desktop-only {
  display: inline;
}

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

  .wrapper-login .column,
  .wrapper-reset .column {
    flex: 1 1 100%;
  }

  .btn-picks {
    padding: 0.6rem 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.25rem 0.2rem;
  }

  .standings-table th:nth-child(0),
  .standings-table td:nth-child(0) {
    padding: 0rem;
  }

  .pick-table th,
  .pick-table td {
    padding: 0.25rem 0.15rem;
    font-size: 1rem;
  }

  .tab-button .full-label,
  .sub-tab-button .full-label {
    display: none;
  }
  .tab-button::after,
  .sub-tab-button::after {
    content: attr(data-short);
    font-weight: 700;
  }

  .hide-mobile {
    display: none;
  }
  .show-mobile {
    display: block;
  }
  .columns {
    flex-direction: column;
  }

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

  .mobile {
    display: flex;
  }
  .desktop {
    display: none;
  }
  .vs-text {
    display: none;
  }
  .match-option {
    justify-content: flex-start;
  }

  .mobile-only {
    display: inline;
  }
  .desktop-only {
    display: none;
  }

  .tab-button,
  .sub-tab-button {
    /* Minder verticale padding, minder breedte */
    padding: 8px 16px;

    /* Verminderde ruimte tussen de knoppen */
    margin: 0 4px 0 0;
  }

  /* Zorg ervoor dat de desktop tekst verdwijnt */
  .desktop-only-text {
    display: none !important;
  }

  /* Zorg ervoor dat de mobiele tekst verschijnt */
  .mobile-only-text {
    display: inline !important;
  }
}

/*--------------------------------------------------------------
  13. Stand (ranking.php)
--------------------------------------------------------------*/
.rotate-icon {
  max-height: 1.2rem;
  height: 1em;
  vertical-align: middle;
  margin-left: 8px;
}

.update-info {
  font-style: italic;
}

hr {
  border: none;
  height: 1px;
  background-color: color-mix(in srgb, var(--primary) 40%, transparent);
  margin: 0rem 0 0 0;
}

hr.match-hr {
  border: 0;
  border-bottom: 2px solid transparent;
  border-image: var(--border-gradient-country);
  border-image-slice: 1;
  margin: -1rem auto 1rem auto;
  width: 15rem;
}

.darts-hr {
  margin: 1rem 0;
}

small[data-utc-time] {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
  font-weight: bold;
  margin-left: 0.5rem;
}

.gespeeld {
  margin-top: 1.5rem;
  font-weight: bold;
}

/*--------------------------------------------------------------
  13. Profielpage
--------------------------------------------------------------*/

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

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); /* 1x hier is genoeg */
  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 a:visited {
  color: var(--text-color);
}

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); /* standaard tekstkleur */
}

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;
}

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

/*--------------------------------------------------------------
  13. Subleagues
--------------------------------------------------------------*/

.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);
}

.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;
}

.form-box-subleague button {
  font-family: var(--font-body);
  padding: 0.8rem 1.5rem;
  color: var(--primary-dark);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.form-box-invite {
  margin-left: 0rem;
}

.invite_friends {
  margin-left: 1.5rem;
}

.invite-input {
  font-family: var(--font-body);
  font-size: 1em;
  width: 80%;
  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;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1em;
}

.share-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 1em;
  text-decoration: none;
  padding: 0.6em 0.5em;
  border-radius: 6px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease;
  color: var(--text-color);
  width: fit-content;
}

.share-link:hover {
  background-color: #e0e0e0;
}

.share-link:visited {
  color: var(--text-color);
}

.icon {
  width: 20px;
  height: 20px;
  margin-right: 0.2em;
}

.invite-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin-left: 0.5rem;
}

.button-row {
  display: flex;
  gap: 1.5rem;
}

#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);
  animation: fadeInOut 3s forwards;
  text-align: center;
  display: none;
  color: var(primary-dark);
}

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

.nav-left a,
.nav-right a {
  text-decoration: none;
  font-weight: bold;
}

.whatsapp-icon {
  font-size: 1.2em; /* maakt het groter */
  color: #25d366; /* officiële WhatsApp-groen */
  margin-left: 0.3em; /* optioneel: ruimte tussen tekst en icoon */
  vertical-align: middle; /* uitlijning met tekst */
}

/* Standaard (Desktop): Toon de lange tekst, verberg de korte tekst */
.desktop-only-text {
  display: inline;
}

.mobile-only-text {
  display: none;
}

/* basis (desktop) */
img.logo.desktop-only {
  display: inline-block;
}
img.logo.mobile-only {
  display: none;
}

/* mobiel */
@media (max-width: 768px) {
  img.logo.desktop-only {
    display: none !important;
  }
  img.logo.mobile-only {
    display: inline-block;
  }
}

.home_crest_1 {
  margin-right: 4px;
  margin-left: 1px;
}
.away_crest_1 {
  margin-right: -2px;
  margin-left: 1px;
}

/* Alleen in responsive mode (bijv. max-width 768px) */
/* Alleen in responsive mode */
@media (max-width: 499px) {
  .team-name.mobile-only {
    display: inline-block;
    max-width: 100px; /* pas aan naar wens */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  .home_crest_1 {
    margin-right: 0;
    margin-left: 0;
  }

  .away_crest_1 {
    margin-right: -2px;
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .mobile-only-text {
    display: inline-block;
    max-width: 90px; /* pas aan naar smaak */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  /* Zorg dat team-container niet alles oprekt */
  .team-container {
    max-width: 100%;
    overflow: hidden;
  }
}

/* --- OVERRIDE VOOR DISABLED TEAMS (HELEMAAL ONDERAAN PLAATSEN) --- */

/* 1. Forceer de streep door de naam, ook op mobiel */
.team-disabled .team-name,
.match-option.team-disabled .team-name,
.interactive-mobile .team-disabled .team-name {
  color: #888 !important;
  opacity: 0.5 !important;
  border-bottom: none !important; /* Verwijder de rode highlight streep */
  font-weight: normal !important;
}

/* 2. Forceer het grijze logo */
.team-disabled .logo,
.team-disabled img.logo,
.match-option.team-disabled .logo {
  filter: grayscale(100%) !important;
  opacity: 0.4 !important;
}

/* 3. Zorg dat de cursor een blokkade-teken geeft */
.team-disabled,
.team-disabled * {
  cursor: not-allowed !important;
}

/* EXTRA STYLING PICKS ----- */

.mobile-ellipsis {
  text-align: center;
  font-size: 2.5em;
  margin-top: 50px;
}

/*--------------------------------------------------------------
  12. PICKS
--------------------------------------------------------------*/

.quick-pick-toggle {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.85em;
  margin-bottom: 5px;
}

.quick-pick-toggle label {
  margin-left: 5px;
  cursor: pointer;
}

#quickPickModal .modal-box {
  width: 95%;
  /* Maximale breedte op mobiel */
  max-width: 800px;

  /* CRUCIAAL voor hoogtebeheer */
  max-height: 90%;
  /* Zorgt dat het net binnen de viewport past (98% van de viewport hoogte) */
  display: flex;
  flex-direction: column;
  /* Stapelt elementen verticaal */
  /* Verwijder overflow-y: auto van de .modal-box als de .large-modal klasse niet bestaat,
        maar zorg ervoor dat de flexbox-structuur de scrolling overneemt. */
}

#quickPickMatchesContainer {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 15px;
  margin-top: -20px;
}


/*--------------------------------------------------------------
  12. STATS
--------------------------------------------------------------*/


.summary-bar {
    cursor: pointer;
    position: relative;
    padding-left: 20px; /* ruimte voor het driehoekje links */
}

.summary-bar::before {
    content: "▶"; /* gesloten driehoek */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}


.summary-bar.open::before {
    transform: translateY(-50%) rotate(90deg); /* open naar beneden */
}

.summary-bar-table {
    width: 100%;
    cursor: pointer;
    border-collapse: collapse; /* GEEN ruimte tussen rijen */
    margin: 0; /* geen marge tussen de bars */
}

.summary-bar-table td {
    padding: 4px 8px; /* optioneel, kleine padding */
    text-align: left;
}

.triangle-cell {
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.summary-bar-table.open .triangle-cell {
    transform: rotate(90deg);
}



/* ===============================
   HEADER / CONTROLS
================================ */
.box-header {
    margin-bottom: 15px;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

/* ===============================
   TABLE BASIS
================================ */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    display:none; 
    margin-bottom:1rem;
}

/* Vaste kolommen */
.col-fixed,
.stats-table th:first-child,
.stats-table td:first-child,
.col-joker,
.col-score {
    width: 2rem;
    min-width: 2rem;
    max-width: 2rem;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    padding: 5px 2px;
}

.col-pts {
    width: 2rem;
    min-width: 2rem;
    max-width: 2rem;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    padding: 4px 2px;
}

/* Flexibele kolommen */
.col-match {
    width: auto;
    text-align: center;
    overflow: hidden;
}

.col-team-name {
    width: auto;
    text-align: left;
    overflow: hidden;
    padding-left: 5px;
}

/* ===============================
   TEAM DISPLAY
================================ */
.team-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.team-name-shorthand {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

/* ===============================
   PUNTEN BADGES
================================ */
.pts-badge {
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
    display: inline-block;
}

.pts-win {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.pts-zero {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* ===============================
   MOBILE TOGGLE BUTTONS
================================ */
.table-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    width: 100%;
    margin-top: 5px;
}

.btn-toggle {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-toggle.active {
    background: #c1cf4c;
    border-color: #c1cf4c;
    font-weight: bold;
}

/* ===============================
   RESPONSIVE
================================ */
@media (min-width: 769px) {
    .mobile-only-text {
        display: none !important;
    }

    .col-joker,
    .col-score,
    .col-pts {
        display: table-cell !important;
    }

    .table-controls {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only-text {
        display: none !important;
    }

    .col-joker,
    .col-score,
    .col-pts {
        display: none;
    }

    .active-col {
        display: table-cell !important;
    }

    .stats-table td {
        font-size: 0.95rem;
    }
}

.table-controls {
    display: none; /* standaard verborgen */
    gap: 5px;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .table-controls.mobile-visible {
        display: flex !important;
    }
}