.kanban-card-cover,
.card-attachment-thumb,
.card-comment-image {
  cursor: zoom-in;
}

body.image-viewer-open {
  overflow: hidden;
}

.image-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.image-viewer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.image-viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.image-viewer-image {
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

.image-viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.image-viewer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.image-viewer-btn:hover,
.image-viewer-btn:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  outline: none;
}

.image-viewer-btn-close {
  margin-left: auto;
}

.image-viewer-btn i {
  font-size: 1rem;
}

@media (max-width: 576px) {
  .image-viewer-btn span {
    display: none;
  }

  .image-viewer-btn {
    padding: 10px 12px;
  }

  .image-viewer-btn-close {
    margin-left: 0;
  }
}
