/**
 * Docker Manager - Window Manager & Main Desktop Styles
 * (c) 2026 Wizardry and Steamworks
 */

 :root[data-theme="dark"] {
  --bg: #111216;
  --card: #1a1c23;
  --btn: #262936;
  --txt: #e1e1e6;
  --mute: #a9aab2;
  --acc: #00e5ff;
  --tb: #2c303d;
  --icon-hover: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] {
  --bg: #f4f5f7;
  --card: #ffffff;
  --btn: #e4e6eb;
  --txt: #1c1e21;
  --mute: #606770;
  --acc: #0087a3;
  --tb: #dbdee4;
  --icon-hover: rgba(0, 0, 0, 0.05);
}

body {
  font-family:
      system-ui,
      -apple-system,
      sans-serif;
  background: var(--bg);
  margin: 0;
  padding: 20px;
  color: var(--txt);
  overflow: hidden !important; 
  height: 100vh;
  box-sizing: border-box;
}

.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto 25px;
  border-bottom: 1px solid var(--btn);
  padding-bottom: 15px;
}

.titles h1 {
  font-family: "Copperplate Gothic", "Copperplate", serif;
  margin: 0 0 5px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.titles h5 {
  font-family: "Courier New", "Courier", monospace;
  margin: 0;
}

.titles h5 a {
  color: inherit;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ctrls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--mute);
}

.switch span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle input {
  display: none;
}

.slider {
  background: #ccc;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  border-radius: 24px;
  transition: 0.3s;
}
.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .slider {
  background: var(--acc);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

.space {
  position: relative;
  width: 100%;
  min-height: 82vh;
  max-width: 1600px;
  margin: 0 auto;
  overflow: visible !important; 
}

/* RESTORED: Original full-viewport absolute desktop dock panel layer */
.desktop-dock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* RESTORED: Pure absolute position tracking rules for desktop shortcuts */
.desk-icon {
  display: none;
  position: absolute;
  flex-direction: column;
  align-items: center;
  width: 90px;
  height: 90px;      
  margin: 0 !important; 
  padding: 8px;
  border-radius: 6px;
  cursor: grab;
  text-align: center;
  pointer-events: auto;
  user-select: none;
  box-sizing: border-box; 
  transition: background 0.15s, opacity 0.15s;
}

.desk-icon:active {
  cursor: grabbing;
}
.desk-icon:hover {
  background: var(--icon-hover);
}
.desk-icon.icon-visible {
  display: flex;
}

.icon-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.icon-lbl {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--txt);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.card {
  position: absolute;
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  resize: both;
  overflow: hidden;
  min-width: 360px;
  min-height: 260px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--btn);
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  z-index: 10;
}

.card.minimized {
  opacity: 0 !important;
  transform: scale(0.85) translateY(30px) !important;
  pointer-events: none !important;
}

.tbar {
  background: var(--tb);
  color: var(--txt);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-bottom: 1px solid var(--btn);
}

.win-btn {
  background: none;
  border: none;
  color: var(--mute);
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
  padding: 0 4px;
  display: flex;
  align-items: center;
}
.win-btn:hover {
  color: var(--acc);
}

.wp-select {
  display: block !important;
  visibility: visible !important;
  background: var(--btn);
  color: var(--txt);
  border: 1px solid var(--mute);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  outline: none;
  cursor: pointer;
  height: 28px !important;
  box-sizing: border-box;
}
.wp-select:hover {
  border-color: var(--acc);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg) !important;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--tb) !important;
  border: 2px solid var(--bg) !important;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--mute) !important;
}

.xterm-viewport::-webkit-scrollbar,
.terminal-panel-container::-webkit-scrollbar,
.log-panel-container::-webkit-scrollbar {
  background: #000000 !important;
}

:root[data-theme="light"] .xterm-viewport::-webkit-scrollbar,
:root[data-theme="light"] .terminal-panel-container::-webkit-scrollbar,
:root[data-theme="light"] .log-panel-container::-webkit-scrollbar {
  background: #ffffff !important;
