
@use "sass:meta";
@import url("https://fonts.googleapis.com/css?family=Rubik:300,400,500,600,700");

/* Force Roboto for legacy-root - SEQTA UI update overrides fonts */
@font-face {
  font-family: "Roboto";
  src: url("https://fonts.gstatic.com/s/roboto/v50/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2")
    format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@include meta.load-css("injected/sidebar-animation.scss");
@include meta.load-css("injected/sidebar-styles.scss");
@include meta.load-css("injected/theme.scss");
@include meta.load-css("injected/transparency.scss");

:root {
  background: var(--better-main) !important;
  --navy: #1a1a1a !important;
  --auto-background: var(--better-pale, var(--background-secondary)) !important;
  font-family: Rubik, sans-serif !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
  pointer-events: none;
}

.hidden {
  display: none;
}

button.timetable-zoom.iconFamily,
button.bsplus-timetable-control.iconFamily,
.iconFamily {
  font-family: "IconFamily" !important;
}

body,
.legacy-root input,
.legacy-root textarea,
.legacy-root button,
.legacy-root select,
.legacy-root option,
.legacy-root .input,
html {
  font-family: Rubik, sans-serif !important;
}

.legacy-root {
  color: rgb(var(--theme-fg-parts));
  cursor: default;
  font-family: Rubik, sans-serif !important;
  text-rendering: optimizeLegibility;
}

body {
  font-family: Rubik, sans-serif !important;
}

select {
  border-radius: 16px !important;
  border: 1px solid var(--theme-offset-bg, var(--theme-secondary, var(--background-secondary))) !important;
  background: var(--theme-primary, var(--background-primary)) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem 1rem !important;
  min-height: 2.5rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25 !important;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease !important;
}

select:hover {
  background: var(--theme-secondary, var(--background-secondary)) !important;
  border-color: var(--theme-offset-bg, var(--theme-secondary, var(--background-secondary))) !important;
}

select:focus {
  outline: none !important;
  background: var(--theme-secondary, var(--background-secondary)) !important;
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--theme-offset-bg, var(--theme-secondary, var(--background-secondary))) 82%) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-primary) 12%, transparent) !important;
}

select:not([multiple]):not([size]),
select[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23999'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.168l3.71-3.938a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
  background-position: right 0.9rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1rem !important;
  padding-right: 2.6rem !important;
}

select::-ms-expand {
  display: none;
}

select option {
  background-color: #ffffff !important;
  color: #18181b !important;
}

.dark select option {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}

.dark select:not([multiple]):not([size]),
.dark select[size="1"] {
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23c9c9c9'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.168l3.71-3.938a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}
#container {
  background: var(--auto-background) !important;
}
.legacy-root,
.legacy-root * {
  font-family: Rubik, sans-serif !important;
  --theme-fg-parts: white;
}
.extension-editor {
  background: var(--background-primary);
  border-radius: 16px;
  border: none !important;
  width: 100%;
  height: 100%;
  visibility: visible !important;
}

#themeCreator {
  position: fixed;
  right: 0;
  height: 100%;
  z-index: 100;
}

.resizeBar {
  background-color: rgb(228 228 231);
  position: absolute;
  top: 0;
  height: 100%;
  width: 5px;
  cursor: col-resize;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s;

  &:hover {
    opacity: 1;
  }
}

.dark .resizeBar {
  background-color: rgb(28 28 30);
}

.timetablepage .days .scrollspacer {
  width: 0 !important;
}

.themeCloseButton {
  position: absolute !important;
  color: var(--text-primary) !important;
  font-size: x-large !important;
  top: 5px;
  right: 5px;
  border-radius: 80px !important;
  padding: 8px;
  cursor: pointer;
  z-index: 10000;
}

.modaliser-container {
  backdrop-filter: none !important;
  pointer-events: none !important;
}

/* Colour picker dialog teardown can leave an empty shell that blocks clicks */
.modaliser-container:not(:has(.modaliser > *)) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.connectedNotificationsWrapper > div > button > svg > g {
  fill: var(--theme-primary) !important;
}
#main {
  color: var(--text-primary);
  position: relative;

  > .timetablepage {
    > .quickbar {
      .gutter {
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
      }
    }
  }
}
.forums {
  color: var(--text-color);
}
.defaultWelcome > header {
  border-radius: 16px 16px 0px 0 !important;
}
.defaultWelcome {
  background: var(--better-main);
  border-radius: 17px 17px 0px 0 !important;
  color: var(--text-color) !important;
}
[class*="LegacyModuleBody__LegacyModule___"] {
  background: transparent;
}
#AddedSettings {
  top: 17.5px !important;
  z-index: 21 !important;
}
.addedButton {
  position: absolute !important;
  right: 105px;
  padding: 6px !important;
  overflow: unset !important;
  border-radius: 10px !important;
  cursor: pointer;
  background: var(--text-primary) !important;
  color: var(--theme-primary) !important;
  height: 35px;
  justify-content: center;
  width: 35px !important;
}

/* Engage toolbar: keep settings/theme buttons above React chrome */
.connectedNotificationsWrapper .addedButton,
.connectedNotificationsWrapper #AddedSettings,
.connectedNotificationsWrapper #LightDarkModeButton {
  z-index: 50 !important;
  pointer-events: auto !important;
}
[style="background-color: rgb(255, 255, 255);"] {
  color: black;
}
.pillbox {
  border-radius: 16px;
  overflow: clip;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--text-primary) !important;

  button {
    background: var(--background-primary) !important;
    height: auto;
    padding: 4px 16px !important;
    overflow: clip !important;

    &.depressed {
      height: auto !important;
      color: var(--text-primary) !important;
      background: var(--background-secondary) !important;
    }
  }
}

[class*="PillBox__PillBox___"] {
  border-radius: 16px;
  overflow: hidden;

  [class*="PillBox__active___"] {
    background: rgba(0, 0, 0, 0.2) !important;
    color: black !important;
  }
}

.dark [class*="PillBox__active___"] {
  color: white;
}

.cke_panel {
  border-radius: 16px !important;
  margin-top: 8px !important;
  background: var(--background-primary) !important;
  border: var(--background-secondary) !important;
  overflow: clip;

  iframe {
    background: transparent !important;
  }
}

.legacy-root button:active,
.legacy-root a:active:not(.cke_combo_button) {
  background-image: unset !important;
}

.ace_editor {
  border-radius: 16px;
  border-top: none !important;
}

.dark .dashboard section {
  input,
  select {
    background: rgba(255, 255, 255, 0.1);
  }
}

.timetable-zoom,
.timetable-hide,
.bsplus-timetable-control {
  font-size: 14px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px 8px;
}

#main > .dashboard {
  grid-template-columns: repeat(autofit, minmax(200px, 400px)) !important;
  background: unset;

  > section {
    border-radius: 16px !important;

    button {
      border-radius: 16px;
      transition: all 500ms;
    }

    input,
    select {
      border: transparent;
      background: rgba(0, 0, 0, 0.1);
      color: var(--text-primary);
    }

    .ais-btnSearch {
      transition:
        background 200ms,
        color 200ms,
        box-shadow 200ms;

      &:hover {
        background: rgba(0, 0, 0, 0.2) !important;
        color: var(--text-primary) !important;
        box-shadow: unset !important;
      }

      .material-icons {
        font-size: 0px !important;
        font-family: Rubik, sans-serif !important;
        &::before {
          font-size: 18px !important;
          content: "Search" !important;
        }
      }
    }
  }

  > .dashlet {
    background: var(--background-primary);
    border-radius: 16px;

    &[data-ident="timetable"] {
      grid-row: span 2 / auto !important;
    }

    > .header {
      min-height: unset !important;
      border-bottom: 1px solid transparent !important;
      background: rgba(0, 0, 0, 0.2);

      .title {
        padding: 16px !important;
      }
    }
  }
}
.dashlet-summary-homework > .summary > .subject > .item {
  color: var(--text-primary) !important;
}
.dashlet-notes > ul {
  background: var(--background-primary);
}
.dashlet-notes > ul > li {
  color: var(--text-primary);
}
ul.magicDelete > li:hover {
  background: rgba(0, 0, 0, 0.1);
}
.dashlet-notes > .editor {
  background: unset;
}
ul.magicDelete > li.deleting {
  background: unset;
}
.addedButton svg {
  margin: 6px;
  fill: var(--theme-primary);
  color: var(--theme-primary);
}
#menu,
.sub,
.nav {
  background: transparent !important;
  color: var(--text-color) !important;
}
#media-container {
  width: 100%;
  height: 100%;
}

#media-container video,
#media-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#menu li,
#menu section {
  margin: 8px auto !important;
  width: 85% !important;
  border-bottom: none;
  box-shadow: none;
  border-radius: 12px;
  padding: 12px;
  color: var(--text-color) !important;
  display: flex;
  white-space: nowrap;
  place-items: center;
}
#menu .sub {
  top: 71px;
  margin-top: -2px;
}

/* Drill-in stack: only the current list + folder header stay clickable.
   Class is toggled by updateSidebarAccessibility (never touches aria-hidden). */
#menu .bsplus-sidebar-offscreen,
#menu .bsplus-sidebar-offscreen * {
  pointer-events: none !important;
  user-select: none !important;
}

#menu > ul > .bsplus-sidebar-offscreen:not(.hasChildren.active) {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  opacity: 0 !important;
}

#menu .sub .bsplus-sidebar-offscreen:not(.hasChildren.active) {
  visibility: hidden !important;
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
}

/* Only the frontmost open .sub panel receives pointer events */
#menu .sub {
  pointer-events: none;
}

#menu li.hasChildren.active > .sub {
  pointer-events: auto;
}

#menu li.hasChildren.active > .sub:has(.hasChildren.active) {
  pointer-events: none !important;
}

#menu li.hasChildren.active .hasChildren.active > .sub {
  pointer-events: auto !important;
}

#menu:has(> ul > li.hasChildren.active) > ul > li:not(.hasChildren.active) {
  pointer-events: none !important;
}

/* Edit Sidebar: every row + toggle must stay clickable (drill stack disables siblings). */
#menu.bsplus-sidebar-edit-mode li.item,
#menu.bsplus-sidebar-edit-mode section.item,
#menu.bsplus-sidebar-edit-mode .bsplus-sidebar-offscreen,
#menu.bsplus-sidebar-edit-mode .bsplus-sidebar-offscreen * {
  pointer-events: auto !important;
  user-select: auto !important;
}

#menu.bsplus-sidebar-edit-mode:has(> ul > li.hasChildren.active)
  > ul
  > li:not(.hasChildren.active) {
  pointer-events: auto !important;
}

#menu.bsplus-sidebar-edit-mode > ul > .bsplus-sidebar-offscreen:not(.hasChildren.active),
#menu.bsplus-sidebar-edit-mode .sub .bsplus-sidebar-offscreen:not(.hasChildren.active) {
  position: relative !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  margin: inherit !important;
  padding: inherit !important;
  overflow: visible !important;
  clip: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Edit rows should match normal custom-sidebar item size (not shrunk). */
#menu.bsplus-sidebar-edit-mode > #bsplus-sidebar-root > li.item.draggable,
#menu.bsplus-sidebar-edit-mode .item.draggable {
  display: flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 6px 8px !important;
}

#menu.bsplus-sidebar-edit-mode .item.draggable > label:not(.toggle) {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 12px !important;
  padding-left: 4px !important;
  box-sizing: border-box !important;
}

#menu.bsplus-sidebar-edit-mode .item.draggable .label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
  font-size: inherit !important;
  line-height: 1.2 !important;
}

#menu.bsplus-sidebar-edit-mode .item.draggable > label:not(.toggle) > svg {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}

#menu.bsplus-sidebar-edit-mode .item.draggable > .toggle,
#menu.bsplus-sidebar-edit-mode .onoffswitch {
  pointer-events: auto !important;
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 12px 0 0 !important;
  position: relative;
  z-index: 2;
}

#menu section > label {
  align-items: center;
  box-sizing: border-box;
  cursor: inherit;
  display: flex;
  flex: 1;
  font-weight: 700;
  padding: 0;
  white-space: nowrap;
}

#menu li > label,
#menu section > label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-transform: none;
  font-size: 16px;
  hyphens: auto;
  line-height: 1.2;
}
#menu,
#menu li,
#menu section,
#menu li > label,
#menu section > label {
  font-family: Rubik, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

#menu {
  width: var(--bsplus-sidebar-width, 270px);
  z-index: 19;
  background: var(--better-main) !important;
  color: var(--text-color);
  border-right: none;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide native menu as soon as possible (during loading), before Svelte mounts.
   Keep `#bsplus-sidebar-root` visible — themes target `#menu > ul > li.item` on it. */
html.bsplus-custom-sidebar-pending #menu > ul:not(#bsplus-sidebar-root),
html.bsplus-custom-sidebar-pending #menu > #userInfo,
html.bsplus-custom-sidebar-pending #menu > .icon-cover,
#menu.bsplus-custom-sidebar > ul:not(#bsplus-sidebar-root),
#menu.bsplus-custom-sidebar > #userInfo,
#menu.bsplus-custom-sidebar > .icon-cover {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* Custom title bar: keep native `#title` children for sync, hide them visually.
   Loading overlay stays until waitForCustomTitleBarReady() so this is ready underneath. */
