/* App/win98/css/personalize.css — Display Properties, Desktop Themes, screen savers,
   colour depth and the CRT tab. The appearance scheme (js/apps/appearance.js) sets
   the variables below on :root; every fallback is Windows 98 SE's standard look, so
   with no scheme applied nothing changes. */

/* ── scheme: sizes, fonts and the colours win98.css doesn't already take ── */
.win { padding: var(--border-pad, 3px);
  box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight), inset 0 0 0 var(--border-pad, 3px) var(--inactive-border, var(--face)); }
.win.active { box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight), inset 0 0 0 var(--border-pad, 3px) var(--active-border, var(--face)); }
.titlebar { height: var(--cap-h, 18px); font-family: var(--cap-font, var(--font)); font-size: var(--cap-size, var(--font-size, 11px)); font-weight: var(--cap-weight, bold); font-style: var(--cap-style, normal); }
.titlebar .tico, .titlebar .tico svg, .titlebar .tico img { width: min(16px, calc(var(--cap-h, 18px) - 2px)); height: min(16px, calc(var(--cap-h, 18px) - 2px)); }
.tbtn { width: var(--cap-btn-w, 16px); height: var(--cap-btn-h, 14px); }
.win.toolwin > .titlebar { height: var(--smcap-h, 15px); font-family: var(--smcap-font, var(--font)); font-size: var(--smcap-size, var(--font-size, 11px)); font-weight: var(--smcap-weight, bold); }
.menubar { height: calc(var(--menu-h, 18px) + 1px); color: var(--menu-text, var(--text)); font-family: var(--menu-font, var(--font)); font-size: var(--menu-size, var(--font-size, 11px)); font-weight: var(--menu-weight, normal); font-style: var(--menu-style, normal); }
.menu { background: var(--menu-bg, var(--face)); color: var(--menu-text, var(--text)); font-family: var(--menu-font, var(--font)); font-size: var(--menu-size, var(--font-size, 11px)); font-weight: var(--menu-weight, normal); font-style: var(--menu-style, normal); }
.menu .row { height: var(--menu-h, 18px); }
.menu .row.dis { color: var(--gray-text, var(--shadow)); }
.tip { color: var(--tip-text, #000); font-family: var(--tip-font, var(--font)); font-size: var(--tip-size, var(--font-size, 11px)); }
.msgwin .dlg .msg .txt { font-family: var(--msg-font, var(--font)); font-size: var(--msg-size, var(--font-size, 11px)); font-weight: var(--msg-weight, normal); font-style: var(--msg-style, normal); color: var(--text); }
.win ::-webkit-scrollbar, .field::-webkit-scrollbar { width: var(--scroll-w, 16px); height: var(--scroll-w, 16px); }
.win ::-webkit-scrollbar-button:single-button { width: var(--scroll-w, 16px); height: var(--scroll-w, 16px); }
.win ::-webkit-scrollbar-track, .field::-webkit-scrollbar-track { background: repeating-conic-gradient(var(--scrollbar, var(--face)) 0 25%, var(--hilight) 0 50%) 0 0 / 2px 2px; }
.dicon .lbl { font-family: var(--icon-font, var(--font)); font-size: var(--icon-size-font, var(--font-size, 11px)); font-weight: var(--icon-weight, normal); font-style: var(--icon-style, normal); }
.dicon .ico, .dicon .ico svg, .dicon .ico img { width: var(--icon-px, 32px); height: var(--icon-px, 32px); }
html.large-icons .dicon .ico, html.large-icons .dicon .ico svg, html.large-icons .dicon .ico img { width: 48px; height: 48px; }
html.large-icons .dicon { width: 86px; } html.large-icons .dicon .lbl { max-width: 86px; }
/* Effects > Smooth edges of screen fonts: Windows 98 smoothed large TrueType text only. */
html.font-smooth body { -webkit-font-smoothing: antialiased; }
html.font-smooth.bitmap-fonts body { -webkit-font-smoothing: none; }
html.font-smooth.bitmap-fonts .titlebar, html.font-smooth .dicon .lbl, html.font-smooth .fx-smooth { -webkit-font-smoothing: antialiased; }
/* Effects > Animate windows, menus and lists */
html.fx-animate .menu:not(.startmenu) { animation: w98-menu-down 45ms steps(3, end); }
html.fx-animate .menu.startmenu { animation: w98-menu-up 35ms steps(3, end); }
@keyframes w98-menu-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes w98-menu-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.w98-zoom { position: absolute; z-index: 85000; pointer-events: none; background: linear-gradient(90deg, var(--title-a1), var(--title-a2)); height: var(--cap-h, 18px); }

/* ── Display Properties ── */
.dp .tabpane { padding: 10px 12px; }
.dp fieldset { min-width: 0; }
.dp .fx-icons { width: 100%; }
.dp .row { display: flex; gap: 6px; align-items: center; }
.dp .monitor .scr.saverbox { background: #000; }
.dp .monitor .scr canvas { width: 100%; height: 100%; display: block; }
.dp .monitor .scr iframe { border: 0; width: 1000%; height: 1000%; transform: scale(.1); transform-origin: 0 0; pointer-events: none; background: #fff; }
.dp .wplist { height: 84px; }
.dp .wplist .opt svg { width: 16px; height: 16px; }
.dp .ap-sample { height: 166px; position: relative; overflow: hidden; background: var(--appwork); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); padding: 2px; margin-bottom: 8px; }
.dp .ap-sample .ap-desk { position: absolute; inset: 2px; background: var(--desktop); }
.dp .ap-sample .win { pointer-events: auto; }
.dp .ap-sample .win .body { background: var(--face); }
.dp .ap-sample .menubar span { padding: 1px 6px; }
.dp .ap-sample .menubar span.ap-sel { background: var(--sel-bg); color: var(--sel-text); }
.dp .ap-sample .menubar span.ap-dis { color: var(--gray-text, var(--shadow)); }
.dp .ap-sample .ap-text { flex: 1; margin: 2px; padding: 2px 4px; background: var(--window-bg); color: var(--window-text); display: flex; justify-content: space-between; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.dp .ap-sample .ap-sb { width: var(--scroll-w, 16px); align-self: stretch; background: repeating-conic-gradient(var(--scrollbar, var(--face)) 0 25%, var(--hilight) 0 50%) 0 0 / 2px 2px; display: flex; flex-direction: column; justify-content: space-between; }
.dp .ap-sample .ap-sb i { display: block; height: var(--scroll-w, 16px); background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.dp .ap-grid { display: grid; grid-template-columns: 1fr 44px 46px 46px; gap: 3px 6px; align-items: end; }
.dp .ap-grid label { display: block; }
.dp .ap-grid input[type=number] { width: 44px; height: 21px; }
.dp .ap-grid.font { grid-template-columns: 1fr 44px 46px 24px 24px; }
.dp .dis { color: var(--gray-text, var(--shadow)); }
.dp .colbtn { min-width: 0; width: 46px; padding: 0 3px; display: flex; align-items: center; gap: 3px; }
.dp .colbtn .sw { width: 22px; height: 11px; border: 1px solid #000; }
.dp .colbtn .arr { border: 3px solid transparent; border-top: 4px solid currentColor; margin-top: 3px; }
.dp .bibtn { min-width: 0; width: 24px; padding: 0; }
.dp .fx-icons { display: flex; gap: 6px; height: 74px; padding: 4px; overflow-x: auto; }
.dp .fx-icons .ic { width: 74px; flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dp .fx-icons .ic .ico, .dp .fx-icons .ic svg { width: 32px; height: 32px; }
.dp .fx-icons .ic.sel .lbl { background: var(--sel-bg); color: var(--sel-text); }
.dp .colorbar { height: 12px; margin-top: 4px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.dp input[type=range] { width: 100%; }
.crt-grid { display: grid; grid-template-columns: 96px 1fr 34px; gap: 4px 8px; align-items: center; }

/* colour picker popup (the 20 swatches + Other…) */
.w98-swatches { position: absolute; z-index: 90010; padding: 4px; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); display: grid; grid-template-columns: repeat(4, 18px); gap: 3px; }
.w98-swatches .sw { width: 18px; height: 16px; border: 1px solid #000; box-shadow: 0 0 0 1px var(--face); }
.w98-swatches .sw.on { outline: 1px dotted #000; outline-offset: 1px; }
.w98-swatches .btn { grid-column: 1 / -1; min-width: 0; margin-top: 3px; }
.w98-colordlg .cd-basic { display: grid; grid-template-columns: repeat(8, 20px); gap: 4px; }
.w98-colordlg .cd-basic .sw { width: 20px; height: 16px; border: 1px solid #000; }
.w98-colordlg .cd-basic .sw.on { outline: 1px solid #000; outline-offset: 1px; }
.w98-colordlg .cd-spec { width: 175px; height: 151px; position: relative; background: linear-gradient(to bottom, transparent, #808080), linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.w98-colordlg .cd-lum { width: 12px; height: 151px; }
.w98-colordlg .cd-cross { position: absolute; width: 15px; height: 15px; margin: -7px 0 0 -7px; pointer-events: none; background: linear-gradient(#000, #000) center / 15px 3px no-repeat, linear-gradient(#000, #000) center / 3px 15px no-repeat; mix-blend-mode: difference; }
.w98-colordlg .cd-out { width: 40px; height: 30px; border: 1px solid #000; }
.w98-colordlg input[type=number] { width: 42px; height: 21px; }

/* Pattern dialog / Pattern Editor */
.w98-pattern .pe-grid { display: grid; grid-template-columns: repeat(8, 9px); grid-template-rows: repeat(8, 9px); width: 74px; height: 74px; gap: 0; border: 1px solid #000; background: var(--desktop); cursor: var(--cur-default, default); }
.w98-pattern .pe-grid i { border-right: 1px solid transparent; border-bottom: 1px solid transparent; }
.w98-pattern .pe-grid i.on { background: #000; }
.w98-pattern .pe-sample { width: 74px; height: 64px; border: 1px solid #000; }
.w98-pattern .listbox { height: 112px; width: 150px; }

/* Screen saver password / Change Password */
.w98-saverlock { position: fixed; inset: 0; z-index: 196500; display: flex; align-items: center; justify-content: center; background: transparent; }

/* Screen-saver host: canvas, or the Channel page */
#saver iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
#saver .flywin { position: absolute; }

/* ── colour depth: SVG filters on the screen (js/crt.js) ── */
#screen.depth-filter { filter: var(--depth-filter); }

/* ── CRT overlay (Advanced > CRT, a Modex 98 extra) ── */
#crt { position: fixed; pointer-events: none; z-index: 199000; display: none; }
#crt.on { display: block; }
#crt > div { position: absolute; inset: 0; }
#crt .crt-scan { background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--crt-line) * .5), rgba(0,0,0,var(--crt-scan)) calc(var(--crt-line) * .5), rgba(0,0,0,var(--crt-scan)) var(--crt-line)); }
#crt .crt-vig { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,var(--crt-vig)) 100%); }
#crt .crt-curve { border-radius: var(--crt-radius); box-shadow: 0 0 0 40px #000, inset 0 0 calc(var(--crt-radius) * 1.4) rgba(0,0,0,calc(var(--crt-curve) * .9)), inset 0 0 2px rgba(255,255,255,calc(var(--crt-curve) * .25)); }
#crt .crt-curve::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse 80% 60% at 30% 18%, rgba(255,255,255,calc(var(--crt-curve) * .07)), transparent 60%); }
#crt .crt-noise { opacity: var(--crt-noise); background-size: 128px 128px; mix-blend-mode: overlay; }
#crt .crt-flick { background: #000; opacity: 0; animation: crt-flicker 120ms steps(2, end) infinite; }
@keyframes crt-flicker { 0% { opacity: 0; } 50% { opacity: var(--crt-flick); } 100% { opacity: 0; } }
#crt .crt-glow { mix-blend-mode: screen; opacity: var(--crt-glow); background: radial-gradient(ellipse at center, rgba(120,170,255,.25), transparent 70%); }

/* ── Desktop Themes ── */
.w98-themes .dlg { height: 100%; }
.w98-themes .th-top { display: flex; gap: 6px; align-items: center; }
.w98-themes .th-top select { flex: 1; }
.w98-themes .th-main { display: flex; gap: 8px; flex: 1; min-height: 0; }
.w98-themes .th-preview { flex: 1; position: relative; overflow: hidden; background: #008080; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.w98-themes .th-preview .th-desk { position: absolute; inset: 2px; background-position: center; }
.w98-themes .th-preview .th-ico { position: absolute; width: 70px; display: flex; flex-direction: column; align-items: center; color: #fff; text-align: center; }
.w98-themes .th-preview .th-ico .i { width: 32px; height: 32px; }
.w98-themes .th-preview .th-ico .i svg { width: 32px; height: 32px; }
.w98-themes .th-side { width: 120px; display: flex; flex-direction: column; gap: 6px; }
.w98-themes .th-side .btn { min-width: 0; width: 100%; }
.w98-themes .th-settings { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px 10px; }
