/* =====================================================
   CSS Custom Properties — 2026 Modern Refresh
   ===================================================== */
:root {
  --color-brand-dark: #00008B; /* darkblue */
  --color-brand-mid: #0a3d8f;
  --color-brand-light: #57A0D5;
  --color-brand-hover: #4a8fc4;
  --color-text-light: #eee;
  --color-text-dark: #1a1a2e;
  --color-bg-navbar: #0d1b4b;
  --color-bg-dropdown: #ffffff;
  --color-bg-body: #f5f7fa;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.15);
  --shadow-md: 0 4px 20px rgba(0,0,0,.20);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: 150ms ease;
  --transition-base: 260ms ease;
  --transition-slow: 400ms ease;
}

/* ── Tour de France theme (yellow) ── */
body.theme-tour {
  --color-brand-dark: #997000;
  --color-brand-mid: #b38200;
  --color-brand-light: #FFD700;
  --color-brand-hover: #e6c200;
  --color-bg-navbar: #3a2800;
}

/* ── Giro d'Italia theme (pink) ── */
body.theme-giro {
  --color-brand-dark: #8b005a;
  --color-brand-mid: #a8006d;
  --color-brand-light: #E91E8C;
  --color-brand-hover: #d21880;
  --color-bg-navbar: #3a0028;
}

/* ── Vuelta a España theme (red) ── */
body.theme-vuelta {
  --color-brand-dark: #8b0000;
  --color-brand-mid: #a80000;
  --color-brand-light: #CC0000;
  --color-brand-hover: #b80000;
  --color-bg-navbar: #3a0000;
}


html {
  height: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  padding-bottom: 20px;
  position: relative;
  margin: 0;
  min-height: 100%;
  background-color: var(--color-bg-body);
  color: var(--color-text-dark);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Set padding to keep content from hitting the edges */
.body-content {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 15px;
}

@media only screen and (min-device-width : 1500px) {
  .body-content {
    /*max-width: 1400px;*/
  }
}

.body-content-mobile {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 0 !important;
}

@media all and (min-width:768px) {
  .dl-horizontal dt {
    width: 300px;
  }
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
  max-width: 280px;
}

.control-label {
  padding-top: 5px;
}

.form-group {
  margin-bottom: 1.25rem;
}

/* ── Navbar ── */
.navbar.navbar-dark {
  background: linear-gradient(135deg, var(--color-bg-navbar) 0%, var(--color-brand-mid) 100%) !important;
  box-shadow: var(--shadow-md);
  padding: 0 !important;
  min-height: 44px;
  transition: box-shadow var(--transition-base);
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--color-text-light);
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
  padding: .4rem 1rem .5rem 1rem;
  transition: color var(--transition-fast);
}

/* Profile links (Hello + Logout) — lighter than main nav items */
.nav-link-profile {
  display: inline-block;
  color: rgba(255,255,255,.65);
  font-weight: 400;
  font-size: .82rem;
  letter-spacing: .01em;
  padding: .3rem .5rem;
  text-decoration: none !important;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  vertical-align: middle;
}

  .nav-link-profile:hover {
    color: #fff;
  }

/* Animated underline slide on nav links */
.navbar-dark .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--color-brand-light);
  border-radius: 2px;
  transition: left var(--transition-base), right var(--transition-base);
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link:focus::after {
  left: 8px;
  right: 8px;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
}

/* ── Dropdown menus ── */
.dropdown-menu {
  background: var(--color-bg-dropdown);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0;
  overflow: hidden;
  /* Smooth slide-in animation */
  animation: dropdownSlideIn var(--transition-base) forwards;
  transform-origin: top center;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* ── Tables ── */
.table {
  --bs-table-border-color: rgba(87,160,213,.20);
}

  .table tbody td {
    border-bottom: 1px solid rgba(87,160,213,.12);
    vertical-align: middle;
  }

  .table tbody tr:last-child td {
    border-bottom: none;
  }

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(87,160,213,.06);
}

.table-striped tbody tr {
  transition: background-color var(--transition-fast);
}

  .table-striped tbody tr:hover {
    background-color: rgba(87,160,213,.18) !important;
    cursor: default;
  }

/* ── Buttons ── */
.btn-primary {
  color: #fff;
  background-color: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(0,0,139,.30);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

  .btn-primary:hover {
    background-color: var(--color-brand-light);
    border-color: var(--color-brand-light);
    box-shadow: 0 4px 14px rgba(87,160,213,.45);
    transform: translateY(-1px);
  }

  .btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
  }

