/* Scoped to e-learning: panel and client layouts keep their existing styles. */
.student-portal .content-wrapper,
.student-portal .main-footer,
.student-portal .main-header .navbar {
  margin-left: 0;
}
.student-portal .main-header .navbar.navbar-static-top {
  height: auto;
}
.student-portal .navbar-brand {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 15px;
}
.student-portal .navbar-brand img {
  width: 180px;
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}
.student-portal .navbar-toggle {
  min-width: 44px;
  min-height: 44px;
  margin: 3px 8px;
}
.student-portal.layout-top-nav .main-header .navbar-custom-menu {
  position: static;
}
.student-portal .navbar-custom-menu .dropdown-toggle .hidden-xs {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.student-portal .content-header h1,
.student-portal .box-title,
.student-portal .box-body,
.student-portal .user-header p {
  overflow-wrap: anywhere;
}
.student-portal .content-header h1,
.student-portal .box-title {
  line-height: 1.4;
}
.student-portal .content a:not(.btn),
.student-portal .main-footer a {
  color: var(--student-accent);
}
.student-portal .content a:not(.btn):hover,
.student-portal .main-footer a:hover {
  text-decoration: underline;
}
.student-portal .box[class*="box-"] {
  border-top: 3px solid var(--student-box);
}
.student-portal .box:hover {
  transform: none;
}
.student-portal .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.student-portal .student-table {
  table-layout: fixed;
}
.student-portal .table-responsive .student-table > tbody > tr > td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: normal;
}
.student-portal .student-table td .btn {
  margin: 3px 0;
}
.student-portal .student-table-wrap {
  padding: 12px 15px;
}
.student-portal .box-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.student-portal .content img,
.student-portal .content canvas,
.student-portal .light-modal canvas {
  max-width: 100%;
  height: auto;
}
.student-portal .light-modal-content {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
}
.student-portal .light-modal-body {
  overflow: auto;
}
.student-portal .student-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.student-portal .student-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.student-portal .checkbox input:checked + label::before {
  background-color: var(--student-checkbox);
  border-color: var(--student-checkbox);
}
.student-portal .checkbox input:checked + label::after {
  color: var(--student-checkbox-text);
}
.student-portal .radio input[type="radio"]:checked + label::before {
  border-color: var(--student-checkbox);
}
.student-portal .radio input[type="radio"] + label::after,
.student-portal .radio input[type="radio"]:checked + label::after {
  background-color: var(--student-checkbox);
}
.student-portal input[type="checkbox"],
.student-portal input[type="radio"] {
  accent-color: var(--student-checkbox);
}

