html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.breadcrumb a {
  text-decoration: none;
}

/* Navbar link colors — muted, brighten on hover/active */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.15s ease-in-out;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.show {
    color: rgba(255, 255, 255, 1);
}

[data-bs-theme="light"] .navbar .nav-link {
    color: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="light"] .navbar .nav-link:hover,
[data-bs-theme="light"] .navbar .nav-link:focus,
[data-bs-theme="light"] .navbar .nav-link.show {
    color: rgba(0, 0, 0, 0.9);
}

/* Mobile: dropdowns inside collapsed navbar should be flat/inline, not floating cards */
@media (max-width: 575.98px) {
    .navbar-collapse .dropdown-menu {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0.25rem 0.75rem;
    }

    .navbar-collapse .dropdown-item {
        color: rgba(255, 255, 255, 0.6);
        padding: 0.35rem 0.5rem;
    }

    .navbar-collapse .dropdown-item:hover,
    .navbar-collapse .dropdown-item:focus {
        background: transparent;
        color: rgba(255, 255, 255, 1);
    }

    [data-bs-theme="light"] .navbar-collapse .dropdown-item {
        color: rgba(0, 0, 0, 0.55);
    }

    [data-bs-theme="light"] .navbar-collapse .dropdown-item:hover,
    [data-bs-theme="light"] .navbar-collapse .dropdown-item:focus {
        background: transparent;
        color: rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 767.98px) {
    tr.js-detail-row,
    tr.js-round-row,
    tr.js-avg-row { cursor: pointer; }
}

/* Invert event icons in dark mode so they appear white */
[data-bs-theme="dark"] .event-icon {
    filter: invert(1);
}

/* Hide Bootstrap's default caret, use our own chevron icon */
.navbar .dropdown-toggle::after {
    display: none;
}

.nav-chevron {
    font-size: 0.7em;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.dropdown-toggle.show .nav-chevron {
    transform: rotate(180deg);
}

/* Match nav-link styling for user dropdown */
#userDropdown {
  color: rgba(0, 0, 0, 0.55) !important;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

#userDropdown:hover,
#userDropdown:focus {
  color: rgba(0, 0, 0, 0.7) !important;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] #userDropdown {
  color: rgba(255, 255, 255, 0.55) !important;
}

[data-bs-theme="dark"] #userDropdown:hover,
[data-bs-theme="dark"] #userDropdown:focus {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Remove Bootstrap's default link color for the username text */
#userDropdown span {
  color: inherit;
}

/* User dropdown menu styling */
.dropdown-menu[aria-labelledby="userDropdown"] {
  min-width: 200px;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

/* Logout button styling */
.dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545 !important;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .dropdown-menu[aria-labelledby="userDropdown"] {
  background-color: #212529;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item:hover {
  background-color: rgba(220, 53, 69, 0.2);
}

/* User dropdown menu styling */
.dropdown-menu[aria-labelledby="userDropdown"] {
  min-width: 150px;
  border-radius: 0.25rem;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}

/* Logout button styling */
.dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: background-color 0.15s ease-in-out;
}

.dropdown-menu[aria-labelledby="userDropdown"] .dropdown-item:hover {
  background-color: rgba(220, 53, 69, 0.1);
}