@font-face {
  font-family: "PixelFont";
  src: url("./3x7%20Pixel(1).ttf") format("truetype");
}

.window {
  position: absolute;
  background: #111827;
  font-family: "PixelFont", monospace;

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #828282;
  pointer-events: none;
  z-index: 1;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;

  width: 16px;
  height: 16px;

  cursor: nwse-resize;

  background: transparent;
  z-index: 10;
}

.titlebar span {
  display: block;
  line-height: 1;
  transform: translateY(6px);
}

.titlebar {
  height: 28px;
  background: #1e40af;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: move;
  outline: 3px solid #1e40af;
  outline-offset: -3px;
  position: relative;
  flex: 0 0 28px;
  z-index: 2;
}

.titlebar-buttons {
  position: absolute;
  right: 0;
  top: 0;

  display: flex;
  gap: 0;
}

.title-button {
  margin: 0;
  padding: 0;

  width: 28px;
  height: 28px;

  border: none;
  border-radius: 0;

  background: transparent;
  color: inherit;

  appearance: none;
  -webkit-appearance: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.title-button img {
  width: 70%;
  height: 70%;

  image-rendering: pixelated;
  filter: invert(1);
}

.title-button.close:hover {
  background: #ef4444;
}

.title-button.minimise:hover {
  background: #7dd3fc;
}

.title-button:hover {
  background: #60a5fa;
}

.window-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.window-content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
}

.window-scroll-viewport {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.window-scroll-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.window-scroll-content {
  flex: 1;
  min-height: 0;
  display: flex;
}

.window-scrollbar {
  width: 14px;
  flex: 0 0 14px;
  position: relative;
  background: #8a8a8a;
  border-left: 2px solid #828282;
  display: flex;
  justify-content: center;
}

.window-scrollbar-track {
  position: absolute;
  inset: 0;
  background: #8a8a8a;
}

.window-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 50%;

  width: 100%;
  height: var(--thumb-height, 40px);

  background: url("./scrollBarThumb.png") center center / 100% 100% no-repeat;

  image-rendering: pixelated;

  transform: translateX(-50%) translateY(var(--thumb-offset, 0px));

  will-change: transform;
}

.window-content iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}

.window-scroll-content p {
  margin: 0;
}

.window-scroll-content {
  display: flex;
  flex: 1;
}

.window-scroll-content iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}