/* Login and password setup use the same saved theme as the panel. */
body.student-auth {
  min-height: 100vh;
  height: auto;
  margin: 0;
  padding: 24px 16px;
  overflow-wrap: anywhere;
  isolation: isolate;
  background: radial-gradient(ellipse at 15% 15%, rgba(var(--student-accent-rgb), .08), transparent 60%), #f6f5f7;
}
.student-auth > p,
.student-auth > .container {
  position: relative;
  z-index: 1;
}
.student-bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.student-bubbles > span {
  position: absolute;
  width: var(--bubble-size);
  height: var(--bubble-size);
  border: 1px solid rgba(var(--student-accent-rgb), .1);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .65), rgba(var(--student-accent-rgb), .07) 60%, rgba(var(--student-accent-rgb), .13));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, .3);
  animation: student-bubble-drift var(--bubble-duration, 15s) ease-in-out infinite alternate;
}
.student-bubbles > span:nth-child(1) {
  --bubble-size: clamp(160px, 22vw, 320px);
  left: -5%;
  top: 12%;
  animation-delay: -9s;
}
.student-bubbles > span:nth-child(2) {
  --bubble-size: clamp(110px, 14vw, 210px);
  --bubble-duration: 18s;
  right: 5%;
  top: 8%;
  animation-delay: -23s;
}
.student-bubbles > span:nth-child(3) {
  --bubble-size: clamp(180px, 25vw, 360px);
  --bubble-duration: 20s;
  right: -7%;
  bottom: -8%;
  animation-delay: -16s;
}
.student-bubbles > span:nth-child(4) {
  --bubble-size: clamp(90px, 12vw, 180px);
  --bubble-duration: 13s;
  left: 14%;
  bottom: 6%;
  animation-delay: -20s;
}
.student-bubbles > span:nth-child(5) {
  --bubble-size: clamp(60px, 7vw, 100px);
  --bubble-duration: 16s;
  left: 45%;
  top: 5%;
  animation-delay: -12s;
}
.student-bubbles > span:nth-child(6) {
  --bubble-size: clamp(70px, 9vw, 140px);
  --bubble-duration: 19s;
  right: 22%;
  bottom: 15%;
  animation-delay: -30s;
}
@keyframes student-bubble-drift {
  from { transform: translate3d(-12px, 18px, 0); }
  to { transform: translate3d(28px, -42px, 0); }
}
.student-auth > p img {
  max-width: 100%;
  height: auto;
}
.student-auth button {
  background: var(--student-button);
  border-color: var(--student-button);
  color: var(--student-button-text);
  cursor: pointer;
  max-width: 100%;
  min-height: 44px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .09));
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.student-auth button:focus-visible,
.student-auth input:focus-visible {
  outline: 2px solid var(--student-accent);
  outline-offset: 3px;
}
.student-auth .overlay {
  background: var(--student-accent);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 45%, rgba(0, 0, 0, .18));
}
.student-auth button.ghost {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.student-auth input {
  min-width: 0;
  font-size: 16px;
}
.student-auth .sign-up-container {
  visibility: hidden;
}
.student-auth .right-panel-active .sign-up-container {
  visibility: visible;
}
.student-auth .right-panel-active .sign-in-container {
  visibility: hidden;
}
.student-auth .overlay-left {
  visibility: hidden;
}
.student-auth .right-panel-active .overlay-left {
  visibility: visible;
}
.student-auth .right-panel-active .overlay-right {
  visibility: hidden;
}
.student-auth.student-token .container {
  min-height: 0;
}
.student-token .form-container {
  position: relative;
}
.student-token form {
  padding: 32px 24px;
}

@media (hover: hover) and (pointer: fine) {
  .student-auth button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(var(--student-accent-rgb), .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-bubbles > span {
    animation: none;
  }
  .student-auth button,
  .student-auth .form-container,
  .student-auth .container.right-panel-active .sign-up-container,
  .student-auth .overlay-container,
  .student-auth .overlay,
  .student-auth .overlay-panel {
    transition: none;
    animation: none;
  }
  .student-auth button:hover,
  .student-auth button:active {
    transform: none;
  }
}

@media (min-width: 768px) {
  .student-portal #navbar-collapse {
    float: left !important;
  }
}

@media (max-width: 767px) {
  .student-portal .main-header .navbar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .student-portal .navbar-header {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin: 0;
  }
  .student-portal .navbar-brand {
    padding-left: 0;
    padding-right: 8px;
    min-width: 0;
  }
  .student-portal .navbar-toggle {
    flex-shrink: 0;
    margin-left: auto;
  }
  .student-portal.layout-top-nav .main-header .navbar-custom-menu {
    flex-shrink: 0;
  }
  .student-portal #navbar-collapse {
    order: 3;
    width: 100%;
    margin: 0;
    float: none !important;
  }
  .student-portal .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
    right: 0;
    max-width: calc(100vw - 24px);
  }
  .student-portal .content-wrapper > .container {
    padding: 0 12px;
  }
  .student-portal .content {
    padding: 16px 0;
  }
  .student-portal .content-header {
    padding: 20px 0 0;
  }
  .student-portal .content-header h1 {
    font-size: 22px;
  }
  .student-portal .box-body > .col-lg-12 {
    padding: 0;
  }
  .student-portal .box-footer {
    padding: 12px 0;
  }
  .student-portal .box-footer .btn {
    width: 100%;
    min-height: 44px;
  }
  .student-portal .student-table-wrap {
    border: 0;
    padding: 0 15px;
  }
  .student-portal .student-table,
  .student-portal .student-table tbody,
  .student-portal .student-table tr,
  .student-portal .student-table td {
    display: block;
    width: 100%;
  }
  .student-portal .student-table {
    border: 0;
  }
  .student-portal .student-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .student-portal .student-table tr {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
  }
  .student-portal .student-table td {
    border: 0;
    padding: 10px 12px;
  }
  .student-portal .student-table td + td {
    border-top: 1px solid #eee;
  }
  .student-portal .student-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .student-portal .student-table td .btn {
    display: block;
    padding: 10px 12px;
  }
  .student-portal .form-control {
    font-size: 16px;
  }
  .student-auth .container {
    min-height: 0;
  }
  .student-auth .form-container {
    position: relative;
    width: 100%;
    height: auto;
    transition: none;
  }
  .student-auth .sign-up-container,
  .student-auth .right-panel-active .sign-in-container {
    display: none;
  }
  .student-auth .right-panel-active .sign-up-container {
    display: block;
    transform: none;
    animation: none;
  }
  .student-auth form {
    padding: 32px 24px;
  }
  .student-auth h1 {
    font-size: 24px;
  }
  .student-auth .overlay-container,
  .student-auth .overlay,
  .student-auth .overlay-panel {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    transform: none !important;
    transition: none;
  }
  .student-auth .overlay-panel {
    padding: 24px;
  }
  .student-auth .overlay-left,
  .student-auth .right-panel-active .overlay-right {
    display: none;
  }
  .student-auth .right-panel-active .overlay-left {
    display: flex;
  }
}
