/* ==========================================================================
   RetroShop 98 (Photoshop 4.0/5.0 Parody) Styles
   ========================================================================== */

.ps-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  background-color: var(--win-bg);
  color: var(--win-text);
  font-family: var(--win-font);
  overflow: visible;
}

.ps-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  background-color: #555c66;
}

/* Left Toolbox */
.ps-toolbox {
  width: 60px;
  background-color: var(--win-bg);
  border-right: 1px solid var(--win-border-dark);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  z-index: 10;
}

.ps-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  gap: 2px;
  justify-content: center;
}

.ps-tool-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--win-bg);
  border: none;
  cursor: default;
  box-shadow:
    inset 1px 1px 0px var(--win-border-light),
    inset -1px -1px 0px var(--win-border-darkest),
    inset 2px 2px 0px var(--win-border-midlight),
    inset -2px -2px 0px var(--win-border-dark);
}

.ps-tool-btn.active {
  box-shadow:
    inset 1px 1px 0px var(--win-border-darkest),
    inset -1px -1px 0px var(--win-border-light),
    inset 2px 2px 0px var(--win-border-dark),
    inset -2px -2px 0px var(--win-border-midlight);
  background-color: #dfdfdf;
  background-image: radial-gradient(#ffffff 25%, transparent 25%);
  background-size: 2px 2px;
}

.ps-color-swatches {
  position: relative;
  width: 38px;
  height: 38px;
  margin: 6px auto 0 auto;
}

.ps-color-fg {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff;
  z-index: 2;
  cursor: pointer;
}

.ps-color-bg {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff;
  z-index: 1;
  cursor: pointer;
}

.ps-color-reset {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 8px;
  cursor: pointer;
  line-height: 1;
}

/* Center Canvas Viewport */
.ps-viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
  position: relative;
}

.ps-canvas-wrapper {
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.6);
  border: 1px solid #000;
  background: repeating-conic-gradient(#ffffff 0% 25%, #e0e0e0 0% 50%) 50% / 16px 16px;
  position: relative;
  display: inline-block;
}

.ps-canvas {
  display: block;
  cursor: crosshair;
}

/* Right Panels Sidebar */
.ps-sidebar {
  width: 175px;
  background-color: var(--win-bg);
  border-left: 1px solid var(--win-border-dark);
  display: flex;
  flex-direction: column;
  user-select: none;
  z-index: 10;
}

.ps-panel {
  display: flex;
  flex-direction: column;
  border-bottom: 2px groove #dfdfdf;
  padding: 4px;
}

.ps-panel-header {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 4px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ps-layers-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
  background: #fff;
  border: 2px inset var(--win-border-dark);
  padding: 2px;
}

.ps-layer-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
}

.ps-layer-item.active {
  background-color: #000080;
  color: #ffffff;
}

.ps-layer-eye {
  cursor: pointer;
  font-size: 11px;
  width: 14px;
  text-align: center;
}

.ps-layer-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-layers-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 10px;
}

.ps-history-list {
  background: #fff;
  border: 2px inset var(--win-border-dark);
  height: 90px;
  overflow-y: auto;
  padding: 2px;
  font-size: 11px;
}

.ps-history-item {
  padding: 2px 4px;
  cursor: pointer;
}

.ps-history-item.active {
  background-color: #000080;
  color: #fff;
}
