/*
 LMS Home accessibility patch
 Scope: .classic-lms-ui .lms-breadcrumb / .lms-home-link only.
 Rollback: remove this file and its single <link> in app/Views/layouts/main.php.
*/
.classic-lms-ui .lms-breadcrumb {
  min-height: 2.75rem;
  padding: .4rem clamp(.75rem, 1.5vw, 1.25rem);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.classic-lms-ui .lms-breadcrumb > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  min-width: 0;
}
.classic-lms-ui .lms-home-link {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  min-width: 3.75rem;
  padding: .4rem .75rem;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  border-radius: .25rem;
  background: #173f62;
  color: #ffffff !important;
  font-family: inherit;
  font-size: clamp(1rem, .94rem + .18vw, 1.125rem);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  text-shadow: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.classic-lms-ui .lms-home-link:visited {
  color: #ffffff !important;
}
@media (hover:hover) and (pointer:fine) {
  .classic-lms-ui .lms-home-link:hover {
    background: #ffffff;
    border-color: #173f62;
    color: #102f4a !important;
    box-shadow: 0 0 0 1px #ffffff;
  }
}
.classic-lms-ui .lms-home-link:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}
.classic-lms-ui .lms-home-link:focus:not(:focus-visible) {
  outline: none;
}
.classic-lms-ui .lms-home-link:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #102f4a;
}
.classic-lms-ui .lms-home-link:active {
  transform: translateY(1px);
}
.classic-lms-ui .lms-breadcrumb-separator {
  margin-inline: .15rem;
}
/* Home remains a clear, keyboard-accessible button for every signed-in role,
   including Instructor [Ultimate] and Student [Ultimate] account pages. */
.lms-themed-ui .lms-role-path {
  min-height: 2.75rem;
  padding: .4rem clamp(.75rem, 1.5vw, 1.25rem);
}
.lms-themed-ui .lms-role-path > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}
.lms-themed-ui .lms-role-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  min-width: 4.25rem;
  padding: .35rem .8rem;
  border: 2px solid #ffffff;
  border-radius: .3rem;
  background: #173f62;
  color: #ffffff !important;
  font: 700 clamp(.9rem, .85rem + .16vw, 1rem)/1.2 inherit;
  text-decoration: none !important;
  white-space: nowrap;
}
.lms-themed-ui .lms-role-home-button:visited { color: #ffffff !important; }
@media (hover:hover) and (pointer:fine) {
  .lms-themed-ui .lms-role-home-button:hover {
    background: #ffffff;
    border-color: #173f62;
    color: #102f4a !important;
  }
}
.lms-themed-ui .lms-role-home-button:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #102f4a;
}
body.lms-themed-ui[data-lms-mode=dark] .lms-role-home-button {
  background: #294b63;
  border-color: #7dccff;
  color: #ffffff !important;
}
@media (prefers-color-scheme:dark) {
  body.lms-themed-ui[data-lms-mode=system] .lms-role-home-button {
    background: #294b63;
    border-color: #7dccff;
    color: #ffffff !important;
  }
}
@media (max-width: 480px) {
  .classic-lms-ui .lms-breadcrumb {
    min-height: 3rem;
    padding: .35rem .6rem;
  }
  .classic-lms-ui .lms-home-link {
    min-height: 2.5rem;
    padding-inline: .8rem;
    font-size: 1rem;
  }
  .lms-themed-ui .lms-role-home-button { min-height: 2.5rem; }
}
@media (forced-colors: active) {
  .classic-lms-ui .lms-home-link {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText !important;
    forced-color-adjust: auto;
  }
  .classic-lms-ui .lms-home-link:focus,
  .classic-lms-ui .lms-home-link:focus-visible {
    outline: 3px solid Highlight;
  }
}
@media (prefers-reduced-motion: reduce) {
  .classic-lms-ui .lms-home-link {
    transition: none;
  }
}
