/* Ubuntu Web — Image Viewer (Loupe) styles. All selectors scoped under .app-imageviewer.
 * The content area is intentionally #1e1e1e in BOTH schemes (Loupe-style dark canvas). */

.app-imageviewer .iv-root {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  background: #1e1e1e;
  outline: none;
  overflow: hidden;
}

.app-imageviewer .iv-canvas {
  flex: 1;
  min-width: 0;
  overflow: auto;
  display: flex;
  scrollbar-width: none;
}
.app-imageviewer .iv-canvas::-webkit-scrollbar { display: none; }
.app-imageviewer .iv-canvas.zoomed { cursor: grab; }
.app-imageviewer .iv-canvas.panning { cursor: grabbing; }

.app-imageviewer .iv-img {
  margin: auto;
  display: block;
  flex: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
  background:
    conic-gradient(rgba(255,255,255,0.06) 90deg, transparent 90deg 180deg, rgba(255,255,255,0.06) 180deg 270deg, transparent 270deg) 0 0/24px 24px;
}
.app-imageviewer .iv-root.broken .iv-canvas { display: none; }

/* ---------- broken / empty state ---------- */

.app-imageviewer .iv-error {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.45);
}
.app-imageviewer .iv-root.broken .iv-error { display: flex; }
.app-imageviewer .iv-error-glyph { width: 96px; height: 96px; opacity: 0.6; }
.app-imageviewer .iv-error-glyph svg { width: 96px; height: 96px; }
.app-imageviewer .iv-error-text { font-size: 15px; font-weight: 600; }

/* ---------- nav chevrons ---------- */

.app-imageviewer .iv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.75;
  transition: opacity 0.12s ease, background 0.12s ease;
  z-index: 4;
}
.app-imageviewer .iv-nav:hover { opacity: 1; background: rgba(0, 0, 0, 0.7); }
.app-imageviewer .iv-nav.hidden { display: none; }
.app-imageviewer .iv-nav-prev { left: 14px; }
.app-imageviewer .iv-nav-next { right: 14px; }

/* ---------- zoom pill ---------- */

.app-imageviewer .iv-zoom {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  z-index: 4;
}
.app-imageviewer .iv-zoom-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}
.app-imageviewer .iv-zoom-btn:hover { background: rgba(255, 255, 255, 0.14); }
.app-imageviewer .iv-zoom-btn.active { background: rgba(255, 255, 255, 0.22); }
.app-imageviewer .iv-zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  padding: 4px 6px;
  border-radius: 99px;
}
.app-imageviewer .iv-zoom-label:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- header title ---------- */

.app-imageviewer .iv-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  overflow: hidden;
}
.app-imageviewer .iv-tname {
  font-weight: 700;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.app-imageviewer .iv-headright { display: flex; align-items: center; gap: 6px; }

/* ---------- properties dialog (body carries .app-imageviewer) ---------- */

.app-imageviewer.iv-props {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  padding: 4px 2px;
}
.app-imageviewer.iv-props .iv-prop-row { display: flex; gap: 12px; font-size: 13px; }
.app-imageviewer.iv-props .iv-prop-key { flex: none; width: 90px; color: var(--fg-faint); text-align: right; }
.app-imageviewer.iv-props .iv-prop-val { flex: 1; min-width: 0; word-break: break-word; color: var(--fg); }
