/* 
 * Windows 98 Global Iframe Styling
 * This file should be included in all iframe applications to maintain consistency
 */

/* Global Windows 98 text selection color override for iframes */
*::selection,
*::-moz-selection {
  background-color: #000080 !important; /* Windows 98 blue */
  color: white !important;
}

/* Ensure it applies to all text elements */
html::selection,
body::selection,
div::selection,
p::selection,
span::selection,
a::selection,
input::selection,
textarea::selection,
button::selection,
label::selection,
[contenteditable]::selection {
  background-color: #000080 !important;
  color: white !important;
}

/* Mozilla Firefox specific */
html::-moz-selection,
body::-moz-selection,
div::-moz-selection,
p::-moz-selection,
span::-moz-selection,
a::-moz-selection,
input::-moz-selection,
textarea::-moz-selection,
button::-moz-selection,
label::-moz-selection,
[contenteditable]::-moz-selection {
  background-color: #000080 !important;
  color: white !important;
}

/* Override any browser default selection colors */
:root {
  --selection-background: #000080;
  --selection-color: white;
}

/* Fix dropdown/select element selection colors */
select option:checked,
select option:selected,
select option[selected] {
  background-color: #000080 !important;
  color: white !important;
}

/* Additional Windows 98 styling for consistency */
body {
  font-family: 'PixelatedMsSansSerif', 'MS Sans Serif', sans-serif !important;
  font-size: 11px !important;
  color: #000000 !important;
}

/* Remove modern browser focus outlines and replace with Windows 98 style */
*:focus {
  outline: 1px dotted #000000 !important;
  outline-offset: -1px !important;
}

/* Override input field focus to match Windows 98 */
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #000000 !important;
}

/* Windows 98 Custom Scrollbars for iframes */
::-webkit-scrollbar {
  width: 16px !important;
}

::-webkit-scrollbar:horizontal {
  height: 17px !important;
}

::-webkit-scrollbar-corner {
  background-color: #d4d0c8 !important;
}

::-webkit-scrollbar-track {
  background-image: url('/assets/svg/ui/scrollbar-background.svg') !important;
}

::-webkit-scrollbar-thumb {
  background-color: #d4d0c8 !important;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf !important;
}

::-webkit-scrollbar-button:horizontal:start:decrement,
::-webkit-scrollbar-button:horizontal:end:increment,
::-webkit-scrollbar-button:vertical:start:decrement,
::-webkit-scrollbar-button:vertical:end:increment {
  display: block !important;
}

::-webkit-scrollbar-button:vertical:start {
  height: 17px !important;
  background-image: url('/assets/svg/ui/button-up.svg') !important;
}

::-webkit-scrollbar-button:vertical:end {
  height: 17px !important;
  background-image: url('/assets/svg/ui/button-down.svg') !important;
}

::-webkit-scrollbar-button:horizontal:start {
  width: 16px !important;
  background-image: url('/assets/svg/ui/button-left.svg') !important;
}

::-webkit-scrollbar-button:horizontal:end {
  width: 16px !important;
  background-image: url('/assets/svg/ui/button-right.svg') !important;
}
