
html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
}
/* ===== Classic Windows 98 Start menu ===== */
.start-menu {
	position: absolute !important;
	left: 2px;
	bottom: 25px;
	width: auto;
	height: auto;
	min-height: 0;
	max-height: calc(100vh - 26px);
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	padding: 3px;
	font-family: "MS Sans Serif", Tahoma, sans-serif;
	font-size: 11px;
}
/* Vertical branded side banner */
.start-menu-banner {
	flex: 0 0 auto;
	width: 22px;
	align-self: stretch;
	background: linear-gradient(to top, #08007a 0%, #000080 55%, #1084d0 100%);
	position: relative;
	overflow: hidden;
}
.start-menu-banner span {
	position: absolute;
	left: 0;
	bottom: 6px;
	width: 22px;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	transform-origin: center;
	color: #c0c0c0;
	font-family: Arial, "Helvetica Neue", sans-serif;
	font-weight: bold;
	font-size: 15px;
	letter-spacing: 1px;
	text-align: left;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
	white-space: nowrap;
	user-select: none;
}
/* Main single column of items */
.start-menu-list {
	flex: 1 1 auto;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 180px;
	background: var(--ButtonFace);
}
.start-menu-list > li {
	position: relative;
}
.start-menu-list > li > a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 24px 4px 6px;
	min-height: 32px;
	box-sizing: border-box;
	text-decoration: none;
	color: var(--WindowText) !important;
	font-size: 12px;
	white-space: nowrap;
}
.start-menu-list > li > a img {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
}
.start-menu-list > li > a .label {
	flex: 1 1 auto;
}
/* Submenu (flyout) parent arrow */
.start-menu .has-submenu > a::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 4px 0 4px 5px;
	border-color: transparent transparent transparent var(--WindowText);
	transform: translateY(-50%);
}
.start-menu .has-submenu:hover > a::after,
.start-menu .has-submenu.open > a::after {
	border-left-color: var(--HilightText, #fff);
}
/* Highlight on hover / keyboard / open */
.start-menu-list > li > a:hover,
.start-menu-list > li > a:focus,
.start-menu .has-submenu:hover > a,
.start-menu .has-submenu.open > a {
	background: var(--Hilight, #000080);
	color: var(--HilightText, #fff) !important;
	outline: none;
}
/* Flyout submenus */
.start-submenu {
	display: none;
	position: absolute;
	left: 100%;
	bottom: -3px;
	min-width: 170px;
	list-style: none;
	margin: 0;
	padding: 3px;
	background: var(--ButtonFace);
	color: var(--WindowText);
	box-shadow: 1px 1px 0 var(--ButtonShadow);
	border-top: 1px solid var(--ButtonHilight);
	border-left: 1px solid var(--ButtonHilight);
	border-right: 1px solid var(--ButtonDkShadow, #000);
	border-bottom: 1px solid var(--ButtonDkShadow, #000);
	outline: 1px solid var(--ButtonShadow);
	z-index: 5002;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}
.start-menu .has-submenu:hover > .start-submenu,
.start-menu .has-submenu.open > .start-submenu {
	display: block;
}
.start-submenu li {
	position: relative;
}
.start-submenu a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 3px 18px 3px 6px;
	text-decoration: none;
	color: var(--WindowText) !important;
	font-size: 12px;
	white-space: nowrap;
}
.start-submenu a img {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}
.start-submenu a:hover,
.start-submenu a:focus {
	background: var(--Hilight, #000080);
	color: var(--HilightText, #fff) !important;
	outline: none;
}
/* Groove separators */
.start-menu .start-menu-sep {
	height: 0;
	margin: 3px 2px;
	padding: 0;
	border-top: 1px solid var(--ButtonShadow);
	border-bottom: 1px solid var(--ButtonHilight);
	pointer-events: none;
}
.start-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.desktop {
	height: 100%;
	display: flex;
}
.folder-view {
	position: relative;
	flex: 1;
	overflow: auto;
}
.desktop .folder-view {
	overflow: hidden;
}
.taskbar {
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 0;
	right: 0;
	height: 27px; /* not including outline part of border */
	display: flex;
	flex: 1;
}
/* .taskbar-button is generally .task or .start-button for now */
.taskbar button,
.taskbar-divider,
.tray {
	margin: 2px;
}
.taskbar-divider {
	margin-right: 0px;
	margin-left: 0px;
	/* TODO: maybe make that 2px rule padding on the taskbar instead and avoid resetting this */
}
.taskbar button {
	line-height: 14px;
	padding: 2px;
	overflow: hidden; /* TODO: If tons and tons of tasks don't show icons? (smaller than width of an icon?) */
	display: flex;
	flex-direction: row;
	align-items: center;
	/* (justify-content: flex-start;) */
}
.taskbar button .title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.taskbar .start-button {
	flex-shrink: 0;
	padding: 2px 4px;
}
.tray {
	display: flex;
	flex-direction: row;
	/* align-items: center; */
	/* align-content: center; */
	/* justify-content: center; */
	line-height: 22px;
	box-sizing: border-box;
	vertical-align: middle;
}
.tray-icons {
	display: flex;
	align-items: center;
	margin-left: 2px; /* XXX basically 1px, but 2px because of the way the border is done */
}
.tray-icon {
	margin-left: 1px;
}
.taskbar-time {
	width: 60px;
	text-align: center;
}
/* TODO: offset task button contents down a px when depressed... actually most buttons */
.tasks {
	display: flex;
	flex: 1;
	height: 100%;
	min-width: 0; /* reset implicit min-width from flexbox */
}
.task {
	max-width: 200px;
	width: 50%;
	text-align: left;
}
.task img {
	padding-right: 4px;
	flex: 0 0 auto;
}
.desktop,
.folder-view,
.taskbar,
.start-button,
.tasks,
.task,
.os-window,
.window-titlebar,
.window-title {
	user-select: none;
	-o-user-select: none;
	-ms-user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
}
.os-window {
	display: flex;
	flex-direction: column;
}
.window-titlebar .icon {
	vertical-align: bottom;
}
.window-content {
	margin: 0;
	padding: 0;
	flex: 1;
}
.desktop-icon {
	display: inline-block;
	vertical-align: bottom; /* with inline-block, always */
	text-align: center;
}
.desktop-icon .icon-wrapper {
	display: inline-block;
	vertical-align: bottom; /* with inline-block, always */
	position: relative;
}
.desktop-icon .icon-wrapper,
.desktop-icon .icon-wrapper .selection-effect {
	width: var(--icon-size, 32px);
	height: var(--icon-size, 32px);
}
.desktop-icon .title {
	line-height: 13px;
	font-size: 9px;
	overflow: hidden;
	text-overflow: ellipsis; /* TODO: make this work with multiline text! This is apparently a limitation of this CSS property and there are various crazy CSS hacks and JS libs to solve this. */
	word-wrap: break-word; /* All browsers since IE 5.5+ */
	overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
}
.desktop-icon:not(.focused) .title {
	/* max-height: 2em would only work with line-height: 1 */
	max-height: calc(13px * 2);
}
.desktop-icon.focused {
	z-index: 1; /* for multi-line title display */
}
.desktop-icon .title input {
	display: flex;
	width: 100%;
}
/* Fix dragging things (like windows) over iframes */
.drag iframe {
	pointer-events: none;
}

.marquee {
	pointer-events: none;
}

.window-content .button-group {
	width: 85px;
}
.window-content .button-group > button {
	width: 95%;
	padding: 3px 5px;
}

.help-window .window-content {
	display: flex;
	flex-flow: column;
}
.help-window .main {
	flex: 1;
	display: flex;
	flex-flow: row;
}
.help-window .toolbar button {
	width: 55px;
	height: 40px;
	padding: 0;
}
.help-window .toolbar button span {
	display: inline-flex;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	/* flex centering + preventing overflow wrap means the font can be too big and it'll still stay centered */
	font-size: 12px;
	white-space: pre;
	justify-content: center;
}
.help-window .toolbar button {
	position: relative;
}
.help-window .toolbar button .icon {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}
.help-window .toolbar button .icon {
	background-image: url("images/help-viewer-toolbar-icons-grayscale.png");
}
.help-window .toolbar button:not([disabled]):hover .icon {
	background-image: url("images/help-viewer-toolbar-icons.png");
}
.help-window .toolbar button[disabled] .icon {
	filter: saturate(0%) opacity(50%); /* fallback */
	filter: url("#disabled-inset-filter");
}
.help-window .contents {
	background: white;
	background: var(--Window);
	color: var(--WindowText);
	flex-basis: 300px; /* normally the default is 200px, but that leaves a scrollbar and we don't have rollover viewing of longer titles (@TODO) */
	flex-grow: 0;
	flex-shrink: 0;
	overflow: auto;
}
.help-window ul {
	margin: 0;
	padding: 0;
}
.help-window li {
	display: block;
	white-space: nowrap;
}
.help-window .item {
	display: inline-block;
}
.help-window .folder:not(.expanded) ul {
	display: none;
}
.help-window iframe {
	flex: 1;
	width: 0;
}
.help-window li ul {
	padding-left: 16px;
}
.help-window li:before {
	content: "";
	display: inline-block;
	vertical-align: middle;
	width: 16px;
	height: 16px;
	background-position: 0 0;
	margin-right: 2px;
}
.help-window .folder.expanded:before {
	background-position: -16px 0;
}
.help-window .page:before {
	background-position: -32px 0;
}

::before, ::after {
	pointer-events: none;
}

.cursor-bully * {
	cursor: inherit !important;
}
.loading-program * {
	cursor: var(--cur-busy, progress);
}

#webamp-context-menu {
	z-index: 5000000 !important;
}

/* ===== Display Properties dialog (Win98 wallpaper changer) ===== */
.display-properties {
	box-sizing: border-box;
	width: 100%;
	padding: 8px 10px 0;
	font-family: "MS Sans Serif", Tahoma, sans-serif;
	font-size: 11px;
	color: var(--ButtonText, #000);
	user-select: none;
}
.display-properties .dp-tabs {
	display: flex;
	gap: 2px;
	padding-left: 3px;
	position: relative;
	z-index: 2;
}
.display-properties .dp-tab {
	font: inherit;
	color: var(--ButtonText, #000);
	padding: 3px 8px 4px;
	background: var(--ButtonFace, #c0c0c0);
	border: 1px solid;
	border-color: var(--ButtonHilight, #fff) var(--ButtonDkShadow, #000) var(--ButtonFace, #c0c0c0) var(--ButtonHilight, #fff);
	border-radius: 3px 3px 0 0;
	margin-bottom: -1px;
	cursor: default;
	white-space: nowrap;
}
.display-properties .dp-tab.selected {
	padding-top: 4px;
	padding-bottom: 6px;
	margin-top: -2px;
	z-index: 3;
}
.display-properties .dp-page-frame {
	position: relative;
	z-index: 1;
	background: var(--ButtonFace, #c0c0c0);
	border: 1px solid;
	border-color: var(--ButtonHilight, #fff) var(--ButtonDkShadow, #000) var(--ButtonDkShadow, #000) var(--ButtonHilight, #fff);
	box-shadow: inset 1px 1px 0 var(--ButtonLight, #dfdfdf), inset -1px -1px 0 var(--ButtonShadow, #808080);
	padding: 16px 16px 14px;
	min-height: 300px;
}
.display-properties .dp-monitor {
	width: 152px;
	margin: 0 auto 14px;
	text-align: center;
}
.display-properties .dp-monitor-screen {
	box-sizing: border-box;
	width: 152px;
	height: 116px;
	margin: 0 auto;
	padding: 9px 12px 16px;
	background: var(--ButtonFace, #c0c0c0);
	border-radius: 10px 10px 7px 7px;
	box-shadow:
		inset 1px 1px 0 var(--ButtonHilight, #fff),
		inset -1px -1px 0 var(--ButtonShadow, #808080),
		1px 1px 0 var(--ButtonDkShadow, #000);
}
.display-properties .dp-screen {
	width: 100%;
	height: 100%;
	background-color: #008080;
	background-position: center;
	background-repeat: no-repeat;
	box-shadow: inset 0 0 0 1px #000;
}
.display-properties .dp-screen.dp-blank {
	background: #000;
}
.display-properties .dp-monitor-stand {
	width: 58px;
	height: 9px;
	margin: 0 auto;
	background: var(--ButtonFace, #c0c0c0);
	border-radius: 0 0 5px 5px;
	box-shadow:
		inset 1px 1px 0 var(--ButtonHilight, #fff),
		inset -1px -1px 0 var(--ButtonShadow, #808080),
		1px 1px 0 var(--ButtonDkShadow, #000);
}
.display-properties .dp-label {
	margin: 4px 0 3px;
}
.display-properties .dp-listbox {
	box-sizing: border-box;
	height: 92px;
	overflow-y: auto;
	background: var(--Window, #fff);
	color: var(--WindowText, #000);
	border: 1px solid;
	border-color: var(--ButtonShadow, #808080) var(--ButtonHilight, #fff) var(--ButtonHilight, #fff) var(--ButtonShadow, #808080);
	box-shadow: inset 1px 1px 0 var(--ButtonDkShadow, #000);
	padding: 1px;
}
.display-properties .dp-list-item {
	padding: 1px 5px;
	cursor: default;
	white-space: nowrap;
}
.display-properties .dp-list-item.selected {
	background: var(--Hilight, #000080);
	color: var(--HilightText, #fff);
}
.display-properties .dp-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
}
.display-properties .dp-display-label {
	flex: 0 0 auto;
}
.display-properties .dp-display-mode {
	font: inherit;
	min-width: 110px;
}
.display-properties .dp-placeholder {
	margin: 6px 2px;
	line-height: 1.6;
	color: var(--ButtonText, #000);
}
.display-properties .dp-appearance-preview {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 4px 4px 0;
	background: var(--Background, #008080);
	font-size: 8px;
	line-height: 1.3;
	overflow: hidden;
}
.display-properties .dp-prev-title {
	background: var(--InactiveTitle, #808080);
	color: var(--InactiveTitleText, #d8d8d8);
	padding: 1px 3px;
	margin-bottom: 2px;
	font-weight: bold;
}
.display-properties .dp-prev-title.active {
	background: var(--ActiveTitle, #000080);
	color: var(--TitleText, #fff);
}
.display-properties .dp-prev-body {
	background: var(--ButtonFace, #c0c0c0);
	color: var(--WindowText, #000);
	border: 1px solid var(--WindowFrame, #000);
	padding: 4px;
}
.dp-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
	padding: 10px 10px 8px;
}
