/* Greenlight only. Do not load this stylesheet in the BBB meeting client. */
#nptak-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-end: 1.5rem;
}
#nptak-home-actions .btn {
  padding: 0.65rem 1.5rem;
  max-width: 100%;
  white-space: normal;
}

/* Replace overlapping flex/negative-margin tabs with normal active-panel flow.
   This does not depend on browser support for the :dir(rtl) selector. */
#admin-panel .tab-content,
#profile .tab-content {
  display: block;
  min-width: 0;
  max-width: 100%;
}
#admin-panel .tab-content > .tab-pane,
#profile .tab-content > .tab-pane {
  display: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
#admin-panel .tab-content > .tab-pane.active,
#profile .tab-content > .tab-pane.active {
  display: block !important;
  visibility: visible;
}
#admin-panel .row > *,
#profile .row > *,
#admin-panel .admin-table {
  min-width: 0;
  max-width: 100%;
}
#admin-panel .setting-select button,
#admin-panel .setting-select .dropdown-menu,
#profile .setting-select button,
#profile .setting-select .dropdown-menu {
  min-width: 0;
  max-width: 100%;
  text-align: start;
}
#admin-panel .nav-tabs {
  flex-wrap: wrap;
}
@media (max-width: 991px) {
  #profile .tab-pane > .row {
    row-gap: 1.5rem;
  }
  #profile .tab-pane > .row > .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
@media (max-width: 575px) {
  #nptak-home-actions .btn {
    flex: 1 1 8rem;
  }
}

/* Keep account submit actions in the form's height, clear of the avatar column. */
#admin-panel form .hstack.float-end,
#profile form .hstack.float-end {
  float: none !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-block-start: 0.75rem;
}
#nptak-classroom-settings input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}
@media (max-width: 767px) {
  #admin-panel .nptak-account-row > .col,
  #profile .nptak-account-row > .col {
    flex: 0 0 100%;
    margin-block-end: 1rem;
  }
}

/* Native checkbox semantics and keyboard controls, with an iOS-style track. */
#admin-panel input.nptak-switch,
#profile input.nptak-switch {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  position: relative;
  width: 3rem;
  height: 1.75rem;
  flex: 0 0 3rem;
  border: 1px solid #8b919b;
  border-radius: 2rem;
  background: #858b95;
  cursor: pointer;
  vertical-align: middle;
  transition: background 150ms ease;
}
input.nptak-switch::after {
  content: '';
  position: absolute;
  width: 1.375rem;
  height: 1.375rem;
  top: 0.125rem;
  left: 0.125rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0003;
  transition: transform 150ms ease;
}
#admin-panel input.nptak-switch:checked,
#profile input.nptak-switch:checked { background: #14833b; border-color: #14833b; }
input.nptak-switch:checked::after { transform: translateX(1.25rem); }
input.nptak-switch:focus-visible { outline: 3px solid #265dcc; outline-offset: 3px; }
input.nptak-switch:disabled { opacity: 0.55; cursor: not-allowed; }
#profile .nptak-preference {
  margin-block: 1.5rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid #dce1e8;
  border-radius: 0.75rem;
  font-size: 1rem;
}
#profile .nptak-preference h4 { font-size: 1.1rem; margin-bottom: 1rem; }
#profile .nptak-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
#profile .nptak-preference p { font-size: 0.875rem; color: #525b68; margin-top: 0.75rem; }
@media (prefers-reduced-motion: reduce) { input.nptak-switch, input.nptak-switch::after { transition: none !important; } }
#profile .nptak-switch-row,
#nptak-classroom-settings label { min-height: 44px; }

/* Only the invitation form; keep validation, loading and submit behavior native. */
.nptak-join-form > button[type="submit"] {
  float: none !important;
  display: block;
  margin-inline: auto;
  max-width: 100%;
  white-space: normal;
  min-height: 44px;
}
/* Hide the credit before JS removes it; preserve all configured legal links. */
#footer-container > a[href="https://docs.bigbluebutton.org/greenlight/v3/install"] {
  display: none;
}

/* Logical spacing follows the selected language, including LTR accounts. */
#navbar .navbar-brand { margin-inline: 0 1rem; padding-inline: 0 !important; }
#navbar .navbar-toggler { min-width: 44px; min-height: 44px; }
#navbar .navbar-toggler:focus-visible,
#navbar a:focus-visible { outline: 2px solid var(--brand-color, #265dcc); outline-offset: 3px; }
#navbar .dropdown-menu {
  text-align: start;
  background: white;
  border: 1px solid #dce1e8;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px #18284024;
  padding-block: 0.5rem;
  min-width: 14rem;
  max-width: calc(100vw - 2rem);
}
#navbar .dropdown-menu .dropdown-item,
#navbar-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
}
#navbar .dropdown-item > svg,
#navbar-menu .nav-link > svg {
  flex-shrink: 0;
  margin-inline: 0 !important;
  margin-block: 0 !important;
}
#navbar .dropdown-item:hover,
#navbar .dropdown-item:focus,
#navbar-menu .nav-link:hover,
#navbar-menu .nav-link:focus { background: #f1f4f8; }
#nav-user-dropdown .hstack { max-width: min(50vw, 24rem); }
#nav-user-dropdown .hstack > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 576px) {
  /* Account controls sit at inline-end, so open the menu back into the viewport. */
  #navbar .dropdown-menu { left: auto; right: auto; inset-inline-end: 0; }
}
@media (max-width: 575.98px) {
  /* In-flow collapse pushes page content down, without a transparent overlay. */
  #navbar { height: auto; min-height: 70px; padding-block: 0.5rem; }
  #navbar > .container { padding-inline: 0.75rem !important; }
  #navbar .navbar-brand { max-width: calc(100% - 4rem); }
  #navbar .small-logo { max-width: 100%; height: auto; max-height: 54px; }
  #navbar #navbar-menu {
    position: static !important;
    inset: auto;
    width: 100% !important;
    flex-basis: 100%;
    background: white !important;
    text-align: start;
    border-radius: 0;
  }
  #navbar-menu > .navbar-nav {
    border-top: 1px solid #dce1e8;
    margin-block-start: 0.5rem;
    padding: 0.75rem 0 !important;
  }
  #navbar-menu.show { max-height: 70vh; overflow-y: auto; }
  #navbar-menu .btn { min-height: 44px; white-space: normal; }
}
