:root {
  --appbar-height: 44px;
}

html,
body {
  overscroll-behavior: none; /* block pull-to-refresh on mobile */
}

body {
  margin: 0;
}

a {
  cursor: pointer;
}

.bios-menu,
.boot-screen {
  display: flex;
  height: 100%;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  background: black;
  user-select: none;
  overflow-y: hidden;
}
.bios-logo,
.boot-logo {
  bottom: 0;
  right: 12px;
  height: 120px;
  image-rendering: pixelated;
}

.bios-menu {
  flex-direction: column;
  color: white;
  background-color: #0000aa;
  letter-spacing: 1px;
  word-break: break-word;
}
.bios-menu-title {
  text-align: center;
  padding: 8px;
}
.bios-menu-contents {
  border: 2px solid white;
  padding: 2px;
  margin: 4px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.bios-menu-opts {
  display: flex;
  color: #ffff55;
}
.bios-menu-opts-inner {
  border: 2px solid white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 0 50%;
  gap: 1em 0;
}
.bios-menu-opt {
  display: flex;
  gap: 8px;
  cursor: pointer;
}
.bios-menu-opt-disabled {
  color: rgb(132, 133, 132, 0.8);
  cursor: default;
}
.bios-menu-opt-selected {
  color: white;
  background-color: #aa0000;
  box-shadow: 0 2px 1px -1px black;
}
.bios-menu-opt-menu {
  opacity: 1;
}
.bios-menu-opt-nomenu {
  visibility: hidden;
}
.bios-menu-opt-text {
  opacity: 1;
}
.bios-menu-opt-subtext {
  font-weight: bold;
  letter-spacing: normal;
  white-space: nowrap;
}
.bios-menu-legend {
  border: 2px solid white;
  display: flex;
}
.bios-menu-legend-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 0 50%;
}
.bios-menu-legend-item {
  opacity: 1;
}
.bios-menu-footer {
  color: #ffff55;
  border: 2px solid white;
  flex-grow: 1;
  position: relative;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bios-logo {
  position: absolute;
}
.bios-menu-fade {
  transition: opacity 1s ease-out;
  opacity: 0.25;
}
@media only screen and (max-width: 414px) {
  .bios-menu {
    font-size: 0.86em;
  }
  .bios-menu-title {
    font-size: 0.86em;
  }
  .bios-menu-footer {
    justify-content: left;
  }
}

.boot-screen {
  cursor: none;
}
.boot-logo {
  position: fixed;
}
.boot-term,
.boot-cursor {
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.2;
  color: white;
}
.boot-term {
  padding: 4px;
  white-space: pre;
}
.boot-cursor::after {
  content: "_";
  animation: blinking-cursor 300ms step-start infinite;
}
@keyframes blinking-cursor {
  50% {
    opacity: 0;
  }
}
.boot-splash {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  background-image: url(win/boot.gif);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

body,
input,
select {
  font-family: "ms_sans_serif", Arial, Helvetica, sans-serif !important;
}
.container {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: teal url(win/clouds.png) no-repeat;
  background-position: center;
  background-size: cover;
}
.container.loading {
  cursor: progress !important;
}
.desktop {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: calc(100% - var(--appbar-height));
}
.desktop-inner {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 4px;
  height: calc(100% - 8px);
  width: calc(100% - 8px);
  gap: 16px;
  position: relative;
}
.desktop-entry {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.desktop-entry-text-box {
  margin-top: 4px;
  padding: 2px;
  background: #7b7d7b;
  color: white;
}
.desktop-entry-selected .desktop-entry-text-box {
  background: #000080;
}
.desktop-entry-text {
  max-width: 82px;
  font-size: 0.86em;
  line-height: 1;
  text-align: center;

  /* limit to 3 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis; /* not technically needed */
}
.desktop-icon-overlay {
  position: absolute;
}
.desktop-icon-selected {
  /* #000080 */
  filter: brightness(0) saturate(100%) invert(10%) sepia(100%) saturate(7341%)
    hue-rotate(247deg) brightness(50%) contrast(126%);
  opacity: 0.5;
}
.desktop-drag-rect {
  position: absolute;
  border: 1px dotted #ffffff;
  box-sizing: border-box;
  mix-blend-mode: exclusion;
  z-index: 1;
  pointer-events: none;
}

.desktop-context-menu {
  user-select: none;
}
.desktop-context-menu li {
  height: 20px;
  font-size: 0.86em;
  padding: 4px 20px;
}
.desktop-context-submenu li {
  padding: 0 32px;
  margin: 2px 0;
}
.desktop-context-menu-separator {
  margin: 4px 0 !important;
}
.desktop-context-menu-arrow::after {
  content: "▸";
  font-size: 1.1rem;
  position: absolute;
  top: -3px;
  right: 3px;
}
.desktop-context-submenu-container {
  position: absolute;
  top: -2px;
}
.desktop-context-submenu-container.right {
  left: calc(100% - 2px);
}
.desktop-context-submenu-container.left {
  right: calc(100% - 2px);
}
.desktop-context-submenu-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  left: 4px;
}

.ellipsis {
  text-overflow: ellipsis;
  overflow-x: hidden;
  white-space: nowrap;
}

.window {
  min-height: 150px !important;
  position: fixed !important;
  max-width: 96vw;
}
.window.maximized {
  height: calc(100% - var(--appbar-height));
  width: 100%;
  max-width: initial;
  transform: none !important;
}
.window.minimized {
  display: none !important;
}
.window-modal {
  box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.7);
}
.window-inner {
  height: 100%;
  max-width: inherit;
  display: flex !important;
  flex-direction: column;
}
.window-inner.maximized {
  width: 100% !important;
}
.window-header {
  height: 24px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}
.window-header-icon {
  height: 19px;
  width: 19px;
  padding-right: 6px;
  user-select: none;
}
.window-header-title {
  width: 100%;
  font-size: 0.86em;
  user-select: none;
}
.window-header-buttons {
  display: flex;
  gap: 2px;
}
.window-toolbar {
  height: 26px;
}
.window-toolbar li {
  padding: 0 26px !important;
}
.window-toolbar-button {
  border: none !important;
  padding-top: 0 !important;
}
.window-toolbar-active-button {
  color: white !important;
  background: #060084 !important;
}
.window-toolbar-list-checkmark::before {
  content: "\2713";
  font-size: 0.8rem;
  font-weight: bold;
  position: absolute;
  margin-left: -18px;
}
.window-toolbar-list-arrow::after {
  content: "▸";
  font-size: 1.1rem;
  position: absolute;
  right: 3px;
}
.window-content {
  display: flex;
  flex: 1 1 auto;
  overflow: auto;
}
.window-footer {
  width: 100%;
  padding: 0 4px;
  height: 24px;
  overflow-y: hidden;
}

.prompt-content,
.alert-content {
  display: flex;
  user-select: none;
  gap: 16px;
}
.prompt-content {
  padding: 16px 12px;
}
.alert-content {
  align-items: center;
  padding: 16px 12px 8px;
}
.prompt-radio-vertical {
  display: flex;
  flex-direction: column;
  margin: 12px 0;
}
.prompt-content-radio {
  margin: 4px 0 !important;
  font-size: 0.86rem !important;
}
.alert-text {
  font-size: 0.86em;
}

.small-icon {
  width: 24px;
  height: 24px;
}
.large-icon {
  width: 32px;
  height: 32px;
}
.xlarge-icon {
  width: 40px;
  height: 40px;
}
.icon,
.small-icon,
.large-icon,
.xlarge-icon {
  image-rendering: pixelated;
}

/* close-icon CSS modified from react95 */
.close-button,
.maximize-button,
.minimize-button {
  height: 21px !important;
  width: 23px !important;
}
.close-button::after,
.maximize-button::after,
.minimize-button::after {
  outline: none !important;
}
.close-icon,
.maximize-icon,
.minimize-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: -1px;
  margin-top: -1px;
  position: relative;
}
.close-icon {
  transform: rotateZ(45deg);
}
.close-icon:before,
.close-icon:after {
  content: "";
  position: absolute;
  background: rgb(10, 10, 10);
}
.close-icon:before {
  height: 100%;
  width: 3px;
  left: 50%;
  transform: translateX(-50%);
}
.close-icon:after {
  height: 3px;
  width: 100%;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
}
.maximize-icon:after {
  content: "";
  position: absolute;
  border: 3px solid black;
  border-top: 4px solid black;
  height: 7px;
  width: 9px;
  left: 1px;
  top: 1px;
}
.disabled .maximize-icon:after {
  border-color: #7b7d7b;
}
.minimize-icon:after {
  content: "";
  position: absolute;
  background: rgb(10, 10, 10);
  height: 3px;
  width: calc(100% - 6px);
  left: 3px;
  bottom: 2px;
}
.disabled .close-icon:before,
.disabled .close-icon:after,
.disabled .minimize-icon:after {
  background: #7b7d7b;
}