html.bsplus-custom-title-pending #title > :not(#bsplus-title-root),
#title.bsplus-custom-title > :not(#bsplus-title-root) {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
}

#bsplus-title-root {
  display: contents;
}

/* `#title span { display: none }` hides the page title; keep search chip icons visible. */
#title.bsplus-custom-title .search-trigger > span {
  display: inline-flex !important;
  align-items: center;
}

/* Custom Svelte sidebar: keep `#menu > ul > li.item` / `.sub` shape for theme CSS. */
#menu.bsplus-custom-sidebar {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;

  > #bsplus-sidebar-root {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    position: relative;
    padding-top: 0 !important;

    /*
     * Extend the logo spacer for the same gap as between items.
     * SEQTA's #menu>ul::before border-bottom is the hairline under the logo.
     */
    &::before {
      box-shadow: none !important;
      border-bottom: none !important;
      height: calc(71px + 8px) !important;
    }
  }

  li.hasChildren {
    position: static !important;
  }

  /* Native list may keep `.active` after click-through; force our rows clickable,
     then lock siblings only while a custom drill `.sub` is open. */
  > #bsplus-sidebar-root > li.item {
    pointer-events: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 6px 8px !important;
    box-sizing: border-box !important;
  }

  &:has(> #bsplus-sidebar-root > li.hasChildren.active > .sub)
    > #bsplus-sidebar-root
    > li:not(.hasChildren.active),
  &:has(> #bsplus-sidebar-root > li.hasChildren.active > .sub)
    > #bsplus-sidebar-root
    > li:not(.hasChildren.active)
    * {
    pointer-events: none !important;
  }

  /* Same locks keyed off `.drilling` so nested leaf clicks do not flicker when
     SEQTA briefly strips `.active` from folder rows. */
  > #bsplus-sidebar-root.drilling > li:not(.hasChildren),
  > #bsplus-sidebar-root.drilling > li:not(.hasChildren) * {
    pointer-events: none !important;
  }

  > #bsplus-sidebar-root .sub {
    pointer-events: none;
  }

  > #bsplus-sidebar-root li.hasChildren.active > .sub {
    pointer-events: auto;
    background: transparent !important;
    background-image: none !important;
  }

  > #bsplus-sidebar-root li.hasChildren.active > .sub:has(.hasChildren.active) {
    pointer-events: none !important;
  }

  > #bsplus-sidebar-root li.hasChildren.active .hasChildren.active > .sub {
    pointer-events: auto !important;
    background: transparent !important;
    background-image: none !important;
  }

  > #bsplus-sidebar-root.drilling li.hasChildren > .sub:not(:has(.sub)) {
    pointer-events: auto !important;
    background: transparent !important;
    background-image: none !important;
  }

  > #bsplus-sidebar-root.drilling li.hasChildren > .sub:has(.sub) {
    pointer-events: none !important;
  }

  > #bsplus-sidebar-root.drilling li.hasChildren > .sub .sub {
    pointer-events: auto !important;
    background: transparent !important;
    background-image: none !important;
  }

  > #bsplus-sidebar-root > li.hasChildren.active > label,
  > #bsplus-sidebar-root.drilling > li.hasChildren > label {
    pointer-events: none !important;
  }

  /* Theme decorations on root leaves (Beach palm/sand) must not show through
     the transparent drill `.sub` panel. */
  > #bsplus-sidebar-root:has(> li.hasChildren.active > .sub)
    > li:not(.hasChildren.active)::before,
  > #bsplus-sidebar-root:has(> li.hasChildren.active > .sub)
    > li:not(.hasChildren.active)::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
  }

  > #bsplus-sidebar-root.drilling > li:not(.hasChildren)::before,
  > #bsplus-sidebar-root.drilling > li:not(.hasChildren)::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
  }

  #bsplus-sidebar-root .sub .back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px 8px;
    cursor: pointer;
    font-weight: 700;
    color: inherit;
  }

  #bsplus-sidebar-root .sub .back:hover {
    opacity: 0.9;
  }

  #bsplus-sidebar-root .sub .backLabel {
    font-size: 16px;
    font-weight: 700;
  }

  #bsplus-sidebar-root .sub > ul {
    list-style: none;
    margin: 0;
    padding: 0 0 16px;
  }
}

#menu li > label > svg,
#menu section > label > svg {
  margin: 0 10px 0 4px;
  width: 28px !important;
  height: 28px !important;
}

/* Icon Only Sidebar - compact mode. When submenu is open, all styles are disabled so it behaves as normal sidebar. */
body.icon-only-sidebar:not(:has(#menu li.hasChildren.active)) {
  #menu {
    width: 70px !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible !important;
  }

  #menu > ul {
    min-width: 0 !important;
    overflow-x: visible !important;
  }

  #content {
    left: 70px !important;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #menu .sub {
    left: 70px !important;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #menu li > label span,
  #menu section > label span {
    display: none !important;
  }

  #menu ul > li > svg {
    display: none !important;
  }

  #menu ul li,
  #menu ul section {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  #menu li > label,
  #menu section > label {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  #menu li > label > svg,
  #menu section > label > svg {
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  /* Engage: hide text nodes in labels via font-size trick, restore SVG size */
  #menu .logo-link li > label,
  #menu .logo-link section > label {
    font-size: 0 !important;
    justify-content: center !important;

    svg {
      width: 24px !important;
      height: 24px !important;
      font-size: initial !important;
      flex-shrink: 0 !important;
      margin: 0 auto !important;
    }
  }

  /* Engage: hide chevron arrows on hasChildren items */
  #menu .logo-link li > svg {
    display: none !important;
  }

  /* Engage: hide the name/details in #userActions */
  #menu #userActions .details {
    display: none !important;
  }

  /* Compact BetterSEQTA mark instead of the full wordmark. */
  &.student #menu > ul::before {
    background-size: 36px 36px !important;
    background-position: center center !important;
  }

}
[class*="notifications__items___"] {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
  border-bottom: none;
  height: 540px;
  display: flex;
  flex-direction: column;

  &::-webkit-scrollbar {
    display: none !important;
  }
}
#menu ul li {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  width: 85% !important;
}
/* Keep width scoped to #menu — fallback drag clones append to body, and
   width:100% there stretches across the viewport. */
#menu .item.draggable {
  width: 100% !important;
  cursor: grab;

  > .sub {
    display: none !important;
  }

  &:before {
    top: 17.6px;
    left: -8px;
  }
}

/* Sortable forceFallback clone (on body) — match source row size. */
body > .bsplus-sortable-drag,
body > .sortable-fallback.bsplus-sortable-drag,
.bsplus-sortable-drag.sortable-fallback {
  width: var(--bsplus-drag-width, 240px) !important;
  max-width: var(--bsplus-drag-width, 240px) !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  pointer-events: none !important;
  list-style: none !important;
}

#menu {
  li.active > .sub > ul > .item:not(.hasChildren) {
    position: relative;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      width: 3px;
      background: var(--item-colour, transparent);
      transition:
        width 100ms,
        transform 0.3s ease;
      border-radius: 8px 0 0 8px;
    }

    &:hover::before,
    &.active::before {
      width: 6px;
      background: var(--item-colour, transparent);
    }
  }

  li.active > .sub > ul > .active {
    background: rgba(0, 0, 0, 0.3) !important;
  }
}

#userActions {
  display: none;
}
html {
  font-family: Rubik, sans-serif !important;
  background: var(--better-main) !important;
}
.menuShown .content .anyoneSelect .listWrapper .list:has(.item) {
  width: 100% !important;
}
.listWrapper:not(:has(.list *)) + .functions,
.listWrapper:not(:has(.list *)) {
  opacity: 0 !important;
}
.listWrapper + .functions,
.listWrapper {
  transition: opacity 500ms;
}
[data-type="student"] .header {
  color: black !important;
}
ol:has([class*="MessageList__avatar___"] svg) {
  transition-duration: 150ms !important;
  transition-delay: 0ms !important;
}
.wrapper .cke_contents iframe {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  padding: 8px;
}
.wrapper .cke_contents::-webkit-scrollbar-thumb {
  background-color: #969696 !important;
}
.content .footer {
  margin-top: 5px;
  border-radius: 16px;
}
.content [autocomplete="off"] {
  background: var(--background-primary) !important;
}
.coneqtMessage .body .wrapper .iframeWrapper {
  background: var(--background-primary) !important;
  border-radius: 16px;
}
[class*="MessageList__MessageList___"] .footer {
  background: var(--background-secondary) !important;
}
.listWrapper {
  padding: 8px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: var(--background-primary);
  margin-top: 26%;
}
.functions {
  background: var(--background-primary);
  margin: 0 !important;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.functions > .uiButton {
  width: 100%;
  border: none !important;
  border-radius: 16px !important;
}
.uiButton.selected {
  background: var(--background-secondary) !important;
}
.singleSelect {
  border-radius: 16px !important;

  &[style*="absolute"] {
    box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
    padding: 0 2px !important;
    outline: 2px solid rgba(0, 0, 0, 0.01) !important;
  }

  > li {
    border-radius: 12px !important;
    transition: background 150ms;
    margin-bottom: 2px !important;
    margin-top: 2px !important;
    border-bottom: unset !important;

    &:hover {
      background: rgba(0, 0, 0, 0.1) !important;
    }
  }
}
.quickbar .actions a > svg {
  scale: 0.95;
  padding-top: 1px !important;
}

.quickbar .actions [title="Choose a colour"] > svg {
  scale: 0.9;
}

.quickbar .actions .timetable-edit-quickbar-btn > svg {
  scale: 0.9;
  padding-top: 1px;
}
.quickbar[data-yiq="light"] .actions {
  color: white !important;
}
.singleSelect > li {
  border-radius: 4px;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}
#container #content {
  bottom: unset !important;
  height: 100%;
}
#container #content::before {
  content: "";
  height: 71px;
  width: 100%;
}
.menuShown #container #content #title {
  -webkit-box-shadow: 6px 5px 16px 6px rgba(0, 0, 0, 0.2) !important;
  box-shadow: 6px 0px 4px 2px rgba(0, 0, 0, 0.2) !important;
}
#container #content #title {
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.2) !important;
}
/* Custom sidebar: keep title depth to the right, not a hairline under the logo into the menu. */
body:has(#menu.bsplus-custom-sidebar) #container #content #title,
body:has(#menu.bsplus-custom-sidebar).menuShown #container #content #title {
  -webkit-box-shadow: 6px 0 8px -4px rgba(0, 0, 0, 0.25) !important;
  box-shadow: 6px 0 8px -4px rgba(0, 0, 0, 0.25) !important;
}
#main .timetablepage .quickbar {
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}
.quickbar .actions {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.quickbar .attendance {
  border-top-left-radius: 100%;
  border-bottom-right-radius: 16px !important;
}
.quickbar::before {
  background-color: inherit;
  clip-path: polygon(50% 40%, 0 100%, 100% 100%);
  border-bottom-color: transparent !important;
}
#main > .timetablepage > .quickbar {
  &.below::before {
    top: -23px;
    background-color: inherit;
    clip-path: polygon(50% 40%, 0 100%, 100% 100%);
    border-bottom-color: transparent !important;
  }

  &.above[data-yiq="light"]::after {
    background-color: rgba(0, 0, 0, 0.2);
  }

  &.above[data-yiq="dark"]::after {
    background-color: rgba(255, 255, 255, 0.2);
  }

  &.above::after {
    content: "";
    position: absolute;
    bottom: -24px;
    z-index: 0;
    left: 50%;
    margin: 0 0 0 -12px;
    clip-path: polygon(50% 40%, 0 0, 100% 0);
    border: 12px solid rgba(255, 255, 255, 0);
    border-top-color: transparent;
  }

  &.above::before {
    border-bottom-color: transparent !important;
    border-top-color: transparent !important;
    bottom: -24px !important;
    z-index: -1 !important;
    background-color: inherit;
    clip-path: polygon(50% 40%, 0 0, 100% 0);
  }
}
#main .timetablepage .actions a,
#main .timetablepage .actions button {
  background-color: transparent;
  border: none;
}
.document {
  background: var(--background-primary) !important;
  border-radius: 8px;
  margin-bottom: 4px !important;
}
#main > .documents > .list > thead > tr > th {
  border-bottom: transparent 2px solid;
}
.documents table {
  border-collapse: separate;
  border-spacing: 0 4px;
}
.documents > .list > tbody td {
  border-bottom: unset !important;
}
td.size {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: var(--text-primary) !important;
}
td.colourBar {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.documents {
  padding-left: 10px;
  padding-right: 10px;
}
#toolbar span:has(.search) {
  position: relative;
}
#toolbar .search {
  padding-left: 30px;
}
#toolbar span:has(.search)::before {
  content: "\eca5";
  position: absolute;
  left: 8px;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  color: currentColor;
  font-size: 16px;
  font-family: "IconFamily";
  pointer-events: none;
}
#container #content .search {
  width: 100%;
  border-radius: 8px;
  background: var(--background-primary);
}
#container #content .uiButton {
  border-radius: 16px;
}

