/* Renamer Layout */
.renamer-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.renamer-main {
  min-width: 0;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: var(--panel);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

/* Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.image-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.image-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.image-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(106, 76, 255, 0.2);
}

.image-card.selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--brand);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.card-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #f0f0f0;
  display: block;
}

.card-meta {
  padding: 10px;
}

.file-name-new {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.file-name-old {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 2px;
}

/* Sidebar Specifics */
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .renamer-layout {
    grid-template-columns: 1fr;
  }
  .renamer-sidebar {
    order: 2;
  }
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