.button-menu-container {
  position: relative;
  display: flex;
  padding-right: 4px;
}
.button-menu {
  position: absolute !important;
  left: 0;
  z-index: 9999;
}
.button-menu-up {
  bottom: 100%;
  margin-left: -4px;
}
.button-menu-down {
  top: 100%;
}
.button-menu > li {
  display: block;
  text-align: left;
  padding-right: 1rem;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.start-menu {
  padding-left: 26px !important;
}
.start-menu::before {
  content: "Windows95";
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1.05;
  color: #bdbebd;
  transform: rotate(-180deg);
  writing-mode: vertical-lr;
  position: absolute;
  background: #7b7d7b;
  height: calc(100% - 8px);
  margin-left: -26px;
  bottom: 4px;
  left: 29px;
}
.start-menu-button {
  height: 32px !important;
  font-weight: bold;
}
.start-menu-icon {
  margin-right: 4px;
}
.start-menu-item {
  width: 246px !important;
  height: 41px !important;
  overflow-y: hidden;
  display: flex !important;
  align-items: center !important;
  justify-content: left !important;
  user-select: none;
}
.start-menu-item-icon {
  margin-right: 12px;
}
.start-menu-item-text {
  font-size: 0.9rem;
}
.start-menu-caret {
  position: absolute;
  right: 3px;
}
.start-menu-caret::after {
  content: "▸";
  font-size: 1.1rem;
}
.start-submenu-container {
  position: fixed !important;
  left: 270px;
  z-index: 10000;
}
.start-submenu {
  position: absolute !important;
  bottom: -28px;
}
.start-submenu-item {
  height: 26px !important;
}
.start-submenu-item-text {
  font-size: 0.86rem;
}
.start-submenu-item-empty {
  width: 100%;
  text-align: center;
  -webkit-text-fill-color: black;
  color: black;
}
@media only screen and (max-width: 414px) {
  .start-menu-item {
    max-width: 140px;
  }
  .start-menu-text {
    display: none;
  }
  .start-menu .large-icon {
    width: 24px;
    height: 24px;
  }
  .start-submenu .small-icon {
    width: 18px;
    height: 18px;
  }
  .start-submenu-container {
    left: 166px;
  }
}

.appbar {
  position: relative !important;
  z-index: 999;
  height: var(--appbar-height);
}
.appbar-window-button-container {
  display: flex;
  width: 100%;
  padding-left: 2px;
  padding-right: 16px;
}
.appbar-window-button {
  flex: 1 1 0;
  max-width: 200px;
  height: 32px !important;
  width: 0 !important;
  justify-content: left !important;
  margin: 0 2px;
  padding: 0 8px !important;
}
.appbar-window-button-title {
  padding-top: 2px;
}
.appbar-window-button-title-active {
  font-weight: bold;
}
@media only screen and (max-width: 414px) {
  .appbar-window-button {
    max-width: 40px;
    justify-content: center !important;
  }
  .appbar-window-button-title {
    display: none;
  }
  .appbar-window-button .window-header-icon {
    padding-right: 0;
  }
}

.appbar-dock {
  display: flex !important;
  align-items: center;
  justify-content: right;
  padding: 0 12px 0 4px;
  line-height: 1.9;
  cursor: default;
  user-select: none;
}
.appbar-dock span {
  font-size: 0.9rem;
  padding-left: 12px;
  white-space: nowrap;
}

.alert-button-container,
.window-footer-button-container {
  display: flex;
  align-items: center;
  padding: 14px;
  gap: 6px;
}
.alert-button-container {
  justify-content: center;
}
.window-footer-button-container {
  justify-content: right;
}
.prompt-button {
  min-width: 64px !important;
}
.choice-button {
  min-width: 96px !important;
}

.notepad-textfield > textarea,
.notepad-print {
  font-family: "Lucida Console", Lucida, "Courier New", Courier, monospace;
  white-space: pre-wrap;
}
.notepad-textfield > textarea {
  min-height: 480px;
  overflow: scroll;
}
.notepad-textfield-nowrap > textarea {
  white-space: pre;
}

/* for printing from Notepad */
#printing-only {
  display: none;
}
@media print {
  #printing-only {
    display: block !important;
    word-wrap: break-word;
  }
  .printing-hidden {
    display: none;
  }
}