.btn-outline-primary {
  color: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}

  .btn-outline-primary:hover {
    color: #fff;
    background-color: var(--color-brand-light);
    border-color: var(--color-brand-light);
    box-shadow: 0 3px 10px rgba(87,160,213,.40);
    transform: translateY(-1px);
  }

.btn-info {
  background-color: var(--color-brand-light);
  border-color: var(--color-brand-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}

  .btn-info:hover {
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    box-shadow: 0 3px 10px rgba(0,0,139,.35);
    transform: translateY(-1px);
  }

li.dropdown-item a.nav-link {
  text-decoration: none !important;
}

.nav-link {
  transition: color var(--transition-fast);
}

li.dropdown-item {
  margin: 0;
  padding: 0;
  border-radius: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}

  li.dropdown-item:hover,
  li.dropdown-item:active {
    background-color: rgba(87,160,213,.18);
    color: var(--color-brand-dark);
  }

  li.dropdown-item a.nav-link {
    color: var(--color-text-dark) !important;
    display: block;
    padding: .35rem 1rem !important;
  }

  li.dropdown-item:hover a.nav-link,
  li.dropdown-item:active a.nav-link {
    color: var(--color-brand-dark) !important;
  }

.dropdown-divider {
  border-top-color: rgba(0,0,0,.10);
  margin: .3rem 0;
}

.dropdown-submenu {
  position: relative;
}

  .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    -webkit-border-radius: 0 6px 6px 6px;
    -moz-border-radius: 0 6px 6px;
    border-radius: 0 6px 6px 6px;
  }

  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }

  .dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
  }

  .dropdown-submenu:hover > a:after {
    border-left-color: #fff;
  }

.uitleg li {
  padding: 10px;
}

.uitleg ol li {
  padding: 0px;
}

.puntentelling {
  box-shadow: var(--shadow-sm);
  background-color: #F4F6FB;
  border-radius: var(--radius-sm);
  display: inline-table;
  margin: 0.5%;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

  .puntentelling:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

.punten {
  display: block;
  height: 60px;
  padding-top: 20px;
  text-align: center;
}

.aantal-punten {
  border: 2px solid white;
  border-radius: 50%;
  color: white;
}

.plaats {
  color: #101010;
  display: block;
  height: 120px;
  font-family: 'Palatino Linotype', Arial;
  font-size: 16pt;
  font-weight: 500;
  padding: 20px 10px 70px 10px;
  text-align: center;
}

/* ── Footer ── */
footer {
  position: absolute;
  right: 0;
  bottom: -40px;
  left: 0;
  padding: 10px 0;
  text-align: center;
  font-size: .82rem;
  color: #666;
  border-top: 1px solid rgba(0,0,0,.07);
  background: linear-gradient(to bottom, transparent, rgba(0,0,139,.04));
  letter-spacing: .01em;
}

  footer a {
    color: var(--color-brand-mid);
    transition: color var(--transition-fast);
  }

    footer a:hover {
      color: var(--color-brand-light);
    }

@media only screen and (min-device-width : 375px) and (max-device-width : 667px) {
  .plaatstext {
    display: none;
  }

  .br {
    display: block;
  }

  .puntentelling {
    width: 15%;
  }
}

@media only screen and (min-device-width : 667px) {
  .br {
    display: none;
  }

  .puntentelling {
    width: 8%;
  }
}

.legend {
  margin-left: 400px;
}

#totaalChart,
#geleTruiChart,
#groeneTruiChart,
#bolleTruiChart,
#jongerenTruiChart {
  width: 100% !important;
  max-width: 1000px;
  height: 480px;
}

/* polarArea: give the wrapper an explicit height so maintainAspectRatio:false works correctly */
.polar-chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 750px;
  height: 750px;
}

@media only screen and (min-device-width : 375px) and (max-device-width : 667px) {
  #totaalChart {
    width: 350px;
    height: 300px;
  }

  .legend {
    margin-left: 120px;
  }
}

