﻿h2 {
  margin: 1.5em 0;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
  max-width: 300px;
}

/* No bottom margins for lists in alert boxes */
.alert ul {
  margin-bottom: 0;
}

/* Custom navbar theme color */
.navbar {
  background-color: #e18c03 !important;
}

/* Mobile navigation improvements */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.5em;
  height: 1.5em;
}

/* Mobile dropdown improvements */
@media (max-width: 991.98px) {
  .navbar-nav {
    padding-top: 0.5rem;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
  }

  .dropdown-menu {
    border: none;
    background-color: rgba(0, 0, 0, 0.1);
    margin-left: 1rem;
  }

  .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
  }

  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
  }

  /* User dropdown specific styling for mobile */
  .navbar-nav .dropdown-toggle {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: left;
  }

  .navbar-nav .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
  }
}

#resultcontent table td:first-child,
#resultcontent table td:last-child {
  font-weight: 700;
}

/* Responsive table styles for mobile */
@media only screen and (max-width: 50em) {
  #resultcontent thead {
    display: none;
  }
  #resultcontent td {
    display: block;
  }
  #resultcontent td:first-child {
    border-top-width: 3px;
  }
  #resultcontent td[data-th]:before {
    content: attr(data-th);
    display: inline-block;
    width: 10em;
  }
}

@media only screen and (max-width: 64em) {
  #ploegen thead {
    display: none;
  }
  #ploegen tr {
    display: block;
    position: relative;
  }
  #ploegen td:last-child {
    background: transparent;
    border: 0;
    position: absolute;
    padding: 0;
    top: 0.4em;
    right: 1em;
  }
  #ploegen td {
    display: block;
  }
  #ploegen td:first-child {
    border-top-width: 3px;
  }
  #ploegen td[data-th]:before {
    content: attr(data-th);
    display: inline-block;
    width: 10em;
  }
}

/* Print styles */
@media only print {
    /* Bootstrap container class adds excessive margins in print view */
  .container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .tooltip-cell {
      border: 0 !important;
  }
  h2 {
    margin-top: 24px !important;
  }
}

/* Markdown content styling */
.markdown-content {
  line-height: 1.6;
}

.markdown-content h1 {
  border-bottom: 2px solid #e18c03;
  padding-bottom: 0.3em;
}

.markdown-content h2 {
  border-bottom: 1px solid #e18c03;
  padding-bottom: 0.2em;
}

.markdown-content blockquote {
  border-left: 4px solid #e18c03;
  margin: 1em 0;
  padding: 0.5em 1em;
  background-color: #f8f9fa;
}

.markdown-content code {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  color: #e83e8c;
  font-size: 0.875em;
  padding: 0.125rem 0.25rem;
}

.markdown-content pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

.markdown-content pre code {
  background: transparent;
  border: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.markdown-content table th,
.markdown-content table td {
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  text-align: left;
}

.markdown-content table th {
  background-color: #e18c03;
  color: white;
  font-weight: bold;
}

.markdown-content table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

#werkwijze-om-de-gegevens-van-de-race-in-de-mobiele-app-te-krijgen + table th:last-child,
#werkwijze-om-de-gegevens-van-de-race-in-de-mobiele-app-te-krijgen + table td:last-child {
  width: 50%;
}

/* Home Page Styles */
.custom-tooltip {
  position: absolute;
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}

.tooltip-cell {
  cursor: pointer;
  border-bottom: 1px dotted #ccc;
}

.sortable-table th:hover {
  background-color: #f8f9fa;
}
