/* ── Image crop field & modal ─────────────────────────── */

.image-crop-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate, #6B6B6B);
  margin-bottom: 2px;
}

.image-crop-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.image-crop-btn--primary {
  background: var(--blue, #0A0A0A);
  color: #fff;
}

.image-crop-btn--primary:hover {
  background: var(--blue-dark, #333);
}

.image-crop-btn--ghost {
  background: var(--slate-light, #F0F0F0);
  color: var(--slate, #6B6B6B);
}

.image-crop-btn--ghost:hover {
  background: var(--blue-light, #E8E8E8);
  color: var(--blue-dark, #0A0A0A);
}

.image-crop-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-crop-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-crop-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.image-crop-placeholder {
  font-size: 0.72rem;
  color: var(--slate, #6B6B6B);
}

.image-crop-hint {
  font-size: 0.72rem;
  color: var(--slate, #6B6B6B);
  margin: 0;
}

.image-crop-existing,
.image-crop-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #E8E8E8);
  border-radius: 6px;
  background: var(--bg, #FAFAFA);
}

.image-crop-existing__img,
.image-crop-preview__img {
  object-fit: cover;
  border: 1px solid var(--border, #E8E8E8);
  flex-shrink: 0;
}

.image-crop-existing__img--circle,
.image-crop-preview__img--circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.image-crop-existing__img:not(.image-crop-existing__img--circle),
.image-crop-preview__img:not(.image-crop-preview__img--circle) {
  max-height: 60px;
  max-width: 160px;
  border-radius: 3px;
}

.image-crop-existing__label,
.image-crop-preview__label {
  font-size: 0.78rem;
  color: var(--slate, #6B6B6B);
}

.image-crop-preview__filename {
  font-size: 0.72rem;
  color: var(--slate, #B0B0B0);
  margin-top: 2px;
  word-break: break-all;
}

.image-crop-remove {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--slate, #6B6B6B);
  cursor: pointer;
}

body.crop-modal-open {
  overflow: hidden;
}

.image-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.image-crop-modal[hidden] {
  display: none !important;
}

.image-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.image-crop-modal__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #E8E8E8);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.image-crop-modal__header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border, #E8E8E8);
}

.image-crop-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #0A0A0A);
}

.image-crop-modal__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--slate, #6B6B6B);
}

.image-crop-modal__stage {
  position: relative;
  width: 100%;
  height: min(52vh, 420px);
  background: #111;
  overflow: hidden;
}

.image-crop-modal__image {
  display: block;
  max-width: 100%;
}

.image-crop-modal__toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border, #E8E8E8);
}

.image-crop-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border, #E8E8E8);
  background: var(--bg, #FAFAFA);
}

/* Cropper.js tweaks */
.cropper-view-box,
.cropper-face {
  border-radius: 0;
}

.cropper-line,
.cropper-point {
  background-color: #fff;
}

.cropper-view-box {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-color: rgba(255, 255, 255, 0.9);
}