#toolbar button.toggled,
#toolbar button.depressed {
  background: #f3f3f3;
  color: black;
}
ul.buttonChecklist {
  border-radius: 16px;
  margin-top: 4px;
  padding-left: 0 !important;
  box-shadow: 0 0 10px -5px black;

  > li {
    border-radius: 8px;
    border-bottom: unset !important;

    > button {
      border-radius: 8px;
      border: unset !important;
    }
  }

  button {
    border-radius: 8px !important;
  }

  &:has(.item.checked) button:nth-child(1) {
    background: var(--background-secondary) !important;
  }

  &:has(.item.unchecked) button:nth-child(2) {
    background: var(--background-secondary) !important;
  }
}
.dark ul.buttonChecklist {
  li.item.checked {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="white" viewBox="0 0 24 24"><path d="M9 16.172l10.594-10.594 1.406 1.406-12 12-5.578-5.578 1.406-1.406z"/></svg>');
  }
}
#toolbar > span:has(input) {
  flex: 1 1 0%;
}
#main > .reports > .item > .report {
  border-radius: 16px !important;
  border: 2px solid var(--better-main) !important;
  transform: scale(0.97);
  transition: transform 0.2s ease-out !important;
  background: var(--background-primary);
}
#main > .reports > .item > .report:hover {
  transform: scale(1);
}
#main > .reports > .item {
  box-shadow: none !important;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}
ol > [data-label] {
  margin-left: 4px;
  margin-bottom: 4px;
}
[class*="Message__Message___"] > .uiFrameWrapper .iframeWrapper {
  background: transparent;
}
[class*="Viewer__newMessage___"] {
  border-radius: 8px !important;
  font-size: 12.8px !important;
  background: var(--background-primary) !important;
}
[class*="MessageList__sender___"] :last-child {
  white-space: nowrap;
}
[data-type="student"] [style="z-index: 30;"] .header:has(h1) {
  color: black !important;
}
.uiFile.rows > .name,
.uiResource.rows > .name {
  padding: 2px;
}
div > ol:has(.uiFileHandlerWrapper) {
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}
.assessments > div > div > div > div > div > div > div:has(ol) {
  border-radius: 16px !important;
}
[aria-labelledby="lixycoxs-tab-1"] [minlength="0"] {
  min-height: 128px !important;
}
body.student #menu > ul::before {
  content: "";
  display: block;
  width: 100%;
  background-image: var(--betterseqta-logo) !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 48px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: transparent;
  height: 71px;
  box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.2);
}

html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li {
  border-bottom: none !important;
}

html.transparencyEffects
  [class*="BasicPanel__BasicPanel___q92_U"]
  > ol
  > li
  + li {
  border-top: 1px solid var(--theme-offset-bg);
}

.assessmentsWrapper .message {
  display: none;
}
#menu li:hover:not(.active) {
  background: rgba(0, 0, 0, 0.15) !important;
}
#menu li.active:hover {
  background: rgba(0, 0, 0, 0.35) !important;
}

#menu li:focus-visible,
#menu section:focus-visible {
  outline: 1px solid rgb(from currentColor r g b / 0.55);
  outline-offset: -1px;
  background: rgba(0, 0, 0, 0.2) !important;
}

#main > .timetablepage > .container {
  background: var(--background-primary);
}

#content {
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease;
  left: var(--bsplus-sidebar-width, 270px);
  background: unset;
}

@media (max-width: 420px) {
  .userInfo {
    display: none !important;
  }
}

@media (max-width: 490px) {
  .userInfohouse {
    display: none;
  }
}

@media (max-width: 900px) {
  .student #menu > ul::before {
    background-color: var(--background-primary);
  }

  #menuToggle {
    display: block !important;
  }
  #title::before {
    display: none;
  }
  #menu {
    -webkit-transform: translatex(calc(-1 * var(--bsplus-sidebar-width, 270px)));
    transform: translatex(calc(-1 * var(--bsplus-sidebar-width, 270px)));
  }
  .menuShown #menu {
    -webkit-transform: translatex(0);
    transform: translatex(0);
  }
  #content {
    left: 0;
  }
  .menuShown #content {
    -webkit-transform: translatex(var(--bsplus-sidebar-width, 270px));
    transform: translatex(var(--bsplus-sidebar-width, 270px));
  }

  body.icon-only-sidebar:not(:has(#menu li.hasChildren.active)) {
    #menu {
      -webkit-transform: translatex(-70px);
      transform: translatex(-70px);
    }
    .menuShown #content {
      -webkit-transform: translatex(70px);
      transform: translatex(70px);
    }
  }
}

@media (max-width: 1145px) {
  .home-container {
    padding: 32px !important;
  }
}

@media (max-width: 1100px) {
  .home-container {
    padding: 32px 16px !important;
  }
}

@media (max-width: 1200px) {
  [class*="LabelList__LabelList___"] > li {
    border-radius: 8px !important;
  }
}

@media (min-width: 900px) {
  #title > span {
    transform: translateY(2px);
  }
}

@media (min-width: 1000px) {
  ol > [data-label] {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }
}
.welcome
  > .portalPageView
  > .powerPortalPage
  > [class*="Body__body___"]
  > [class*="Container__container___"]
  > [class*="Document__document___"]
  > [class*="Canvas__canvas___"] {
  background-color: unset !important;
  background-image: unset !important;
  background-size: unset;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100vh;
  color: var(--text-primary) !important;
}
[class*="Module__wrapper___"] {
  overflow: clip;
  background: var(--background-primary) !important;
  border-radius: 16px !important;
  color: var(--text-primary) !important;
  box-shadow: none;
}

// Engage lesson/course Lexical editor ships inline light-mode colours on canvas + text nodes.
[class*="Canvas__canvas___"] {
  background-color: transparent !important;
  background-image: none !important;
  color: var(--text-primary) !important;
}

[class*="LexicalEditor__editor-container___"],
[class*="LexicalEditor__editor-inner___"],
[class*="LexicalEditor__editor-input___"],
[class*="LexicalEditor__editor-paragraph___"],
[class*="LexicalEditor__editor-text-bold___"],
[class*="LexicalEditor__editor-text-italic___"],
[class*="LexicalEditor__editor-text-underline___"],
[class*="TextModuleBody__lexicalEditor___"] {
  color: var(--text-primary) !important;
}

[class*="Module__module___"],
[class*="Module__content___"] {
  background: transparent !important;
  color: inherit !important;
}

.dark [class*="LexicalEditor__editor-input___"] img[data-lexical-decorator] {
  filter: invert(1) hue-rotate(180deg);
}

.course .composer {
  background: transparent !important;
  overflow: hidden;
}
.composer
  > [class*="Body__body___"]
  > [class*="Container__container___"]
  > [class*="Document__document___"]
  > [class*="Canvas__canvas___"] {
  background-color: transparent !important;
  background-image: unset !important;
  color: white !important;
}
.notices-container {
  width: 100%;
  max-height: 60em;
  background: var(--better-main);
  display: flex;
  flex-direction: column;
  -webkit-box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;

  input {
    border: none;
    color: var(--text-color) !important;

    &:hover {
      border: none;
    }

    &::-webkit-inner-spin-button,
    &::-webkit-calendar-picker-indicator {
      display: none;
      -webkit-appearance: none;
    }
  }
}

#main > .notices > .notice > .label,
#main > .notices > .notice > .staff,
#main > .notices > .notice > h2 {
  color: var(--text-primary);
  color: var(--colour);
}

#main > .course > .content > .homework > .content,
#main > .course > .content > .resources > .content {
  color: var(--text-primary);
  opacity: 0.8;
}

#content:has(#main > .course) #toolbar {
  top: 72px;
  left: 0px;
  z-index: 10;

  @media (min-width: 1401px) {
    position: absolute;
    left: 402px;
  }
}

#main > .course .content {
  @media (min-width: 1400px) {
    padding-top: 2.5rem;
  }
}

#main > .notices > .notice > .contents {
  background: var(--background-primary);
}

#main > .notices > .notice {
  background: var(--background-primary);
  color: var(--text-primary);
  --colour: unset;

  > h2 {
    margin-bottom: 0;
  }

  .staff {
    margin-bottom: 16px;
    opacity: 1;
  }
}

.dark #main > .notices > .notice > h2,
.dark #main > .notices > .notice > div {
  text-shadow: 0 0 15px #000000;
}
#title span {
  display: none;
}
#editmenu {
  display: none;
}
#title {
  background: var(--background-primary) !important;
  color: var(--text-primary) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding-right: 56px !important;
  /* Must match logo/`#content` spacer (~71px). A 54px height only "looked"
     taller in DEV (content-box); production content-script Tailwind forces
     border-box and collapses the bar to 54px. */
  height: 71px;
  min-height: 71px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 0px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500 !important;
  z-index: 20;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}