.iexplore-content,
.iexplore-icon-toolbar-left,
.iexplore-iframe-container {
  display: flex !important;
  flex: 1 1 auto !important;
}
.iexplore-content {
  flex-direction: column;
}
.iexplore-toolbar2 {
  margin: 2px !important;
  padding: 0 !important;
}
.iexplore-icon-toolbar {
  display: flex;
  flex-direction: row;
}
.iexplore-icon-toolbar-left {
  align-items: center;
  margin: 2px 2px 2px 4px;
}
.iexplore-icon-toolbar-right {
  display: flex;
  background: black;
}
.iexplore-icon-toolbar-button {
  flex-direction: column;
  height: 42px !important;
  font-size: 0.86em !important;
  gap: 4px;
  height: 100% !important;
}
.iexplore-icon-toolbar-icon {
  background-image: url(icons/iexplore-toolbar-icons.png);
  width: 20px;
  height: 20px;
  transform: scale(1.2);
  filter: grayscale(1);
}
.iexplore-icon-toolbar-icon-menu.iexplore-icon-toolbar-icon {
  margin-right: 8px;
}
.iexplore-icon-toolbar-icon-menu.iexplore-icon-toolbar-icon::after {
  content: "▾";
  font-size: 1.1rem;
  position: absolute;
  right: -14px;
}
.iexplore-icon-toolbar-button:hover .iexplore-icon-toolbar-icon {
  filter: none;
}
.iexplore-icon-toolbar-logo {
  width: 42px;
  height: 42px;
  padding: 4px;
}
.iexplore-addressbar {
  display: flex;
  flex-direction: row;
  padding: 4px 0;
}
.iexplore-addressbar-section {
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 0.86em;
  user-select: none;
}
.iexplore-addressbar-form {
  width: 100%;
}
.iexplore-iframe {
  flex: 1 1 auto;
}
.iexplore-status {
  display: flex;
  flex-direction: row;
  height: 24px;
  user-select: none;
}
.iexplore-status-left {
  flex: 1 1 auto;
  padding: 0 4px;
  font-size: 0.86em !important;
  margin: 1px;
}
.iexplore-status-mid {
  width: 128px;
  margin: 1px;
}
.iexplore-status-right {
  width: 84px;
  margin: 1px;
}
.iexplore-status-icon {
  height: 100%;
}
.iexplore-prompt-text {
  font-size: 0.92em !important;
  line-height: 1.4;
}

