:root {
  --avatar-brand: #198754;
  --avatar-line: #dee2e6;
  --avatar-muted: #6c757d;
}

.avatar-workspace {
  max-width: 1080px;
}

.source-panel {
  display: none;
}

.source-panel.is-active {
  display: block;
}

.dropzone {
  min-height: 170px;
  border: 2px dashed #adb5bd;
  border-radius: var(--bs-border-radius);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bs-body-bg);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropzone.is-dragging {
  border-color: var(--avatar-brand);
  background: #f0f8f4;
}

.dropzone-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-brand);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.dropzone small {
  color: var(--avatar-muted);
}

video {
  width: 100%;
  min-height: 220px;
  max-height: 420px;
  background: #15191f;
  border-radius: var(--bs-border-radius);
  object-fit: cover;
}

.crop-stage {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--avatar-line);
  border-radius: var(--bs-border-radius);
  background: #f8f9fa;
  overflow: hidden;
}

#cropImage {
  display: block;
  max-width: 100%;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--avatar-muted);
}

.crop-stage.has-image .empty-state {
  display: none;
}

.avatar-preview {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--avatar-line), 0 14px 28px rgba(33, 37, 41, 0.16);
  background: #f8f9fa;
}

@media (max-width: 991.98px) {
  .avatar-preview {
    width: 150px;
    height: 150px;
  }

  .crop-stage {
    min-height: 320px;
  }
}