#title::before {
  background-image: var(--betterseqta-logo);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: auto 48px;
  height: 69.5px;
  content: "";
  width: 184px;
  flex-shrink: 0;
}
.rightElements {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 157.5px;
  gap: 12px;
}
.home-root {
  width: 100%;
  display: flex;
  color: var(--text-primary);
  font-size: unset;
}
.home-subtitle {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
}
.timetable-arrows {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  padding: 5px;
}
.timetable-arrows svg {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  position: static;
  cursor: pointer;
}
.timetable-arrows svg:hover {
  color: #bebebe;
}
.notice a {
  background: rgba(var(--theme-bg-parts), 0.5) !important;
}
.home-container {
  max-width: 1050px;
  margin: auto;
  width: 1050px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 64px;
  align-items: center;

  @media (max-width: 650px) {
    width: 100%;
    margin: 0;
    padding: 32px 0 !important;
  }
}
#home-container > div {
  will-change: opacity, transform;
}
.home-container h1 {
  text-align: center;
  font-size: 3em !important;
  font-weight: 300;
  margin: 0 auto;
  background: var(--background-primary);
  height: 3em;
  align-items: center;
  justify-content: center;
  display: flex;
  width: 100%;
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
}
.timetable-container {
  width: 100%;
  overflow: visible !important;
  border-radius: 0 16px;
  z-index: 1;
  height: auto;
  background: var(--better-main);
  display: flex;
  flex-direction: column;
  -webkit-box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.day-container {
  background: var(--background-primary);
  transition: 200ms;
  width: 100%;
  height: 15em;
  font-family: Rubik, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  border-radius: 16px;
  overflow-x: auto;

  .day:first-child {
    border-bottom-left-radius: 16px;
  }
  .day:last-child {
    border-bottom-right-radius: 16px;
  }

  @media (max-width: 650px) {
    flex-direction: column;
    height: fit-content;

    .day {
      height: fit-content;
      padding: 16px 0;
      padding-bottom: 24px !important;
      border-radius: 0 !important;

      > h2 {
        height: auto;
        min-height: 0;
      }

      > h4 {
        position: unset;
      }

      > h5 {
        bottom: 10px;
      }

      > .day-button {
        bottom: 30px;
      }
    }
  }
}
.notice-container {
  background: var(--better-main);
  width: 100%;
  max-height: 55em;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
.timetable-container h2 {
  margin: 20px;
  font-size: 20px;
  font-weight: 400;
}
.notice {
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: var(--background-primary);
  box-shadow: inset 0px 5px 20px 1px rgba(0, 0, 0, 0.3);
  padding-bottom: 25px;
  transition: none;
  color: var(--text-primary);
}
.dummynotice {
  width: 100%;
  padding: 20px;
  margin: 7px auto;
  box-shadow: inset 0px 5px 20px 1px rgba(0, 0, 0, 0.3);
  background: var(--background-primary);
}
[class*="Empty__Empty___"] {
  color: var(--text-primary);
}
.shortcut-container {
  background: var(--better-main);
  width: 100%;
  display: flex;
  flex-direction: column;
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
}
/* `.border` is also a public hook used by existing themes. */
.home-container .border {
  border-radius: 16px;
  overflow: clip;
}
.shortcut-container h2 {
  font-size: 20px;
  font-weight: 400;
}
.shortcuts {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
.shortcut-container:not(:has(#shortcuts *)) {
  display: none !important;
}
.shortcuts a {
  text-decoration: none !important;
  color: var(--text-primary);
  display: flex;
  border: unset !important;
  background-color: unset !important;
  margin: 5px 20px;
  padding: 0;
  border-radius: 50px;
}
.shortcut {
  height: 4em;
  width: 15em;
  max-width: 15em;
  background: var(--background-primary);
  color: var(--text-primary);
  display: flex;
  border-radius: 80px;
  position: relative;
  transition: 200ms;
}
.shortcut:hover {
  background: var(--auto-background);
}
.shortcut p {
  margin: auto 0px auto 5px;
  font-size: 20px;
  width: 150px;
  word-wrap: break-word;
  line-height: 20px;
}
.customshortcut > svg {
  border-radius: 0;
}
.colourbar {
  width: 100%;
  height: 3px;
  position: absolute;
  top: 0;
  left: 0;
}
.dashboard .message {
  background: var(--background-primary) !important;
  color: var(--text-primary);
  border-left: none !important;
}
.dashboard .message .ais-wrapper {
  background: var(--background-primary);
  color: var(--text-primary);
  box-shadow: unset;
  -webkit-box-shadow: unset;
  border-radius: 16px;
}
.ais-description {
  color: var(--text-primary) !important;
}
.ais-signature {
  color: var(--text-primary) !important;
}
.ais-btnSearch i {
  padding-left: 8px;
}
.ais-input-container select,
.ais-input-container input {
  border-radius: 16px;
}
.notice h3 {
  margin: 0;
  font-size: 25px;
}
.notice h5 {
  margin: 12px 0px;
  font-size: 13px;
  font-weight: 200;
}
.notice h6 {
  margin: 0px 0px 40px;
  font-weight: 100;
  color: #c9c9c9;
}
.clickable {
  cursor: pointer;
}

.day h2 {
  margin: 0;
  padding: 8px;
  padding-top: 14px;
  font-size: 14px !important;
  font-weight: 700;
  min-height: 46px;
  height: auto;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.day h3 {
  padding: 0px 5px;
  padding-left: 8px;
  margin: 0;
  font-size: 13px !important;
  font-weight: 400;
  color: #7a7a7a;
}
.day h4 {
  position: absolute;
  bottom: 35px;
  margin: 0;
  padding: 2px;
  padding-left: 8px;
  font-size: 13px !important;
  font-weight: 700;
}
.day h5 {
  margin: 0;
  padding: 5px;
  padding-left: 8px;
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 10px !important;
  font-weight: 700;
}
.waitWindow {
  background: var(--better-main);
}
.alert-container {
  height: 35em;
  width: 22em;
  background: var(--better-sub);
  position: absolute;
  right: 0;
  top: 0;
  border-radius: 0px 0px 40px 40px;
  text-align: center;
  display: flex;
}
.alert-button {
  height: 20px;
  width: 20px;
  padding: 10px;
  text-align: center;
  margin: 20px auto 0px;
  cursor: pointer;
}
.dark
  [class*="notifications__detailsBody___"]
  > [class*="notifications__subtitle___"] {
  color: #c1bcbc;
}
[class*="notifications__detailsBody___"]
  > [class*="notifications__subtitle___"] {
  font-size: 12px;
}
[class*="notifications__notifications___"] > button {
  background: white;
  z-index: 21 !important;
  color: var(--better-sub);
  padding: 8px;
}
.legacy-root button > svg,
.legacy-root a > svg {
  height: 25px;
  width: 24px;
}
[class*="notifications__notifications___"]
  > button
  > [class*="notifications__bubble___"] {
  background: var(--better-alert-highlight);
  width: 25px;
  height: 25px;
}
.dark .legacy-root button::after {
  background: white;
}
.legacy-root button::after {
  background: black !important;
}
.legacy-root button:not([disabled]):focus {
  border-color: var(--better-sub);
}
[class*="notifications__list___"] {
  border: 4px solid var(--auto-background);
  background: var(--background-primary);
}
[class*="notifications__item___"] {
  background: var(--background-primary) !important;
  border-left: 4px solid var(--better-main) !important;
  margin-bottom: 4px !important;

  > [class*="notifications__dismiss___"] {
    background: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary);
    margin: auto 0;
  }

  &:hover {
    background: var(--auto-background) !important;
  }
}
.connectedNotificationsWrapper > div > button + div {
  color: var(--text-primary);
  top: 80px;
  right: 10px;
  border-radius: 16px;
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Smoothed by attachNotificationsPanelAnimation (matches #ExtensionPopup spring) */
.bsplus-notifications-panel {
  transform-origin: top right;
  will-change: opacity, transform;
  filter: drop-shadow(0px 0px 20px rgba(0, 0, 0, 0.35));
}

#menu li.active {
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.35);
}
#menu li:first-child {
  margin-top: 5px;
}
[class*="notifications__actions___"] {
  background: var(--auto-background);

  button {
    background: none !important;
    border: 1px solid white;
  }
}
[class*="notifications__details___"] {
  max-width: 80%;
  overflow: clip;
}
[class*="notifications__details___"] div {
  text-overflow: ellipsis;
}
#main > .messages {
  color: var(--text-primary);
}
[class*="Overview__details___"] {
  border-radius: 16px;
  overflow: hidden;
}
[class*="Viewer__sidebar___"] {
  color: var(--text-primary);
  border-right: unset;
  background: unset;

  > header {
    background: unset;
  }
}
[class*="MessageList__MessageList___"] ::-webkit-scrollbar {
  width: 0px;
  background: none;
}
[class*="MessageList__primary___"] > :last-child {
  display: none !important;
}
[class*="MessageList__MessageList___"] ol [class*="Button__Button___"]::before {
  content: "";
  font-size: 12px;
  margin-right: 4px;
  font-family: "IconFamily";
  pointer-events: none;
}

[class*="MessageList__MessageList___"] ol [class*="Button__Button___"] {
  width: calc(100% - 32px);
  border-radius: 16px;
  margin: 8px 16px;
  padding: 12.8px;
  place-content: center;
  text-align: center;
}

.dark [class*="MessageList__MessageList___"] [class*="Button__Button___"] {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
}

[class*="MessageList__MessageList___"] [class*="Button__Button___"] {
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  min-height: 32px;
  text-align: center;
}
[class*="MessageList__MessageList___"] {
  background: var(--background-primary);
}
[class*="Input__Input___"]::before,
.navigator .bar.flat::before,
.ais-btnSearch::before {
  content: "";
  transform: translateY(-50%);
  color: currentColor;
  font-size: 16px;
  margin-left: 8px;
  margin-top: auto;
  font-family: "IconFamily";
  pointer-events: none;
}
[class*="Input__Input___"] {
  transition:
    background-color 0.5s,
    border-color 0.5s;
  background: var(--auto-background);
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;

  > input {
    outline: none !important;
    border: none !important;
    color: var(--text-primary);
    width: 100%;
  }
}
.uiShortText.search {
  padding: 8px;
  position: relative;
}

.cke_panel > iframe {
  height: 180px;
  background: var(--background-primary);
}
[class*="Avatar__Avatar___"][class*="Avatar__staff___"] {
  --person-colour: var(--better-light);
  background: var(--person-colour, var(--navy));
}
[class*="LabelList__LabelList___"] > li[class*="LabelList__selected___"] {
  background: var(--background-primary);
  color: var(--text-primary);
}
[class*="Message__Message___"] {
  background: var(--background-primary);
  border-radius: 16px !important;
}
iframe.userHTML {
  color: white !important;
  background: transparent;
}
.userHTML > div:first-of-type {
  color: var(--text-primary);
}
#main > .reports {
  background: none;
  display: flex;
  flex-wrap: wrap;
}
#main > .reports > .item > .report > .year {
  background: var(--better-light);
  color: var(--text-color);
}
[class*="Spinner__Spinner___"] > svg {
  margin: 16px 0;
}
[class*="Spinner__Spinner___"] > svg > path {
  stroke: var(--text-primary) !important;
}
#main > .reports > .item > .report > .term {
  color: var(--text-color);
  background: var(--better-main);
}
[class*="Collapsible__Collapsible___"] > [class*="Collapsible__header__"] {
  background: none !important;
}
[class*="Collapsible__Collapsible___"]
  > [class*="Collapsible__content___"]
  [class*="Collapsible__enterActive___"]
  [class*="Collapsible__exitActive___"] {
  animation-timing-function: ease-out !important;
}
[class*="AssessmentList__AssessmentList___"]
  > [class*="AssessmentList__searchFilter___"]
  + [class*="AssessmentList__items___"] {
  color: var(--text-primary);
}
[class*="Thermoscore__Thermoscore___"] {
  background-image: unset;
  background-color: var(--auto-background);
}
[class*="OverallResult__OverallResult___"] {
  --fill-colour: var(--assessment-accent-colour, var(--item-colour, var(--container-accent, rgb(var(--theme-sel-bg-parts)))));
}
[class*="OverallResult__OverallResult___"] [class*="Thermoscore__Thermoscore___"],
[class*="OverallResult__OverallResult___"] [class*="Thermoscore__fill___"],
[class*="OverallResult__OverallResult___"] > div > div {
  --fill-colour: var(--assessment-accent-colour, var(--item-colour, var(--container-accent, rgb(var(--theme-sel-bg-parts)))));
}
[class*="AssessableCriterion__header___"] {
  --fill-colour: var(--assessment-accent-colour, var(--item-colour, var(--container-accent, rgb(var(--theme-sel-bg-parts)))));
}
[class*="AssessableCriterion__header___"] [class*="Thermoscore__Thermoscore___"],
[class*="AssessableCriterion__header___"] [class*="Thermoscore__fill___"],
[class*="AssessableCriterion__header___"] > div > div > div {
  --fill-colour: var(--assessment-accent-colour, var(--item-colour, var(--container-accent, rgb(var(--theme-sel-bg-parts)))));
}
.dark [class*="Thermoscore__Thermoscore___"] {
  border: 2px solid rgba(255, 255, 255, 0.3);
}
[class*="AssessmentItem__meta___"] {
  padding-bottom: 8px;
}
#toolbar {
  color: var(--text-primary);
  background: unset;
}
#main:has(.timetablepage) #toolbar {
  background: var(--background-primary);
}
.dailycal > .zoom {
  display: none;
}
.dailycal > .times > .time {
  padding: 0 !important;
}
.programmeNavigator > .navigator,
.programmeNavigator > .navigator > li > ul {
  background: var(--background-primary);
  color: var(--text-primary);
}
.programmeNavigator > .navigator > .week > .lessons > .lesson:hover {
  background: var(--auto-background);
}

.pane .navigator::after {
  content: unset !important;
}

.programmeNavigator {
  box-shadow: 0 0 40px 0px rgba(0, 0, 0, 0.05);
  overflow-y: scroll;
  height: 100%;
  width: 400px;
  background: var(--background-primary);
  position: relative;

  .navigator {
    padding: 6px !important;

    .bar.flat::before {
      z-index: 10;
      left: 8px;
      margin: 0;
      position: absolute;
      top: 50%;
    }

    .search {
      padding: 10px;
      padding-left: 30px;
      top: 8px;
      margin-top: -50px;
      z-index: 2;
      box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
    }

    .bar {
      top: 13px;
      padding-right: 4px;
      position: sticky;
      pointer-events: none;

      button {
        position: unset;
        pointer-events: auto;
      }
    }

    .meta {
      border-radius: 8px;
    }

    .cover {
      padding: 12px;
    }

    .cover,
    .lesson {
      border-radius: 8px;
      transition: background 0.1s ease-out;
      position: relative;
      color: var(--text-primary) !important;
      z-index: 1;

      &:hover {
        background: transparent !important;
      }

      &.selected {
        background: transparent !important;
      }

      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        background: var(--auto-background);
        opacity: 0;
        scale: 0.95;
        transition:
          opacity 0.2s ease-out,
          scale 0.1s ease-out;
        z-index: -1;
        pointer-events: none;
      }

      &:hover::before {
        opacity: 0.5;
        scale: 1;
      }

      &.selected::before {
        opacity: 1;
        scale: 1;
      }
    }
  }
}

.pane {
  .content:has(.programmeNavigator) {
    margin: 0;
  }

  .programmeNavigator .navigator {
    .search {
      border-radius: 8px;
    }

    &::before {
      top: 83px;
    }
  }
}

.dark .programmeNavigator .navigator {
  .search {
    background: var(--background-secondary) !important;
    box-shadow:
      0px 0px 10px 0px rgba(0, 0, 0, 0.1),
      inset 0px 0px 15px 0px rgba(0, 0, 0, 0.1) !important;
  }
}
.dark #main > .course > .content > h1 {
  text-shadow: 0 0 10px black;
}

#main > .course > .content > h1 {
  color: var(--text-primary);
  border-bottom: none;
}

#main > .course > .content > .outline > h2,
#main > .course > .content > .homework > h2,
#main > .course > .content > .resources > h2 {
  color: var(--text-primary);
}

body::-webkit-scrollbar-button {
  display: none !important;
}
:root,
html,
body,
div,
ol,
ul {
  scrollbar-width: thin;
  scrollbar-color: #babac0 #fff !important;
}

div:has(> [class*="AssessmentDetails__AssessmentDetails___"]) {
  padding: 4px;
}

