/* Paired with avatar-cropper.js. Neutral dark look so it fits both the isBack pages and
   domain-settings. */

.rk-ac-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 16px;
  box-sizing: border-box;
}
.rk-ac-backdrop.hidden { display: none; }
body.rk-ac-open { overflow: hidden; }

.rk-ac-box {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px 22px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  color: #e6edf3;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.rk-ac-title { margin: 0 0 4px; font-size: 18px; color: #f0f6fc; }
.rk-ac-hint { margin: 0 0 14px; font-size: 13px; color: #8b949e; }

.rk-ac-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background:
    repeating-conic-gradient(#21262d 0% 25%, #161b22 0% 50%) 50% / 20px 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.rk-ac-stage:active { cursor: grabbing; }
.rk-ac-stage:focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; }
.rk-ac-canvas { display: block; width: 100%; height: 100%; }

.rk-ac-zoom { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.rk-ac-range { flex: 1; accent-color: #58a6ff; }
.rk-ac-zoom-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  font-size: 18px; line-height: 1;
  cursor: pointer;
}
.rk-ac-zoom-btn:hover { background: #30363d; }

.rk-ac-error { min-height: 18px; font-size: 13px; color: #f85149; margin: 4px 0; }

.rk-ac-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.rk-ac-spacer { flex: 1; }
.rk-ac-btn {
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #30363d;
  background: transparent;
  color: #e6edf3;
}
.rk-ac-btn:hover { background: #21262d; }
.rk-ac-primary { background: #238636; border-color: #2ea043; color: #fff; }
.rk-ac-primary:hover { background: #2ea043; }
.rk-ac-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 420px) { .rk-ac-other { width: 100%; order: 2; } }
