/**
 * Collegiate profile: Switch view (junior dashboard parity) — .jr-dash-switch-open + .jr-dash-view-modal
 * (subset of junior/public/static/styles/junior-dashboard.css; do not import full junior sheet on profile.)
 */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Peta:wght@100..900&display=swap');

:root {
  --col-menu-bg: rgb(22, 32, 44);
  --col-accent: rgb(126, 173, 237);
  --col-text-body: #212529;
}

/* Current dashboard (collegiate) — header under logo, matches junior /junior/dashboard */
.menu .header .jr-dash-view-pill {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.1rem 0.2rem 0;
  font-family: 'Lexend Peta', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(250, 250, 250, 0.72);
  text-align: center;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* In profile left menu, inside .menu-bottom-actions (above sign out) */
.menu .menu-bottom-actions .jr-dash-switch-open,
.menu .stuff .jr-dash-switch-open {
  flex-shrink: 0;
  align-self: center;
  width: auto;
  margin: 0 0.4rem 0.45rem 0.4rem;
  max-width: calc(100% - 0.8rem);
  box-sizing: border-box;
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.3rem 0.55rem;
  min-height: 0;
}

/* Narrow / mobile: keep compact */
@media screen and (max-width: 1000px) {
  .menu .menu-bottom-actions .jr-dash-switch-open,
  .menu .stuff .jr-dash-switch-open {
    min-width: 0;
    max-width: 10rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (max-width: 600px) {
  .menu .menu-bottom-actions .jr-dash-switch-open,
  .menu .stuff .jr-dash-switch-open {
    max-width: 9rem;
    padding: 0.28rem 0.5rem;
    font-size: 0.68rem;
  }
}

.jr-dash-switch-open {
  width: auto;
  max-width: 100%;
  text-align: center;
  color: var(--col-accent);
  border: 1px solid rgba(126, 173, 237, 0.45);
  background: rgba(126, 173, 237, 0.12);
  border-radius: 0.4rem;
  font-family: 'Lexend Peta', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  min-height: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.jr-dash-switch-open:hover {
  background: rgba(126, 173, 237, 0.22);
  border-color: rgba(126, 173, 237, 0.65);
  color: rgb(180, 210, 250);
}

.jr-dash-switch-open:focus {
  outline: 2px solid var(--col-accent);
  outline-offset: 2px;
}

.jr-dash-switch-open:disabled {
  opacity: 0.55;
  cursor: wait;
}

.menu .menu-bottom-actions .jr-dash-foot {
  margin: 0.35rem 0 0;
  text-align: center;
  width: 100%;
}

.menu .menu-bottom-actions .jr-dash-foot a {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(250, 250, 250, 0.55);
  text-decoration: none;
  font-family: 'Lexend Peta', sans-serif;
}

.menu .menu-bottom-actions .jr-dash-foot a:hover {
  color: var(--col-accent);
}

.jr-dash-view-modal {
  position: fixed;
  inset: 0;
  /* Above profile `div.loading` (z-index 100100) so Switch view stays on top */
  z-index: 101000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.jr-dash-view-modal[hidden] {
  display: none !important;
}

.jr-dash-view-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.jr-dash-view-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 2.5rem rgba(22, 32, 44, 0.22);
  padding: 1.25rem 1.2rem 1.1rem;
  max-height: min(90vh, 28rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.jr-dash-view-modal__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--col-menu-bg);
  letter-spacing: 0.02em;
}

.jr-dash-view-modal__hint {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5c6570;
  line-height: 1.4;
}

.jr-dash-view-modal__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jr-dash-view-modal__option {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Lexend Peta', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--col-text-body);
  background: rgb(248, 249, 251);
  border: 1px solid rgba(22, 32, 44, 0.1);
  border-radius: 0.5rem;
  padding: 0.85rem 0.9rem;
  min-height: 2.9rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.jr-dash-view-modal__option:hover:not(:disabled) {
  background: rgba(126, 173, 237, 0.14);
  border-color: rgba(126, 173, 237, 0.45);
}

.jr-dash-view-modal__option:focus {
  outline: 2px solid var(--col-accent);
  outline-offset: 2px;
}

.jr-dash-view-modal__option.is-current {
  background: rgba(126, 173, 237, 0.2);
  border-color: rgba(126, 173, 237, 0.55);
  color: rgb(31, 55, 85);
  cursor: default;
}

.jr-dash-view-modal__option:disabled {
  opacity: 1;
}

a.jr-dash-view-modal__option--link {
  text-decoration: none;
  box-sizing: border-box;
  display: block;
  color: inherit;
}

.jr-dash-view-modal__cancel {
  margin-top: 1rem;
  width: 100%;
  font-family: 'Lexend Peta', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #5c6570;
  background: transparent;
  border: 1px solid rgba(22, 32, 44, 0.15);
  border-radius: 0.45rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.jr-dash-view-modal__cancel:hover {
  background: rgba(22, 32, 44, 0.05);
}

.jr-dash-view-modal__cancel:focus {
  outline: 2px solid var(--col-accent);
  outline-offset: 2px;
}

.jr-dash-view-modal--busy .jr-dash-view-modal__option,
.jr-dash-view-modal--busy .jr-dash-view-modal__cancel {
  pointer-events: none;
  opacity: 0.65;
}
