/* View Toggle Switch */
.view-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: flex-end;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--accent-color);
}

input:checked+.slider:before {
  transform: translateX(24px);
}

.view-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Navigation Buttons */
.nav-buttons-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.nav-buttons-wrapper .btn {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-buttons-wrapper .btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-color);
}

.nav-buttons-wrapper .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-buttons-wrapper .btn.btn-secondary {
  background: var(--bg-panel);
}

/* Compare Grid Layout */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.compare-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.compare-grid-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Before/After Slider (existing styles retained) */
.ba-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: col-resize;
}

.ba-slider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 0 0 50%);
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  cursor: col-resize;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  cursor: col-resize;
}

.ba-knob::before {
  content: '◀ ▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #666;
  letter-spacing: 2px;
}