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

/* ===== Top navigation ===== */

/* Base nav-link styling: icon + label, smooth hover/active states.
   Lives in site.css (not _Layout.cshtml.css) so it also covers links
   rendered from _LoginPartial.cshtml, which CSS isolation otherwise
   wouldn't reach. */
.navbar .navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #333;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .navbar-nav .nav-link > i {
  width: 1.1em;
  text-align: center;
  opacity: 0.75;
  flex-shrink: 0;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
  color: #1b6ec2;
  background-color: rgba(27, 110, 194, 0.08);
}

.navbar .navbar-nav .nav-link.active {
  color: #1b6ec2;
  background-color: rgba(27, 110, 194, 0.12);
  font-weight: 600;
}

.navbar .navbar-nav .nav-link.active > i {
  opacity: 1;
}

/* Logout button rendered as a nav link */
.navbar .navbar-nav .nav-link.btn-link {
  text-decoration: none;
  border: 0;
  background: transparent;
}

/* Hamburger toggler */
.navbar-toggler {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.4rem 0.6rem;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(27, 110, 194, 0.25);
}

/* Mobile / tablet drawer (below xl breakpoint) */
@media (max-width: 1199.98px) {
  .navbar .navbar-collapse {
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e5e5e5;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .navbar .navbar-nav .nav-link {
    display: flex;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  /* Visual divider between primary nav and the account/login section */
  .navbar .navbar-nav-account {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e5e5;
  }

  /* Let the logout form/button fill the drawer row */
  .navbar form.d-inline {
    display: block !important;
  }
  .navbar .navbar-nav .nav-link.btn-link {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }
}

/* Slightly tighter padding on wide screens where horizontal space matters */
@media (min-width: 1200px) {
  .navbar .navbar-nav .nav-link {
    padding: 0.5rem 0.65rem;
  }
}