/* ── Mobile / small-screen overrides ── */
@media (max-width: 767.98px) {

  /* Charts: cap height so they don't dominate a phone screen */
  #totaalChart,
  #geleTruiChart,
  #groeneTruiChart,
  #bolleTruiChart,
  #jongerenTruiChart {
    height: 280px !important;
  }

  .polar-chart-wrapper {
    max-width: 100%;
    height: 340px;
  }

  /* Wide tables: scroll horizontally instead of overflowing */
  .table-responsive-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Navbar collapsed state: dropdown menus stack inline, remove float animation */
  .navbar-collapse .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,.08);
    animation: none;
    padding: 0;
  }

  .navbar-collapse .dropdown-menu .dropdown-item,
  .navbar-collapse li.dropdown-item {
    background: transparent;
  }

  .navbar-collapse li.dropdown-item a.nav-link {
    color: var(--color-text-light) !important;
    padding: .4rem 1.5rem !important;
  }

  .navbar-collapse li.dropdown-item:hover a.nav-link {
    color: #fff !important;
    background: rgba(255,255,255,.12);
  }

  /* Topbar selects: full width in collapsed menu */
  .topbar-select {
    width: 100%;
    max-width: none;
    margin: .25rem 0;
  }

  /* Tab nav: allow wrapping on small screens */
  .nav-tabs {
    flex-wrap: wrap;
  }

  /* Form inputs: allow full width on mobile */
  input,
  select,
  textarea {
    max-width: 100%;
  }
}

/* styles for '...' */
.block-with-text {
  overflow: hidden;
  position: relative;
  line-height: 1.2em;
  max-height: 36em;
  text-align: justify;
  margin-right: -1em;
  padding-right: 1em;
}

  .block-with-text:before {
    position: absolute;
    right: 0;
    bottom: 0;
  }

  .block-with-text:after {
    content: '';
    position: absolute;
    right: 0;
    width: 1em;
    height: 1em;
    margin-top: 0.2em;
    background: white;
  }

.topbar-select {
  margin-left: 4px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-dark);
  background-color: rgba(255,255,255,.92);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), background-color var(--transition-fast);
}

  .topbar-select:hover:not(:disabled) {
    background-color: #fff;
    box-shadow: var(--shadow-md);
  }

  .topbar-select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

.success {
  background-color: lightblue;
  color: black;
}

.tab-pane {
  padding-top: 30px;
}

/* ── Nav tabs (Statistieken page) ── */
:root {
  --color-bg-tabpane: #ffffff;
}

.nav-tabs {
  border-bottom: 2px solid var(--color-brand-light);
  gap: 4px;
}

  .nav-tabs .nav-link {
    color: var(--color-brand-mid);
    font-weight: 500;
    font-size: .88rem;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: .4rem .9rem;
    background: transparent;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

    .nav-tabs .nav-link:hover:not(.active) {
      background: rgba(87,160,213,.12);
      color: var(--color-brand-dark);
      border-color: rgba(87,160,213,.3) rgba(87,160,213,.3) transparent;
    }

    .nav-tabs .nav-link.active {
      background: var(--color-bg-tabpane);
      color: var(--color-brand-dark);
      font-weight: 600;
      border-color: var(--color-brand-light) var(--color-brand-light) transparent;
      border-bottom: 2px solid var(--color-bg-tabpane);
      margin-bottom: -2px;
      position: relative;
      z-index: 1;
    }

.tab-content {
  background: var(--color-bg-tabpane);
  border: 1px solid var(--color-brand-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

  /* ── Statistiek trui table (dark header) ── */
  .tab-content .table-trui {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: .9rem;
  }

    .tab-content .table-trui thead tr {
      background: linear-gradient(135deg, var(--color-bg-navbar) 0%, var(--color-brand-mid) 100%);
    }

    .tab-content .table-trui thead th {
      color: #000;
      font-weight: 600;
      font-size: .8rem;
      letter-spacing: .05em;
      text-transform: uppercase;
      padding: .6rem 1rem;
      border: none;
    }

      .tab-content .table-trui thead th:first-child {
        border-radius: var(--radius-sm) 0 0 0;
      }

      .tab-content .table-trui thead th:last-child {
        border-radius: 0 var(--radius-sm) 0 0;
      }

    .tab-content .table-trui tbody td {
      padding: .45rem 1rem;
      border-bottom: 1px solid rgba(87,160,213,.12);
      vertical-align: middle;
    }

    .tab-content .table-trui tbody tr:last-child td {
      border-bottom: none;
    }

    .tab-content .table-trui tbody tr:nth-of-type(odd) {
      background-color: rgba(87,160,213,.05);
    }

    .tab-content .table-trui tbody tr {
      transition: background var(--transition-fast);
    }

      .tab-content .table-trui tbody tr:hover {
        background-color: rgba(87,160,213,.15) !important;
      }

a {
  text-decoration: none !important;
}
