/* ============================================================
   IMAGE VIEWER WINDOW
   ============================================================ */
#imageviewer-window {
  top: 80px;
  left: 180px;
  width: 640px;
  height: 480px;
  min-width: 400px;
  min-height: 320px;
  z-index: 15;
  background: #1a1a1a;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif;
  color: #eee;
}

/* --- Header Bar --- */
#imageviewer-header {
  display: flex;
  align-items: center;
  background: #2d2d2d;
  padding: 0 8px;
  height: 38px;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border-bottom: 1px solid #3a3a3a;
  gap: 6px;
}
#imageviewer-header:active { cursor: grabbing; }

#imageviewer-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

/* --- Toolbar --- */
#imageviewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #252525;
  padding: 4px 8px;
  border-bottom: 1px solid #3a3a3a;
  flex-shrink: 0;
}

.iv-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
}
.iv-tool-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.iv-tool-btn.active { color: var(--accent-color); }
.iv-tool-btn svg { width: 18px; height: 18px; fill: currentColor; }

.iv-tool-sep {
  width: 1px;
  height: 20px;
  background: #3a3a3a;
  margin: 0 4px;
}

/* --- Image Display Area --- */
#imageviewer-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
  background-color: #1a1a1a;
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

#imageviewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
}

/* --- Empty State --- */
#imageviewer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #555;
  gap: 10px;
  user-select: none;
}

.iv-empty-icon {
  width: 64px;
  height: 64px;
  fill: #444;
}

/* --- Thumbnail Strip --- */
#imageviewer-strip {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: #252525;
  border-top: 1px solid #3a3a3a;
  overflow-x: auto;
  flex-shrink: 0;
}
#imageviewer-strip::-webkit-scrollbar { height: 4px; }
#imageviewer-strip::-webkit-scrollbar-thumb { background: #555; border-radius: 2px; }

.iv-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.iv-thumb:hover { opacity: 1; }
.iv-thumb.active { border-color: var(--accent-color); opacity: 1; }
.iv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Status Bar --- */
#imageviewer-status {
  background: #1e1e1e;
  padding: 3px 14px;
  font-size: 11px;
  color: #888;
  border-top: 1px solid #3a3a3a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