[class*="SelectedAssessment__due___"] {
  border-radius: 8px !important;
  background: var(--background-primary) !important;
}
[class*="SelectedAssessment__SelectedAssessment___"] {
  color: var(--text-primary);
}
[class*="SelectedAssessment__SelectedAssessment___"]
  > [class*="SelectedAssessment__meta___"]
  > [class*="SelectedAssessment__clearBtn___"] {
  background: var(--better-main);
}
[class*="SelectedAssessment__SelectedAssessment___"]
  > [class*="SelectedAssessment__meta___"] {
  border-bottom: 1px solid var(--better-main);
}
[class*="TabSet__TabSet___"]
  > ol[class*="TabSet__tabs___"]
  > li[class*="TabSet__selected___"] {
  border-bottom-color: var(--better-main);
}
[class*="TabSet__TabSet___"] > ol[class*="TabSet__tabs___"] {
  border-bottom: none;
}
[class*="TabSet__TabSet___"] > ol[class*="TabSet__tabs___"] > li:hover {
  box-shadow: inset 0 -1px var(--better-main);
}
[class*="TabSet__TabSet___"] > [class*="TabSet__tabContainer___"] {
  background: unset;
}
[class*="BasicPanel__BasicPanel___"] {
  background: var(--background-primary);
}
.back > svg {
  transform: scale(1.2);
}
.pane .tabPage .url {
  background: var(--auto-background) !important;

  > input {
    background: var(--background-primary) !important;
    border-radius: 16px;
    padding: 6px 10px !important;
  }
}
.uiFileHandler {
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0) !important;
  box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0) !important;
  background: var(--background-primary);
  margin: 0 !important;
  border-radius: 16px;
}
.mediaWrapper,
.mediaRecorder,
[class*="MediaRecorder__MediaRecorder___"] {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}
[class*="MediaRecorder__MediaRecorder___"] {
  background: var(--background-primary);
}
.legacy-root .uiFileHandler {
  background: var(--auto-background);
  border-radius: 16px;
}
[class*="ResourceList__ResourceList___"] .legacy-root .uiFileHandler {
  background: var(--background-primary);
}
.legacy-root .uiFileHandler.dragTarget {
  background: var(--better-main);
}
[class*="MenuButton__MenuPanel___"] {
  background: var(--background-primary);
  color: var(--text-primary);
  border-radius: 16px;
  overflow: clip;

  > div {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;

    > div {
      > h2 {
        padding-bottom: 1px;
        padding-left: 12px;
      }
    }
  }
}
.dailycal > .header {
  color: var(--text-primary);
}
#main > .timetablepage {
  color: var(--text-primary) !important;
}
#main > .timetablepage > .container > .dailycal {
  color: var(--text-primary);
}
#main > .timetablepage > .note {
  color: var(--text-primary);
  display: none;
}
.days td {
  overflow: hidden;
  .title {
    width: 100% !important;
  }
}
.content > .wrapper .days tbody tr > td {
  overflow: hidden;
}
.title {
  color: var(--text-primary) !important;
}
.entry[data-yiq="light"],
.quickbar[data-yiq="light"] .title,
.quickbar[data-yiq="dark"] .actions button svg,
.entry[data-yiq="light"] .title {
  color: #fff !important;
}
.entry[data-yiq="dark"],
.quickbar[data-yiq="dark"] .title,
.quickbar[data-yiq="dark"] .actions button svg,
.entry[data-yiq="dark"] .title {
  color: #000 !important;
}
div.entry.class {
  border-radius: 4px;
  width: 100% !important;
}

div.entry.class[style*="left: 46.5%"] {
  left: 50% !important;
}

div.entry.class[style*="width: 46.5%"] {
  width: 50% !important;
}
.timetablepage
  .dailycal
  > .content
  > .wrapper
  > .days
  > tbody
  > tr
  > td
  > .entriesWrapper {
  min-width: 0;
  width: auto !important;
}

div.entry.tutorial {
  border-radius: 4px;
}

div.entry.event {
  border-radius: 4px;
}

div.entry.new {
  border-radius: 4px;
}

div.liveEntry {
  border-radius: 4px;
}

div.dailycalMarker {
  border-radius: 4px;
}

.uiFileHandler .uiButton {
  border-radius: 32px !important;
  color: var(--text-primary) !important;
  margin-top: 4px !important;
}

a.uiFile:not(.rows) {
  display: flex !important;
  height: auto !important;
  width: 200px !important;
  border-radius: 80px !important;
  place-items: center !important;
  padding: 0px 9px !important;
  gap: 6px;
  transition: opacity 0.2s;
  box-shadow: inset 0 0 0px 2px rgba(255, 255, 255, 0.2) !important;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  svg {
    color: white;
    position: unset !important;
    display: unset !important;
    width: auto !important;
    height: 42px !important;
    z-index: 1 !important;
    flex: 0.199;
  }

  .name {
    position: unset !important;
    background: transparent !important;
    font-size: 12px !important;
    flex: 1;
  }
}

.dark {
  body,
  div,
  ol,
  ul {
    scrollbar-width: thin;
    scrollbar-color: #333 #111 !important;
  }

  #toolbar button.toggled,
  #toolbar button.depressed {
    background: #333333;
    color: white;
  }
}

.dark .title a.uiFile {
  color: #06b4fc !important;
}

.document td:not([class^="colourBar"]):not([class^="title"]) {
  color: black;
}
.dark .document td:not([class^="colourBar"]):not([class^="title"]) {
  color: white !important;
}

.uiFileHandlerPanel::before {
  border: 12px solid rgba(0, 0, 0, 0);
  border-top-color: var(--background-primary);
}
.uiButton:hover {
  box-shadow: none !important;
}

.uiButton {
  border: solid 1px transparent !important;

  svg {
    color: var(--text-primary);
  }
}

.uiFileHandlerPanel {
  background: var(--background-primary);
  color: var(--text-primary);
  border-radius: 16px;
}
.sources .uiButton {
  border-radius: 16px;
}
[class*="MediaRecorder__preview___"] {
  background: var(--background-primary);
}
[class*="MediaRecorder__actions___"] {
  background: var(--background-primary);
}
[class*="Rubric__Rubric___"] > [class*="Rubric__line___"] {
  background: unset;
}
#main > .course > .content > .header > .coverImage.blurred {
  display: none;
  background-image: unset !important;
  height: 0px;
  width: 0px;
}
.coverImage,
blurred {
  display: none;
}
.icon-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 64px;
  cursor: pointer;
}
/* While a drill-in submenu is open, don't steal clicks meant for folder rows. */
#menu:has(li.hasChildren.active) > .icon-cover {
  pointer-events: none;
}
.uiSlidePane > .pane > .header button {
  color: var(--text-color) !important;
}
.uiSlidePane > .pane > .header > h1 {
  color: var(--text-color) !important;
}
.uiSlidePane > .pane > .header {
  background: var(--better-main);
}
.content [placeholder="Subject…"] {
  padding-left: 12px !important;
  border-radius: 16px;
  background: var(--background-primary) !important;
  color: var(--text-primary) !important;
}
.content [placeholder="Subject…"]::-webkit-input-placeholder {
  color: gray;
}
.activelesson {
  box-shadow: inset 0px 10px 0 var(--item-colour, transparent) !important;
}
div.bar.flat {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.dashlet {
  .cke_contents {
    background: var(--background-secondary) !important;
  }

  .cke_button,
  .cke_combo_button {
    background: var(--background-secondary) !important;
  }

  .dashlet-motd {
    padding: 7px !important;
    .message {
      font-size: 24px !important;
      border-radius: 12px !important;
      border: none !important;
      box-shadow: none !important;
      padding: 16px !important;
      margin: 0 !important;
      height: 100% !important;
      max-height: none !important;
      display: flex !important;
      align-items: flex-start !important;
      overflow: hidden !important;
      color: var(--text-primary) !important;
    }
  }

  .cke_toolbox > .cke_toolbar > .cke_toolgroup > .cke_button {
    background: var(--background-secondary) !important;
    color: var(--text-primary) !important;
  }

  .cke_toolbox > .cke_toolbar > .cke_combo > .cke_combo_button {
    background: var(--background-secondary) !important;
    color: var(--text-primary) !important;
  }
}

.cke_toolbox > .cke_toolbar > .cke_combo > .cke_combo_button {
  border-radius: 8px !important;
}

.cke_toolbox > .cke_toolbar > .cke_toolgroup > .cke_button {
  &:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
  }

  &:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
  }
}

.formattedText > .wrapper > .cke > .cke_inner > .cke_contents {
  background: var(--background-primary);
  border-radius: 16px;
  overflow-x: hidden;
}
.formattedText > .footer {
  background: var(--background-primary);
  border-radius: 16px;
  margin-top: 8px;
}
.uiSlidePane.shown {
  background-color: rgba(0, 0, 0, 0.7);
}
.uiSlidePane {
  transform: translatey(0%) !important;
  transition: background-color 0.5s ease-in-out;
  background-color: rgba(0, 0, 0, 0);
  transition-duration: 500ms !important;
  z-index: 22 !important;
}
.uiSlidePane.shown > .pane {
  transform: translatey(0%) !important;
  opacity: 1;
}
.uiSlidePane > .pane {
  color: var(--text-primary);
  background: var(--auto-background);
  transform: translateY(100%);
  transition:
    transform 0.5s ease-out,
    -webkit-transform 0.5s ease-out,
    opacity 0.2s ease-out;
  transition-delay: 0 !important;
  border-radius: 16px !important;
  opacity: 0;
}
.document-width-micro [class*="RootModule__root-module___"],
.document-width-nano [class*="RootModule__root-module___"] {
  padding: 16px;
  box-sizing: border-box;
}
.anyoneSelect.filterBox {
  background: transparent;
  margin: 0;
  padding: 0;
}
.cke_toolbox {
  padding: 0 !important;
  padding-left: 8px !important;
  gap: 0 8px;
  background: transparent !important;
}
.cke_toolbar:has(.cke_toolgroup) {
  .cke_combo {
    margin-right: 8px !important;
  }
}
.cke_toolbox > .cke_toolbar > .cke_toolgroup {
  margin: 0 !important;
}
#cke_1_top a:hover:not(.cke_combo_button) {
  background: #5a5a5a;
}
.legacy-root button.depressed,
.legacy-root button.toggled {
  background: #797979;
}
.legacy-root button,
.legacy-root a {
  background: var(--background-primary);
}
.cke_toolbox > .cke_toolbar .cke_combo_on > .cke_combo_button,
.cke_toolbox > .cke_toolbar .cke_button_on {
  background-color: #d5d5d6 !important;
  &::after {
    background: black !important;
  }
}

.dark .cke_combo_button {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="white" viewBox="0 0 24 24"><path d="M6.984 9.984h10.031l-5.016 5.016z"/></svg>') !important;
}

.quicktable {
  border-radius: 12px;
}

.dark {
  .cke_toolbox > .cke_toolbar .cke_combo_on > .cke_combo_button,
  .cke_toolbox > .cke_toolbar .cke_button_on {
    background-color: #3d3d3e !important;

    &::after {
      background: rgb(207, 207, 207) !important;
    }
  }
}

.legacy-root input.singleSelect {
  padding-left: 8px;

  &:focus {
    background: var(--auto-background);
    color: var(--text-primary) !important;
  }
}

button.buttonMenu.depressed:hover {
  border-radius: 100px;
  border-bottom-left-radius: 100px !important;
  border-bottom-right-radius: 100px !important;
}

ul.buttonMenu {
  border-radius: 16px;
  padding: 0 !important;
}

ul.singleSelect,
ul.buttonChecklist,
ul.buttonMenu,
ul.colourButtonOptions,
ul.uiSplitButtonList,
.contactFormPanel {
  background: var(--background-primary) !important;
  border: solid 4px var(--background-primary);
  color: var(--text-primary);
}
.legacy-root input,
.legacy-root textarea,
.legacy-root select,
.legacy-root option,
.legacy-root .input {
  background: transparent;
  color: var(--text-primary);
}
body {
  background: var(--theme-primary);
  overflow: hidden;
}
.shortcuticondiv {
  height: 39px;
  width: 39px;
  border-radius: 50%;
  padding: 0;
  margin: auto 0px auto 10px;
  background-repeat: no-repeat;
  background-size: contain;
}
.forumView > .messages > .thread,
.forumView > .messages > .deletedPlaceholder,
.forumView > .addMessage,
.forumView .greeting,
.forumView .assessment {
  background: var(--better-main);
}
.dailycal
  > .content
  > .wrapper
  > .days
  > tbody
  > tr
  > td
  > .entriesWrapper
  > .entry {
  padding: 3px;
  transition: opacity 0.2s ease-in-out;
}
[class*="Viewer__Viewer___"] {
  background: unset;

  [class*="ReadingPane__ReadingPane___"] {
    > [class*="Message__unread___"] > header {
      box-shadow: none !important;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 4px;
        background: var(--better-main);
      }
    }
  }
}
.weekend {
  display: none !important;
}
.days {
  width: 100%;
}
/* Do not hide .modaliser globally — SEQTA Modaliser relies on transitionend to
   dispose; display:none prevents that and leaves empty shells that block clicks. */
.modaliser-container:not(.visible) {
  display: none !important;
  pointer-events: none !important;
}

.modaliser-container.visible .modaliser {
  background: var(--better-main);
}

