/* workspace/norrath2/style/windows.css */
/* Movable stone window frames, title bars, close boxes, the tooltip, the casting bar, the compass strip and the buff strip. */
[hidden] { display: none !important; }
.win {
  position: absolute;
  background: var(--panel);
  border: 2px solid;
  border-color: var(--panel-light) var(--panel-dark) var(--panel-dark) var(--panel-light);
  box-sizing: border-box;
  min-width: 120px;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  color: var(--text);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}
.win-title {
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  background: linear-gradient(#4c4c50, #303032);
  border-bottom: 1px solid var(--panel-dark);
  cursor: move;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: bold;
  color: var(--text);
}
.win-title-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-close {
  width: 12px;
  height: 12px;
  padding: 0;
  margin-left: 4px;
  line-height: 9px;
  font-size: 9px;
  font-weight: bold;
  background: var(--panel);
  border: 1px solid;
  border-color: var(--panel-light) var(--panel-dark) var(--panel-dark) var(--panel-light);
  color: var(--text);
  cursor: pointer;
}
.win-close:active { border-color: var(--panel-dark) var(--panel-light) var(--panel-light) var(--panel-dark); }
.win-body {
  flex: 1;
  padding: 4px;
  overflow: auto;
  position: relative;
}
.win-resizable { resize: both; overflow: hidden; }
.tooltip {
  position: absolute;
  z-index: 10000;
  max-width: 260px;
  background: #101014;
  border: 1px solid var(--panel-light);
  color: var(--text);
  font-size: 11px;
  padding: 3px 5px;
  pointer-events: none;
  white-space: normal;
}
.tooltip .tip-flags { color: var(--text-yellow); font-weight: bold; }
.tooltip .tip-name { font-weight: bold; color: #fff; }
.tooltip .tip-desc { color: var(--text-dim); margin-top: 2px; }
.casting-bar {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 220px;
  text-align: center;
}
.casting-bar .bar { width: 220px; }
.casting-bar .bar-fill { background: #d0a020; }
.compass {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  width: 200px;
  height: 16px;
  overflow: hidden;
  background: var(--trough);
  border: 2px solid;
  border-color: var(--panel-dark) var(--panel-light) var(--panel-light) var(--panel-dark);
  box-sizing: border-box;
}
.compass-strip { position: absolute; top: 0; height: 12px; white-space: nowrap; font-size: 10px; color: var(--text-yellow); }
.compass-mark { position: absolute; left: 50%; top: 0; width: 1px; height: 12px; background: #fff; }
.buff-strip {
  position: absolute;
  right: 4px;
  top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.buff-icon { width: 24px; height: 24px; position: relative; background: var(--trough); border: 1px solid var(--panel-light); }
.buff-icon.detrimental { box-shadow: inset 0 0 0 2px rgba(200, 30, 30, 0.6); }
.buff-icon .buff-time { position: absolute; bottom: -1px; right: 0; font-size: 8px; color: #fff; text-shadow: 0 0 2px #000; }
.xp-bar { position: absolute; left: 8px; right: 8px; bottom: 0; height: 6px; background: var(--trough); border: 1px solid var(--panel-dark); }
.xp-bar .bar-fill { background: #c0a020; }
.death-screen {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  font-size: 14px;
}
.paper-doll { display: grid; grid-template-columns: repeat(4, 40px); gap: 2px; }
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #d8ccb0; color: #201810; padding: 6px; }
.book-page { display: grid; grid-template-rows: repeat(8, 18px); }
.book-spell { display: flex; gap: 4px; align-items: center; cursor: pointer; }
.book-spell.selected { background: #b0a080; }
.list { overflow-y: auto; max-height: 300px; }
.list-row { display: flex; gap: 6px; align-items: center; padding: 1px 2px; cursor: pointer; }
.list-row:hover, .list-row.selected { background: #50505a; }
.two-col { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 1px; }
.option-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.option-row input[type="range"] { width: 100px; }
.option-button { width: 100%; }
.keybind-list { display: flex; flex-direction: column; gap: 1px; }
.keybind-heading { margin-top: 4px; color: #f0e040; font-weight: bold; }
.keybind-row { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; padding: 1px 2px; }
.keybind-row:hover { background: #3a3a3a; }
.keybind-row.listening { background: #50504a; }
.keybind-key { color: #d0d0c0; }
.keybind-hint { margin-top: 4px; color: #a0a0a0; }
.touch-layer { position: fixed; inset: 0; pointer-events: none; z-index: 8000; }
.touch-stick { position: fixed; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; }
.touch-stick { border: 2px solid rgba(240,240,240,0.45); background: rgba(0,0,0,0.25); }
.touch-knob { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.touch-knob { border-radius: 50%; background: rgba(240,240,240,0.55); }
.touch-buttons { position: fixed; display: grid; grid-template-columns: repeat(2, 62px); gap: 8px; pointer-events: auto; justify-items: end; }
.touch-buttons { right: calc(env(safe-area-inset-right, 0px) + 8px); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
:root[data-orientation="landscape"] .touch-buttons { grid-template-columns: repeat(3, 62px); }
.touch-stick { margin-bottom: env(safe-area-inset-bottom, 0px); }
.touch-button { width: 62px; height: 46px; min-width: 44px; min-height: 44px; font: bold 13px Verdana, Arial, sans-serif; color: #f0f0f0; }
.touch-button { background: rgba(40,40,44,0.85); border: 2px solid #6b6b6b; border-radius: 6px; }
.touch-button:active { background: rgba(90,90,96,0.95); }
/* A window at phone width is a full-screen sheet: no drag, no shadow, one at a time, and a close box a thumb can hit. */
.win-sheet {
  left: env(safe-area-inset-left, 0px) !important;
  top: env(safe-area-inset-top, 0px) !important;
  width: auto !important;
  height: auto !important;
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  max-width: none;
  box-shadow: none;
  resize: none;
}
.win-sheet .win-title { height: 44px; line-height: 44px; font-size: 14px; cursor: default; padding: 0 8px; }
.win-sheet .win-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 18px; line-height: 40px; }
.win-sheet .win-body { font-size: 13px; padding: 8px; }
.win-sheet .btn { min-width: 44px; min-height: 44px; }
.win-sheet .slot { width: 44px; height: 44px; }
.win-sheet .slot canvas { width: 40px; height: 40px; }
.win-sheet .slot-grid { grid-template-columns: repeat(4, 44px); }
.win-sheet .list { max-height: none; }
.note-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; background: none; }
.note-scroll { position: relative; width: min(430px, 88vw); display: flex; flex-direction: column; align-items: stretch; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55)); }
.note-roller { position: relative; height: 26px; border-radius: 13px; background: linear-gradient(180deg, #8d8a82 0%, #6f6c65 45%, #4e4b45 100%); border: 1px solid #3b3833; }
.note-roller::before, .note-roller::after { content: ""; position: absolute; top: -7px; width: 26px; height: 40px; border-radius: 50% 50% 46% 46%; }
.note-roller::before { left: -13px; background: radial-gradient(circle at 35% 30%, #e0b978 0%, #b8862f 45%, #7a5714 100%); }
.note-roller::after { right: -13px; background: radial-gradient(circle at 35% 30%, #e0b978 0%, #b8862f 45%, #7a5714 100%); }
.note-page { background: linear-gradient(180deg, #e6e0cf 0%, #ddd6c2 40%, #d6cfba 100%); color: #2f2c26; padding: 30px 34px; min-height: 180px; }
.note-page { border-left: 1px solid #b6ad96; border-right: 1px solid #b6ad96; font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 1.45; }
.note-page::before, .note-page::after { content: ""; display: block; height: 10px; }
.note-page::before, .note-page::after { background: repeating-linear-gradient(90deg, rgba(150,120,110,0.22) 0 14px, rgba(150,120,110,0) 14px 30px); }
.note-line { margin: 0 0 14px; }
.note-line:last-child { margin-bottom: 0; }
.map-canvas { display: block; width: 100%; height: auto; background: #07070a; border: 1px solid #55514a; }
.map-caption { padding: 4px 2px 0; font: 11px Tahoma, Verdana, sans-serif; color: #c8c4b8; text-align: center; }
