/* ==========================================================================
   Universal image-crop widget (Cropper.js wrapper)
   Used anywhere a photo field has a crop step: sign-up, edit profile, etc.
   ========================================================================== */

.ic-dialog {
  max-width: 900px;
}
@media (max-width: 991px) {
  .ic-dialog { max-width: 96vw; margin: 1rem auto; }
}

.ic-content {
  background: var(--jf-surface, #17171b) !important;
  border: 1px solid var(--jf-border-strong, rgba(255,255,255,0.16)) !important;
  border-radius: 1rem !important;
  overflow: hidden;
}

.ic-header { border-color: var(--jf-border, rgba(255,255,255,0.09)) !important; }
.ic-footer { border-color: var(--jf-border, rgba(255,255,255,0.09)) !important; }

.ic-body {
  padding: 1.25rem !important;
}

.ic-stage {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 767px) {
  .ic-stage { flex-direction: column; }
}

.ic-crop-wrap {
  flex: 1 1 auto;
  min-width: 0;
  height: 62vh;
  min-height: 340px;
  max-height: 560px;
  background: repeating-conic-gradient(#1a1a1e 0% 25%, #141417 0% 50%) 50% / 22px 22px;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}
@media (max-width: 767px) {
  .ic-crop-wrap { height: 48vh; min-height: 280px; }
}

.ic-crop-wrap img {
  display: block;
  max-width: 100%;
}

.ic-crop-wrap.ic-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  background: rgba(10,10,12,0.35);
}

.ic-side {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
@media (max-width: 767px) {
  .ic-side { flex-direction: row; flex-wrap: wrap; justify-content: center; flex-basis: auto; }
}

.ic-preview-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--jf-text-muted, #9a9aa4);
  text-align: center;
}

.ic-preview-circle {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  border: 2px solid var(--jf-border-strong, rgba(255,255,255,0.16));
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
  flex: 0 0 auto;
}
.ic-preview-circle img { width: 100%; height: 100%; object-fit: cover; }

.ic-toolbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ic-zoom-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.ic-zoom-row i { color: var(--jf-text-muted, #9a9aa4); font-size: 0.85rem; }

.ic-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--jf-border-strong, rgba(255,255,255,0.16));
  outline: none;
  cursor: pointer;
}
.ic-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--jf-accent-bright, #d21626);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  margin-top: -6px;
}
.ic-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--jf-accent-bright, #d21626);
  border: 2px solid #fff;
  cursor: pointer;
}
.ic-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--jf-border-strong, rgba(255,255,255,0.16)); }

.ic-btn-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.ic-btn-row .btn { flex: 1 1 auto; min-width: 42px; }

/* Drop zone affordance on the file input's wrapper */
.ic-dropzone {
  position: relative;
  border-radius: 0.6rem;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.ic-dropzone.ic-dragover {
  box-shadow: 0 0 0 2px var(--jf-accent-bright, #d21626);
  background-color: rgba(210, 22, 38, 0.06);
}

.ic-confirm-btn[disabled] { opacity: 0.7; cursor: progress; }