.help-frame {
  margin-top: 0;
  padding: 1rem;
  width: 100%;
  background: rgb(255, 255, 223) !important;
}

/* https://stackoverflow.com/a/54702294 */
.rainbow-text {
  background: linear-gradient(
    to right,
    #6666ff,
    #0099ff,
    #00ff00,
    #ff3399,
    #6666ff
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-animation 6s linear infinite;
  background-size: 400% 100%;
}
@keyframes rainbow-animation {
  0%,
  100% {
    background-position: 0 0;
  }
  50% {
    background-position: 100% 0;
  }
}

.faq-frame {
  min-height: 100%;
  height: 400px;
  overflow-y: auto;
  background-color: rgb(198, 198, 198) !important;
}
.faq-contents {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 16px;
  font-size: 0.94em;
  white-space: pre-wrap;
}
.faq-title {
  font-weight: bold;
  text-align: center;
}
.faq-heading {
  font-weight: bold;
  padding-top: 0.4em;
}
.faq-indented {
  margin-left: 4em;
  padding: 0.3em 0;
}
.faq-italic {
  font-style: italic;
}
.faq-underline {
  text-decoration: underline;
}
.faq-link {
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}
.faq-contents ul,
.faq-contents li {
  list-style-type: unset;
}
.faq-contents ul {
  padding-left: 10px;
  margin-left: 5px;
}
.faq-answer > br {
  display: block;
  margin: 4px 0;
}