/* ColourChooser teardown can leave a full-screen uiSlidePane that blocks entry clicks */
.uiSlidePane:not(.shown):has(.pane.colourChooser) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

[class*="MessageList__unread___"] {
  position: relative;
  background: var(--background-secondary, rgb(228 225 225));
}

.dark [class*="MessageList__unread___"] {
  background: rgba(0, 0, 0, 0.1);
}

[class*="MessageList__MessageList___"] > ol > li:hover {
  background: var(--theme-offset-bg-more);
}

.MenuButton__Menu___gXTaY > button {
  border-radius: 1600px;
}

[class*="MessageList__MessageList___"]
  > ol
  > li[class*="MessageList__selected___"]
  [class*="MessageList__unread___"] {
  box-shadow: none;
}

[class*="Message__Message___"] [class*="Message__unread___"] > header {
  box-shadow: none;
}

[class*="MessageList__MessageList___"]
  > ol
  > li[class*="MessageList__unread___"]::before,
[class*="MessageList__MessageList___"] > ol > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--better-main);
  width: 0px;
  transition: width 0.1s;
}

[class*="MessageList__MessageList___"]
  > ol
  > li[class*="MessageList__unread___"]::before {
  width: 3px;
}
.connectedNotificationsWrapper > div > button {
  background: var(--text-primary) !important;
  border-radius: 10px !important;
  color: var(--background-primary) !important;
  height: 42px;
  justify-content: center;
  right: 47px;
  top: 14px;
  width: 42px;
  z-index: 21;
}
#userActions > .details > .name::before {
  content: "";
  width: 14px;
  height: 12px;
  background-image: url("../resources/icons/betterseqta-light-outline.png");
  display: inline-block;
  background-size: 18px 18px;
  color: #fff;
  margin-right: 2px;
  background-position: center;
  vertical-align: top;
}
#userActions > .details {
  opacity: unset !important;
  color: var(--text-color);
}
.defaultWelcomeWrapper {
  background: unset !important;
}

/* Coloris (timetable subject colours): cosmetic only — do not unset
   transforms/animations on ::after (breaks picker reopen). */
#clr-color-preview {
  margin: 15px 0 20px 20px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.clr-swatches button {
  border-radius: 4px;
}

/* Never let a closed Coloris picker intercept timetable clicks */
body:not(.clr-open) .clr-picker,
.clr-picker:not(.clr-open) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.dark
  [class*="MessageList__MessageList___"]
  > ol
  > li[class*="MessageList__selected___"] {
  background: var(--background-secondary);
}

[class*="MessageList__MessageList___"]
  > ol
  > li[class*="MessageList__selected___"] {
  background: var(--background-secondary, rgb(228 225 225));
  color: var(--text-primary);
  box-shadow: none !important;
  position: relative;
}
.NewsArticle {
  border-radius: 16px !important;
  overflow: hidden;
  width: 100%;
  padding: 0 !important;
  background: var(--background-primary) !important;
  color: var(--text-primary);
  display: flex;
  flex-direction: row;
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);

  &:hover {
    .ArticleText a {
      text-decoration: underline;
    }
  }

  .ArticleText a {
    padding: 10px 20px;
    margin: 0;
    font-weight: 800;
    font-size: 2em;
    background: none;
  }

  .ArticleText p {
    padding: 10px 20px;
    margin: 0;
    font-size: 1.5em;
  }

  .ArticleText {
    display: flex;
    flex-direction: column;
    width: 65%;
    height: 100%;
  }

  .articleimage {
    width: 35%;
    background-position: center;
    background-size: cover;
    min-height: 18em;
    background-repeat: no-repeat;
  }
}

#news-container {
  gap: 16px;

  > h1 {
    margin-bottom: 12px;
  }
}
.editmenu {
  position: absolute;
  right: 0;
  height: 64px;
  align-items: center;
  display: flex;
  width: 20%;
  justify-content: center;
}
.editmenu svg:hover > path {
  fill: #aaaaaa;
}
.editmenu svg:hover {
  cursor: pointer;
}
.notMenuCover {
  width: 100%;
  height: 100%;
  background: black;
  position: absolute;
  z-index: 10;
  opacity: 0.4;
}
#menu {
  --menuHidden: none;
}
.editmenuoption {
  background: var(--background-primary);
  color: var(--text-primary);
  border-radius: 5px;
  margin: 0 10px;
  padding: 8px;
  cursor: pointer;
}
.editmenuoption-container {
  width: 100%;
  height: 42px;
  background: var(--better-main);
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logout {
  background: none !important;
  padding: 5px 10px;
}

#logouttooltip {
  width: 50px !important;
  margin-left: -28px !important;
  top: 105% !important;

  .uiButton svg g {
    color: var(--background-primary) !important;
  }
}
.svg {
  transform-origin: center;
  position: absolute;
  top: 50%;
  left: 50%;
  will-change: transform;
}
.logo {
  transform: translate(-50%, -50%);
}
.big-circle {
  margin: -88px;
  will-change: transform;
  animation-timing-function: linear;
  animation: spin 3s linear infinite;
  -moz-animation: spin 3s linear infinite;
}

.small-circle {
  margin: -66px;
  will-change: transform;
  animation-timing-function: linear;
  animation: spin 3s linear infinite;
  -moz-animation: spin 3s linear infinite;
}

.dark [class*="LabelList__name___"] {
  text-shadow: 0 0 5px black;
}
[class*="LabelList__name___"] {
  display: flex;
  align-items: center;
}
[data-label="inbox"] > [class*="LabelList__name___"]::before {
  content: "\eb70";
  color: currentColor;
  font-size: 16px;
  margin-right: 8px;
  font-family: "IconFamily";
  pointer-events: none;
}
[data-label="outbox"] > [class*="LabelList__name___"]::before {
  content: "\eca6";
  color: currentColor;
  font-size: 16px;
  margin-right: 8px;
  font-family: "IconFamily";
  pointer-events: none;
}
[data-label="starred"] > [class*="LabelList__name___"]::before {
  content: "\ece8";
  color: currentColor;
  font-size: 16px;
  margin-right: 8px;
  font-family: "IconFamily";
  pointer-events: none;
}
[data-label="trash"] > [class*="LabelList__name___"]::before {
  content: "\ed2c";
  color: currentColor;
  font-size: 16px;
  margin-right: 8px;
  font-family: "IconFamily";
  pointer-events: none;
}
.outer-circle {
  margin: -108px;
  will-change: transform;
  animation-direction: alternate-reverse;
  animation: spinback 1s linear infinite;
  -moz-animation: spinback 1s linear infinite;
}
@-moz-keyframes spin {
  100% {
    -moz-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes spinback {
  100% {
    -webkit-transform: rotate(-360deg);
    transform: rotate(-360deg);
  }
}
.day-button {
  height: 25px;
  width: 25px;
  position: absolute;
  bottom: 20px;
}
#userActions > .details > .code {
  text-transform: initial;
  overflow: visible !important;
}
.code {
  position: relative;
  cursor: pointer;
}
.code:before {
  content: attr(data-hover);
  visibility: hidden;
  opacity: 0;
  width: 160px;
  background-color: #1a1a1a;
  color: var(--text-primary);
  text-align: center;
  border-radius: 5px;
  padding: 5px 0;
  transition: opacity 0.4 ease-in-out;
  position: absolute;
  z-index: 20;
  left: 0;
  top: -25px;
}
.code:hover:before {
  opacity: 1;
  visibility: visible;
}

.sortable-ghost {
  opacity: 0;
}
#menuToggle {
  width: 36px;
  position: fixed;
  height: 36px;
  top: 20.8px !important;
  left: 8px;
  z-index: 21;
  display: none;
  padding: 6px;
}
#menuToggle:hover {
  box-shadow: unset;
}
.hamburger-line {
  width: 100%;
  height: 3px;
  border-radius: 16px;
  background-color: var(--text-primary);
  margin: 3px 0;
  transition: all 0.3s ease;
}
.menuShown #menuToggle .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menuShown #menuToggle .hamburger-line:nth-child(2) {
  opacity: 0;
}
.menuShown #menuToggle .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
div.day-empty {
  display: flex;
  align-items: center;
  height: 15em;
  width: 100%;
  border-radius: 16px 0;
  padding: 0 !important;

  img {
    margin: 20px;
    height: 50%;
  }

  p {
    margin: 0;
    font-size: 30px;
    font-weight: 400;
  }
}

#notice-container.day-empty,
#notice-container .day-empty {
  font-size: 14px !important;
}
.upcoming-submittedtext {
  align-self: center;
  padding: 8px 25px;
  background: var(--item-colour);
  color: white;
  border-radius: 30px;
}
.upcoming-container {
  width: 100%;
  max-height: 60em;
  background: var(--better-main);
  display: flex;
  flex-direction: column;
  -webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
}
.upcoming-container h2 {
  margin: 20px;
  font-size: 20px;
  font-weight: 400;
}
.upcoming-subject-title {
  color: var(--text-primary);
  width: 15%;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-align: center;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px 0px 0px 5px;
  background: var(--item-colour);
}
.upcoming-assessment {
  border: 2px solid var(--item-colour);
  margin: 5px 50px;
  height: 6em;
  font-family: Rubik, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  padding: 0px;
  border-radius: 10px;
  display: flex;
}
.upcoming-date-title {
  padding: 12px;
  font-size: 20px !important;
  font-weight: 700 !important;
}
.upcoming-details p:hover {
  cursor: pointer;
  text-decoration: underline;
}
.upcoming-blank {
  display: flex;
  border-bottom: 2px solid #bebebe;
  margin: 5px 50px;
  height: 2em;
  padding: 0px;
}
.upcoming-tick {
  align-self: center;
}
.upcoming-title h2 {
  width: 100%;
}
.upcoming-filters {
  display: flex;
  height: 26px;
  width: 65%;
  align-self: center;
  align-items: center;
  color: var(--text-color);
  padding: 5px;
  overflow-x: scroll;
  overflow-y: hidden;
}
.upcoming-checkbox-container {
  position: relative;
  padding: none !important;
  padding-left: 25px !important;
  padding-right: 10px !important;
  cursor: pointer;
  font-size: 12px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  height: 20px;
  align-items: center;
  display: flex;
}

.upcoming-hiddenassessment {
  color: #797979;
}

.calendarEventEditor > .tabset > .item {
  border-radius: 0 !important;
}

.calendar {
  background: var(--background-primary) !important;
  color: var(--text-primary) !important;
  border-radius: 16px !important;
  margin-top: 4px;

  &.container {
    box-shadow: -2px 2px 30px 0px rgba(0, 0, 0, 0.3) !important;
  }

  table {
    background: transparent !important;
  }

  .uiButton {
    background: rgba(0, 0, 0, 0.5) !important;
    color: var(--text-primary) !important;
  }
}

[class*="MessageList__MessageList___"] > header {
  display: flex;
  justify-content: space-between;
}
.messages-filterbutton {
  height: 34px;
  width: 25%;
  background: var(--better-main);
  border-radius: 5px;
  display: none;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  cursor: pointer;
}
.day {
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0px 6px 0 var(--item-colour, transparent),
    inset 0px 40px 50px -40px rgba(179, 179, 179, 0.9);
  transition: 200ms;
  position: relative;
  height: 15em;
  color: var(--text-primary);
  background: var(--background-primary);
  font-family: Rubik, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
.dark .day {
  box-shadow:
    inset 0px 6px 0 var(--item-colour, transparent),
    inset 0px 40px 50px -40px rgba(0, 0, 0, 0.9);
}
.day:hover {
  background: var(--background-secondary);
  transition: 200ms;
}
.dark .day h3 {
  color: #c1bcbc;
}

.upcoming-items {
  background: var(--background-primary);
  width: 100%;
  max-height: 55em;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  transition:
    200ms,
    background-color 0s;
  border-radius: 16px;
  font-family: Rubik, sans-serif !important;
  font-size: 20px !important;
  font-weight: 500 !important;
}
.dark .upcoming-items {
  box-shadow: inset 0px 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.upcoming-assessment-title {
  color: var(--text-primary);
  transition: 200ms;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0;
}
.upcoming-date-container {
  margin-bottom: 20px;
}
.upcoming-date-title h5 {
  margin: 0;
  font-weight: 700;
}
.upcoming-details {
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0px 12px;
  font-size: 15px;
}
.upcoming-details h5 {
  text-transform: uppercase;
  color: #aaaaaa;
  padding: 0px 4px;
  margin: 0;
}
.upcoming-details p {
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 4px;
}
.upcoming-special-day {
  font-size: 20px;
}
.upcoming-blank {
  display: flex;
  border-bottom: 2px solid #bebebe;
  margin: 5px 50px;
  height: 2em;
  padding: 0px;
}
.upcoming-blank p {
  padding: 0;
  margin: 0;
}
.upcoming-title {
  display: flex;
  align-content: space-between;
}
.upcoming-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
  padding: 0;
}
.upcoming-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 15px;
  width: 15px;
  border: 3px solid var(--item-colour);
  border-radius: 5px;
  color: var(--text-color);
}
.upcoming-checkbox-container:hover input ~ .upcoming-checkmark {
  filter: brightness(0.8);
}
.upcoming-checkbox-container input:checked ~ .upcoming-checkmark {
  background: var(--item-colour);
}
.upcoming-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.upcoming-checkbox-container input:checked ~ .upcoming-checkmark:after {
  display: block;
}
.upcoming-checkbox-container .upcoming-checkmark:after {
  left: 3.5px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}
