:root {
  --slot-bg: #f7f7f7;
  --slot-border: #d2d2d2;
  --overlay-bg: rgba(0,0,0,0.35);
  --overlay-text: #ffffff;
  --primary-color: #0d6efd; /* Bootstrap primary */
}

/* Dark mode: body[data-theme="dark"] or adjust selector to your app */
[data-theme="dark"] {
  --slot-bg: #2c2c2c;
  --slot-border: #555;
  --overlay-bg: rgba(0,0,0,0.55);
  --overlay-text: #eaeaea;
}

/* Base slot */
.photo-slot {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  border-radius: 12px;
  background-color: var(--slot-bg);
  border: 2px dashed var(--slot-border);
  overflow: hidden;
  cursor: pointer;
}

/* When a photo is present */
.photo-slot.filled {
  border-style: solid;
  border-color: transparent;
  background-color: transparent;
}

/* Image auto-cropped preview */
.photo-slot img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;   /* auto-cropping / center-crop */
  border-radius: 12px;
}

/* Grey overlay for empty slot */
.photo-slot .add-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--overlay-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--overlay-text);
  font-weight: 500;
  font-size: 14px;
}

/* Primary photo badge */
.primary-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--primary-color);
  color: white;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 6px;
  z-index: 3;
}

/* Delete button on top-right */
.photo-slot .delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
}

/* Skeleton loader */
.skeleton {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 12px;
  animation: pulse 1.2s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    #ccc 25%,
    #e9e9e9 50%,
    #ccc 75%
  );
  background-size: 200% 100%;
}

@keyframes pulse {
  0%   { background-position: 200% 0;   }
  100% { background-position: -200% 0; }
}

/* Drag & drop styling */
.photo-slot.dragging {
  opacity: 0.4;
}

.photo-slot.drag-over {
  border-color: var(--primary-color);
}