/*
 * Desktop layout, boot screen.
 */

.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  transition: right 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink desktop when agent panel is open so nothing is hidden under it */
body.agent-panel-open .desktop {
  right: 380px;
}

.desktop__wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.wallpaper-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* External file drop overlay */
.desktop__drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(30, 80, 200, 0.35);
  border: 3px dashed rgba(120, 180, 255, 0.8);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.desktop__drop-overlay.active {
  opacity: 1;
}

/* Boot Screen */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  color: #c0c0c0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  transition: opacity 0.5s ease;
}

.boot-screen--fade {
  opacity: 0;
  pointer-events: none;
}

.boot-screen__text {
  flex: 1;
  overflow: hidden;
}

.boot-screen__line {
  line-height: 1.4;
  animation: bootLine 0.1s ease;
}

@keyframes bootLine {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.boot-screen__progress-container {
  width: 300px;
  height: 16px;
  background: #222;
  border: 1px solid #444;
  margin: 12px 0;
}

.boot-screen__progress-bar {
  height: 100%;
  background: linear-gradient(to right, #b23300, #e85d1a);
  width: 0%;
  transition: width 0.3s ease;
}

.boot-screen__status {
  font-size: 13px;
  color: #888;
}

/* Start Menu Panel */
.start-menu-panel {
  position: fixed;
  z-index: 99999;
  min-width: 280px;
  max-width: 340px;
  background: var(--Menu, #fff);
  border: 2px solid;
  border-color: var(--ButtonHilight) var(--ButtonDkShadow) var(--ButtonDkShadow) var(--ButtonHilight);
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

/* Embedded menu inside start panel — override the default hidden/fixed style */
.start-menu-panel .start-menu__items {
  display: block !important;
  position: relative !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  z-index: auto !important;
  min-width: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  padding: 2px;
}

/* Search results area */
.start-menu__results {
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}

.start-menu__result-header {
  padding: 4px 8px 2px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--GrayText, #808080);
  letter-spacing: 0.5px;
}

.start-menu__result-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 24px;
  cursor: pointer;
  color: var(--MenuText, #000);
  white-space: nowrap;
}

.start-menu__result-item:hover,
.start-menu__result-item.kb-focus {
  background: var(--MenuHilight, #0078d4);
  color: var(--HilightText, #fff);
}

/* Keyboard focus highlight for menu items in start panel */
.start-menu-panel .ui-menu__menuitem.kb-focus {
  background: var(--MenuHilight, #0078d4);
  color: var(--HilightText, #fff);
}

.start-menu__result-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.start-menu__result-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-menu__result-path {
  font-size: 10px;
  opacity: 0.5;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.start-menu__no-results {
  padding: 12px;
  text-align: center;
  color: var(--GrayText, #808080);
}

/* Search input at bottom */
.start-menu__search {
  padding: 4px 6px;
  border-top: 1px solid var(--ButtonShadow, #808080);
  background: var(--ButtonFace, #ece9d8);
}

.start-menu__search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12px;
  font-family: inherit;
  border: 2px solid;
  border-color: var(--ButtonShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonShadow);
  background: var(--Window, #fff);
  color: var(--WindowText, #000);
  outline: none;
}