.titlebar {
  align-items: center;
  transition: 200ms;
  color: var(--text-primary);
  display: flex;
  min-height: 32px;
  height: 64px;
  justify-content: space-between;
  z-index: 21;
  position: absolute;
  right: 250px;
}
.engage-titlebar {
  right: 250px;
  top: 0;
}

/* Engage parent home: same timetable DOM as Learn; title+student replace the lone h2 — give the cluster Learn’s h2 margin/inset. */
.timetable-container .home-subtitle > .engage-timetable-title-cluster {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 20px;
  min-width: 0;
}

.timetable-container .engage-timetable-title-cluster > h2 {
  font-size: 20px;
  font-weight: 400;
  margin: 0 !important;
}

#engage-home-root.home-root {
  box-sizing: border-box;
  min-height: 100%;
}

.engage-child-select {
  background: var(--background-primary);
  border: 1px solid var(--border-primary, rgba(128, 128, 128, 0.35));
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  max-width: 16rem;
  min-width: 10rem;
  padding: 0.35rem 0.6rem;
  transition: border-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.engage-child-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--background-primary), 0 0 0 4px rgba(59, 130, 246, 0.45);
}

#engage-day-container:has(> .day-empty) {
  align-content: center;
  display: flex;
  grid-auto-columns: unset;
  grid-auto-flow: unset;
  justify-content: center;
  min-height: 12rem;
  padding: 1.5rem;
}

#engage-day-container .day-empty {
  text-align: center;
}

#engage-logouttooltip {
  width: 50px !important;
  margin-left: -28px !important;
  top: 105% !important;

  .engage-logout {
    background: none !important;
    border: none;
    cursor: pointer;
    color: var(--background-primary) !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;

    svg {
      fill: var(--background-primary) !important;
    }
  }
}
.pagename {
  align-items: center;
  display: flex;
  font-size: 20px;
}
.pagename svg {
  width: 50px;
  height: 50px;
  margin-left: 12px;
  margin-right: 8px;
}
.shadow {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.userInfo {
  display: flex;
  align-items: center;
  padding-top: 4px;
}
.userInfoText {
  text-align: end;
}
.userInfoName {
  margin: 0 !important;
  font-size: 20px;
  font-weight: 700;
}
.userInfoCode {
  margin: 0 !important;
}
.userInfosvg {
  width: 50px;
  height: 50px;
  color: var(--better-main);
  z-index: 3;
  position: absolute;
}
.userInfosvgdiv {
  width: 50px !important;
  height: 50px !important;
  color: var(--better-main);
  margin: 10px;
  z-index: 3;
  position: absolute !important;
  right: -70px !important;
  top: -2px !important;
}
.userInfosvgdiv::before {
  content: "";
  width: 70%;
  height: 70%;
  background: var(--theme-primary);
  position: absolute;
  border-radius: 16000px;
  top: 15%;
  left: 15%;
}
.userInfosvg::after {
  width: 35px;
  height: 35px;
  background: antiquewhite;
  position: absolute;
}
.userInfohouse {
  padding: 0px 10px;
  font-size: 15px;
  margin: 0 8px !important;
  border-radius: 5px;
  color: var(--text-primary);
  background: var(--auto-background);
  outline: solid 1px black;
}
.DarkLightButton {
  right: 145px !important;
  z-index: 21 !important;
  top: 17.5px;
}
.whatsnewContainer {
  position: absolute;
  width: 38em;
  height: 95%;
  max-height: 60em;
  background: var(--background-primary);
  z-index: 50;
  border-radius: 20px;
  margin: auto;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  transform-origin: center center;
}

/* Text-only popups (privacy notices): body fills remaining height, scrolls inside */
.whatsnewContainer.whatsnewContainer--scrollBody {
  .whatsnewHeader {
    flex-shrink: 0;
    height: auto;
    min-height: 3em;
  }

  > .whatsnewTextContainer {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    width: 90%;
    margin: 0 auto 0.75rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
  }

  > .whatsnewTextContainer.privacyStatement {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}
.whatsnewTextContainer.privacyStatement p {
  margin-bottom: 1.5ex;

  &:last-child {
    margin-bottom: 0;
  }
}
.whatsnewTextContainer.privacyStatement a {
  background: rgba(184, 184, 184, 0.1);
  border-radius: 0.5rem;
  margin-left: 0.25rem;
  padding: 2px 4px;
}
.dark .whatsnewTextContainer.privacyStatement a {
  background: rgba(7, 7, 7, 0.1);
}
.whatsnewHeader {
  margin: 20px;
  width: 100%;
  height: 3em;
  display: flex;
  flex-direction: column;
}
.whatsnewHeader h1 {
  font-size: 2em;
}
.whatsnewHeader p {
  font-size: 1em;
  color: var(--text-primary);
}
.whatsnewBackground {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 49;
  transform: scale(1) !important;
}
.whatsnewImgContainer {
  width: 96%;
  display: flex;
  margin: 0 auto;
}
.whatsnewImg {
  margin: 0 auto;
  width: 90%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  display: block;
  background: #000;
}
.whatsnewTextContainer {
  display: flex;
  overflow-x: hidden;
  flex-direction: column;
  width: 90%;
  margin: 5px auto;
}
.whatsnewTextContainer li {
  margin: 2px 0;
  list-style-type: disc;
  list-style-position: inside;
  text-indent: -1em;
  padding-left: 1em;
}
.whatsnewTextContainer .beta {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  margin-left: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a3412;
  border-radius: 9999px;
  border: 1px solid rgba(253, 186, 140, 0.3);
  background-color: #ffedd5;
  border-color: rgba(253, 186, 140, 0.3);
}
.dark .whatsnewTextContainer .beta {
  border-color: rgb(124 45 18 / 0.3);
  background-color: rgb(124 45 18 / 0.3);
  color: rgb(253 186 116);
}
.whatsnewTextHeader {
  font-size: 1.4em !important;
  color: #4dd868;
  font-weight: 600;
  width: fit-content;
  position: relative;
}
.whatsnewTextHeader::after {
  content: "";
  width: 160%;
  height: 2px;
  background: #4dd868;
  margin-left: 10px;
  position: absolute;
  top: 50%;
}
.whatsnewFooter {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3em;
  border-radius: 0 0px 20px 20px;
  background: var(--theme-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}
.whatsnewFooter a {
  border: none;
}
.whatsnewFooter div {
  margin: 0 15px;
  display: flex;
  align-items: center;
}
#whatsnewclosebutton {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2em;
  padding: 5px;
  cursor: pointer;
}
#whatsnewclosebutton::before {
  content: "\ed8a";
  color: currentColor;
  font-size: 24px;
  font-family: "IconFamily";
  pointer-events: none;
}
.whatsnewTextContainer h1:not(.whatsnewTextHeader) {
  position: sticky;
  font-size: 1.2em;
  width: 100%;
  top: 0;
  background: var(--background-primary) !important;
  z-index: 1;
  padding: 12px;
  padding-left: 0px;
  padding-bottom: 8px;
}

.whatsnewTextContainer img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 12px;
}

.whatsnewHeader.bsCloudAutoSyncAnnouncementHeader {
  height: auto;
  min-height: unset;
}
.whatsnewHeader.bsCloudAutoSyncAnnouncementHeader h1 {
  line-height: 1.2;
}
.bsCloudAccent {
  color: #059669;
  font-weight: 700;
}
.dark .bsCloudAccent {
  color: #34d399;
}
.whatsnewTextContainer .bsCloudAutoSyncSignupCallout {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1rem 0;
  border-top: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
  font-size: clamp(1.35rem, 3.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
}

.themeOfTheMonthBackdrop {
  position: fixed;
  inset: 0;
  z-index: 47;
  background: color-mix(in srgb, #000 52%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.themeOfTheMonthBackdropVisible {
  opacity: 1;
  pointer-events: auto;
}
.themeOfTheMonthCard {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 48;
  margin: 0;
  width: min(360px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
  border-radius: 20px;
  background: var(--background-primary);
  color: var(--text-primary);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  transform-origin: bottom right;
  transition: none;
  animation: themeOfTheMonthCardIn 0.28s ease-out;
}
.themeOfTheMonthCardExpanded {
  transform-origin: center center;
}
/* translate(x,y) is set inline; transition enabled after mount */
.themeOfTheMonthCardMorphReady:not(.themeOfTheMonthCardReducedMotion) {
  transition:
    transform 0.55s cubic-bezier(0.76, 0, 0.24, 1),
    width 0.55s cubic-bezier(0.76, 0, 0.24, 1),
    height 0.55s cubic-bezier(0.76, 0, 0.24, 1),
    max-height 0.55s cubic-bezier(0.76, 0, 0.24, 1),
    border-radius 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.themeOfTheMonthCardAnchoredBottom,
.themeOfTheMonthCardCollapsing {
  transform-origin: 100% 100% !important;
}
/* Expanded: fixed shell; copy scrolls; actions pinned to the bottom. */
.themeOfTheMonthCardExpanded.themeOfTheMonthCardExpandedShell .themeOfTheMonthCardBody {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardExpandedShell .themeOfTheMonthCardDescription {
  flex: 1 1 auto;
  min-height: 0;
  margin: 8px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardExpandedShell .themeOfTheMonthCardActions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
}
.themeOfTheMonthCardReducedMotion {
  transition: none !important;
}
.themeOfTheMonthCardMedia {
  position: relative;
  flex-shrink: 0;
}
#theme-of-the-month-card .themeOfTheMonthCardPopout {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  appearance: none;
  border: none;
  border-radius: 50% !important;
  aspect-ratio: 1;
  cursor: pointer;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--background-primary) 80%, transparent);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 14%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.themeOfTheMonthCardPopoutIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  pointer-events: none;
}
.themeOfTheMonthCardPopout:hover {
  background: color-mix(in srgb, var(--background-primary) 95%, transparent);
  transform: scale(1.05);
}
.themeOfTheMonthCardPopout:active {
  transform: scale(0.96);
}
.themeOfTheMonthCardPopout[hidden] {
  display: none;
}
.themeOfTheMonthCardCompactMedia {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  line-height: 0;
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardShowGallery .themeOfTheMonthCardCompactMedia {
  display: none;
}
.themeOfTheMonthCardExpandedPanel {
  display: none;
}
.themeOfTheMonthCardExpandedPanel[hidden] {
  display: none !important;
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardShowGallery
  .themeOfTheMonthCardExpandedPanel:not([hidden]) {
  display: block;
}
.themeOfTheMonthCardGallery {
  position: relative;
}
.themeOfTheMonthCardHeroEmboss {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}
.themeOfTheMonthCardHeroEmbossScrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, #000 8%, transparent) 40%,
    color-mix(in srgb, #000 55%, transparent) 72%,
    color-mix(in srgb, #000 82%, transparent) 100%
  );
}
.themeOfTheMonthCardHeroEmbossContent {
  position: relative;
  z-index: 1;
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmboss {
  display: flex;
  padding: 14px 16px 16px;
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossTitle {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 2px 14px rgba(0, 0, 0, 0.35);
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossAuthor {
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: color-mix(in srgb, #fff 88%, transparent);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossDescription {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: color-mix(in srgb, #fff 92%, transparent);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossVariants {
  margin: 6px 0 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  color: color-mix(in srgb, #fff 72%, transparent);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardShowGallery
  .themeOfTheMonthCardGallerySlide
  figcaption {
  display: none;
}
.themeOfTheMonthCardGalleryTrack {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.themeOfTheMonthCardGalleryTrack::-webkit-scrollbar {
  display: none;
}
.themeOfTheMonthCardGallerySlide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}
.themeOfTheMonthCardGallerySlide img {
  display: block;
  width: 100%;
  height: min(42vh, 280px);
  object-fit: cover;
}
.themeOfTheMonthCardGallerySlide figcaption {
  padding: 8px 14px 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: color-mix(in srgb, var(--text-primary) 68%, transparent);
}
.themeOfTheMonthCardGalleryPrev,
.themeOfTheMonthCardGalleryNext {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  padding: 0;
  appearance: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--background-primary) 88%, transparent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.themeOfTheMonthCardGalleryPrev {
  left: 10px;
}
.themeOfTheMonthCardGalleryNext {
  right: 10px;
}
.themeOfTheMonthCardGalleryDots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px 0;
}
.themeOfTheMonthCardGalleryDot {
  width: 7px;
  height: 7px;
  padding: 0;
  appearance: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  background: color-mix(in srgb, var(--text-primary) 28%, transparent);
  transition: background 0.15s ease, transform 0.15s ease;
}
.themeOfTheMonthCardGalleryDotActive {
  background: var(--better-pri, #6366f1);
  transform: scale(1.15);
}
.themeOfTheMonthCardDescriptionTyping {
  display: block;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: unset;
}
.themeOfTheMonthCard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  background: inherit;
}
.themeOfTheMonthCardClosing {
  pointer-events: none;
  animation: themeOfTheMonthCardOut 0.18s ease-in forwards;
}
.themeOfTheMonthCardConfirm {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--background-primary) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.themeOfTheMonthCardConfirm[hidden] {
  display: none;
}
.themeOfTheMonthCardConfirmVisible {
  opacity: 1;
  pointer-events: auto;
}
.themeOfTheMonthCardConfirmInner {
  width: 100%;
  text-align: center;
}
.themeOfTheMonthCardConfirmInner h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.2;
}
.themeOfTheMonthCardConfirmInner p {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text-primary) 78%, transparent);
}
.themeOfTheMonthCardConfirmActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.themeOfTheMonthCardConfirmCancel,
.themeOfTheMonthCardConfirmAccept {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.themeOfTheMonthCardConfirmCancel {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
  color: var(--text-primary);
}
.themeOfTheMonthCardConfirmAccept {
  background: var(--better-pri, #6366f1);
  color: white;
}
.themeOfTheMonthCardConfirmCancel:hover,
.themeOfTheMonthCardConfirmAccept:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.themeOfTheMonthCardConfirmCancel:active,
.themeOfTheMonthCardConfirmAccept:active {
  transform: translateY(0);
}
#theme-of-the-month-card .themeOfTheMonthCardImage {
  display: block;
  width: 100% !important;
  min-width: 100%;
  height: 150px !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center center;
}
.themeOfTheMonthCardExpanded .themeOfTheMonthCardGallerySlide img {
  border-radius: 22px 22px 0 0;
}
.themeOfTheMonthCardBody {
  padding: 14px 16px 12px;
}
.themeOfTheMonthCardEyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--better-pri, #6366f1) 82%, var(--text-primary) 18%);
}
.themeOfTheMonthCard h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}
.themeOfTheMonthCardDescription {
  margin: 8px 0 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text-primary) 78%, transparent);
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.themeOfTheMonthCardDescriptionClipped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.themeOfTheMonthCardDescriptionExpanded {
  display: block;
  -webkit-line-clamp: unset;
}
.themeOfTheMonthCardExpanding:not(.themeOfTheMonthCardExpandedShell)
  .themeOfTheMonthCardDescriptionExpanded {
  overflow: hidden;
}
.themeOfTheMonthCardActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.themeOfTheMonthCardActionsStart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.themeOfTheMonthCardActionsEnd {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-left: auto;
  padding: 3px;
  gap: 0;
  overflow: hidden;
  border-radius: 9999px;
  background: color-mix(
    in srgb,
    var(--background-secondary, var(--text-primary)) 28%,
    var(--background-primary)
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 8%, transparent);
}
.themeOfTheMonthCardPrimary,
.themeOfTheMonthCardSecondary,
.themeOfTheMonthCardDontShow {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.58rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}
.themeOfTheMonthCardPrimary {
  background: var(--better-pri, #6366f1);
  color: white;
}
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardSecondary,
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardDontShow {
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none !important;
  border-radius: 9999px !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardSecondary {
  color: var(--text-primary);
}
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardDontShow {
  color: color-mix(in srgb, var(--text-primary) 58%, transparent);
}
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardSecondary:hover,
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardSecondary:focus-visible,
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardDontShow:hover,
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardDontShow:focus-visible {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent) !important;
  border-radius: 9999px !important;
  filter: none !important;
  transform: none !important;
}
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardSecondary:active,
#theme-of-the-month-card .themeOfTheMonthCardActionsEnd .themeOfTheMonthCardDontShow:active {
  background: color-mix(in srgb, var(--text-primary) 14%, transparent) !important;
  border-radius: 9999px !important;
}
.themeOfTheMonthCardPrimary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.themeOfTheMonthCardPrimary:active {
  transform: translateY(0);
}
@keyframes themeOfTheMonthCardIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes themeOfTheMonthCardOut {
  to {
    opacity: 0;
  }
}
.themeOfTheMonthCardExpanded.themeOfTheMonthCardClosing {
  animation: themeOfTheMonthCardOut 0.18s ease-in forwards;
}
@media (max-width: 900px) {
  .themeOfTheMonthCard,
  .themeOfTheMonthBackdrop {
    z-index: 2147483645;
  }
}

.bsplus-theme-highlight {
  animation: bsplusThemeHighlightPulse 1.4s ease-in-out 2;
}
@keyframes bsplusThemeHighlightPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--better-pri, #6366f1) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--better-pri, #6366f1) 60%, transparent);
  }
}

.popup-media-fullscreenable {
  cursor: pointer;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.popup-media-fullscreenable:hover {
  opacity: 0.95;
}
.popup-media-fullscreenable:focus {
  outline: none;
}
.popup-media-fullscreenable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-primary) 70%, transparent);
  outline-offset: 4px;
}

