/* Image crop modal (Cropper.js) — used from admin-extended.js */
.mc-img-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 5, 5, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.mc-img-crop-panel {
  background: var(--t-bg, #fff);
  color: var(--t-text, #0f172a);
  border-radius: 14px;
  max-width: min(960px, 100vw - 32px);
  width: 100%;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.mc-img-crop-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200, #e2e8f0);
  font-size: 14px;
}
.mc-img-crop-x {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-500, #64748b);
  border-radius: 8px;
}
.mc-img-crop-x:hover {
  background: var(--gray-100, #f1f5f9);
  color: var(--black, #050505);
}
.mc-img-crop-hint {
  font-size: 11px;
  color: var(--gray-500, #64748b);
  padding: 8px 16px 0;
  margin: 0;
}
.mc-img-crop-aspect {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
}
.mc-img-crop-aspect button {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--gray-200, #e2e8f0);
  background: var(--gray-50, #f8fafc);
  color: var(--gray-700, #334155);
  cursor: pointer;
}
.mc-img-crop-aspect button:hover {
  border-color: #1d4ed8;
  color: #1d4ed8;
}
.mc-img-crop-stage {
  flex: 1;
  min-height: 240px;
  max-height: min(56vh, 520px);
  background: #111;
  margin: 0 16px 12px;
  border-radius: 10px;
  overflow: hidden;
}
.mc-img-crop-stage img {
  display: block;
  max-width: 100%;
}
.mc-img-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--gray-200, #e2e8f0);
}

/* Edit icon on admin previews */
.mc-admin-img-wrap {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.mc-img-edit-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--gray-200, #e2e8f0);
  background: rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mc-img-edit-btn:hover {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.mc-gallery-thumb-wrap {
  position: relative;
  display: inline-block;
}
.mc-gallery-thumb-wrap .mc-img-edit-btn {
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
}
