/* Görsel kırpma — şeffaf arka plan önizlemesi (damalı desen) */
.image-crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* Admin .modal-overlay (1000) ve dinamik modalların üstünde */
  z-index: 1100;
}

.image-crop-dialog {
  background: var(--white, #fff);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  width: min(560px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.image-crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.image-crop-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.image-crop-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  color: var(--mid, #6b7280);
  line-height: 0;
}

.image-crop-body {
  padding: 16px 18px;
  overflow: auto;
}

.image-crop-hint {
  font-size: 12px;
  color: var(--light, #9ca3af);
  margin: 0 0 12px;
}

.image-crop-stage-wrap {
  position: relative;
  max-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  /* Şeffaflık önizlemesi */
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e8eaed 25%, transparent 25%),
    linear-gradient(-45deg, #e8eaed 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8eaed 75%),
    linear-gradient(-45deg, transparent 75%, #e8eaed 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  touch-action: none;
  user-select: none;
}

.image-crop-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 360px;
}

.image-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  pointer-events: none;
}

.image-crop-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.image-crop-shade-part {
  position: absolute;
  background: rgba(0, 0, 0, 0.45);
}

.image-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--accent, #4f6ef7);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: move;
  min-width: 40px;
  min-height: 24px;
}

.image-crop-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.image-crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--accent, #4f6ef7);
  border-radius: 2px;
  box-sizing: border-box;
}

.image-crop-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.image-crop-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.image-crop-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.image-crop-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.image-crop-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.image-crop-footer .btn-lg-outline {
  margin: 0;
}