.bsplus-popup-media-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.22, 0.03, 0.26, 1);
}

.bsplus-popup-media-overlay-backdrop.bsplus-popup-media-overlay-backdrop--visible {
  opacity: 1;
}

.bsplus-popup-media-overlay-backdrop.bsplus-popup-media-overlay--instant {
  transition: none;
}

.bsplus-popup-media-overlay-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: min(96vw, 1320px);
  max-height: calc(100vh - clamp(40px, 10vw, 96px));
  border-radius: 20px;
  overflow: hidden;
  background: var(--background-primary);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.94) translateY(12px);
  transition:
    opacity 0.28s cubic-bezier(0.22, 0.03, 0.26, 1),
    transform 0.28s cubic-bezier(0.22, 0.03, 0.26, 1);
}

.bsplus-popup-media-overlay-backdrop.bsplus-popup-media-overlay-backdrop--visible
  .bsplus-popup-media-overlay-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.bsplus-popup-media-overlay-backdrop.bsplus-popup-media-overlay--instant
  .bsplus-popup-media-overlay-inner {
  transition: none;
}

.bsplus-popup-media-overlay-slot {
  width: 100%;
  max-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 28px);
  box-sizing: border-box;
}

.bsplus-popup-media-overlay-media {
  max-width: 100%;
  max-height: calc(100vh - clamp(120px, 22vh, 200px));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  &.upcoming-items,
  &.day-container {
    background: linear-gradient(
      90deg,
      var(--background-primary) 0%,
      var(--background-secondary) 50%,
      var(--background-primary) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
  }

  &.upcoming-items {
    height: 35em;
  }
}

.pane .formattedText > .wrapper {
  overflow: visible;
}

.cke_toolbar:has(.cke_button__seqta-align-left) {
  overflow: visible !important;

  .cke_toolgroup {
    position: relative;
    display: inline-block;
    min-width: 32px;

    .cke_button {
      position: absolute;
      top: 0;
      left: 0;
      visibility: hidden;
      z-index: 100;
      width: 32px;
      margin: 0;
      border: none !important;
      border-radius: 8px !important;
      transition:
        transform 0.2s ease-out,
        visibility 0s linear,
        background 0.3s ease,
        border-radius 0.3s ease !important;

      &:first-child {
        visibility: visible !important;
        z-index: 101;
      }

      &.cke_button_on {
        visibility: visible;
        position: absolute;
        transition: transform 0.3s ease;
        z-index: 101;

        & + .cke_button:first-child {
          z-index: 100;
        }
      }

      .cke_button_icon {
        margin: 0 !important;
      }
    }

    &:before {
      content: "";
      position: absolute;
      top: -4px;
      left: -4px;
      right: -4px;
      bottom: calc(-300% - 10px);
      border-radius: 16px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      background: var(--background-primary) !important;
      z-index: 100;
      transform: scale(0.65, 0.2);
      transform-origin: 50% 6px;
      visibility: hidden;
      transition: all 0.2s ease-out;
    }

    &:hover {
      &:hover:before {
        transform: scale(1);
        border-radius: 16px;
        visibility: visible;
      }
      .cke_button {
        visibility: visible;
        transition-delay: 0s;

        &:first-child {
          transform: translateY(0);
          border-top-left-radius: 12px !important;
          border-top-right-radius: 12px !important;
        }
        &:nth-child(2) {
          transform: translateY(calc(100% + 2px));
        }
        &:nth-child(3) {
          transform: translateY(calc(200% + 4px));
        }
        &:nth-child(4) {
          transform: translateY(calc(300% + 6px));
        }
        &:nth-child(5) {
          transform: translateY(calc(400% + 6px));
        }
        &:nth-child(6) {
          transform: translateY(calc(500% + 6px));
        }
        &:last-child {
          border-bottom-left-radius: 12px !important;
          border-bottom-right-radius: 12px !important;
        }
      }
    }

    &:not(:hover)
      .cke_button:not(.cke_button_on):not(
        .cke_button__seqta-align-left:first-child
      ) {
      transform: translateY(0);
      visibility: hidden;
      transition:
        transform 0.3s ease,
        visibility 0s linear 0.3s;
    }
  }
}

.noscroll * {
  -ms-overflow-style: none;
  scrollbar-width: none !important;
}

#menu ul {
  -ms-overflow-style: none;
  scrollbar-width: none !important;
}

/* Fix SEQTA update: ul.logo-link covers sidebar and causes page reload on empty space clicks */
#menu ul.logo-link {
  pointer-events: none;

  /* Re-enable clicks on menu items while sidebar editing swaps built-in items to <section> */
  li,
  section {
    pointer-events: auto;
  }
}

.notice-unified-content.notice-modal-state {
  border: none !important;
}

.notice-unified-content.notice-card-state:not([data-transitioning]) {
  cursor: pointer;

  &:hover {
    background: var(--background-secondary) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.notice-badge {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.notice-staff {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.notice-preview {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notice-modal-transition {
  position: fixed;
  z-index: 10001;
  transition: none;
}

.notice-modal-content {
  background: var(--background-primary);
  border-radius: 16px;
  max-width: 600px;
  max-height: 90vh;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);

  &.notice-transitioning {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    position: relative;
  }
}

.notice-unified-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-primary);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-shadow: none !important;
  }

  .notice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
    margin-bottom: 12px;
    gap: 16px;
  }

  .notice-content-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin: 0 0 12px !important;
    line-height: 1.3 !important;
    flex-shrink: 0;
  }

  .notice-content-body {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    flex: 1;
    display: block;
    min-width: 0;
    width: 100%;
  }

  &.notice-card-state {
    .notice-content-body {
      overflow: hidden;
      max-height: 3em;
    }
  }

  &.notice-modal-state {
    .notice-close-btn {
      opacity: 1;
    }

    .notice-content-body {
      overflow-y: auto;
      min-height: 0;

      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-track {
        background: transparent;
      }

      &::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
      }

      &::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
      }

      p {
        margin-bottom: 12px;

        &:last-child {
          margin-bottom: 0;
        }
      }

      a {
        color: var(--theme-primary);
        text-decoration: none;

        &:hover {
          text-decoration: underline;
        }
      }

      ul,
      ol {
        margin: 12px 0;
        padding-left: 20px;
      }

      li {
        margin-bottom: 4px;
      }
    }
  }
}

.dark .notice-unified-content {
  color: white;
}

.notice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.notice-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

button.notice-close-btn {
  position: absolute !important;
  font-size: 20px !important;
  top: 12px;
  right: 12px;
  background: var(--background-secondary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease !important;
  flex-shrink: 0;
  opacity: 0;

  &:hover {
    background: var(--background-tertiary);
    transform: scale(1.1);
  }
}

.notice-modal-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notice-modal-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.notice-modal-staff {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.8;
}

.notice-modal-close {
  background: var(--background-secondary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  flex-shrink: 0;

  &:hover {
    background: var(--background-tertiary);
    transform: scale(1.1);
  }
}

.notice-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 20px 20px;
  line-height: 1.3;
  flex-shrink: 0;
}

.notice-modal-body {
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  p {
    margin-bottom: 12px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  a {
    color: var(--theme-primary);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  ul,
  ol {
    margin: 12px 0;
    padding-left: 20px;
  }

  li {
    margin-bottom: 4px;
  }
}

.dark {
  .notice-card {
    border-color: rgba(255, 255, 255, 0.05);

    &:hover {
      border-color: rgba(255, 255, 255, 0.1);
    }
  }

  .notice-modal-content {
    border-color: rgba(255, 255, 255, 0.05);
  }
}

@media (max-width: 768px) {
  .notice-modal-overlay {
    padding: 10px;
  }

  .notice-modal-content {
    max-height: 90vh;
  }

  .notice-modal-title {
    font-size: 20px;
    margin: 12px 16px 16px;
  }

  .notice-modal-body {
    padding: 0 16px 16px;
  }

  .notice-card {
    padding: 12px;
  }

  .notice-preview {
    font-size: 13px;
  }
}

h2.home-subtitle {
  margin: 20px;
  font-size: 20px;
  font-weight: 400;
}
