/* 16:9 thumbnail crop editor — full image + draggable/resizable overlay */

.gp-crop-modal-body {
  overflow: visible;
}

.gp-crop-workspace {
  position: relative;
  width: 100%;
  max-height: min(58vh, calc(100dvh - 14rem));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  background: #0f1115;
  border: 1px solid #272b31;
  touch-action: none;
}

.gp-crop-frame {
  position: relative;
  display: inline-block;
  vertical-align: top;
  line-height: 0;
  margin: 0 auto;
}

.gp-crop-frame img.gp-crop-source {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(52vh, calc(100dvh - 16rem));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.gp-crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gp-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  touch-action: none;
  pointer-events: auto;
}

.gp-crop-box.gp-crop-dragging,
.gp-crop-resize.gp-crop-dragging {
  cursor: grabbing;
}

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

.gp-crop-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid #0f1115;
  border-radius: 4px;
  cursor: nwse-resize;
  touch-action: none;
  pointer-events: auto;
  z-index: 2;
}

.gp-crop-resize::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-right: 2px solid #0f1115;
  border-bottom: 2px solid #0f1115;
}

.gp-crop-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.75rem;
  line-height: 1.4;
}

.gp-crop-preview-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #272b31;
}

.gp-crop-preview-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  flex-shrink: 0;
}

.gp-crop-preview-frame {
  flex: 1;
  max-width: 12rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #272b31;
  background: #0f1115;
}

.gp-crop-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .gp-crop-workspace {
    max-height: min(50vh, calc(100dvh - 12rem));
  }

  .gp-crop-frame img.gp-crop-source {
    max-height: min(45vh, calc(100dvh - 14rem));
  }

  .gp-crop-resize {
    width: 28px;
    height: 28px;
    right: -8px;
    bottom: -8px;
  }
}
