/* ============================================================================
 * CROP — overlay styles.
 *
 * Injected into csTimer, so every rule is namespaced .crop-* and the
 * layout-critical properties carry !important. csTimer ships its own global
 * resets and user-supplied custom CSS; without !important a theme can and will
 * reposition or hide this overlay.
 *
 * The wrapper is fixed-position and pointer-events:none so it can never shift
 * csTimer's layout, never intercept a click, and never take focus.
 * ==========================================================================*/

.crop-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 999999 !important;
  display: none;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  contain: layout style;
}

.crop-overlay.crop-visible {
  display: flex !important;
  justify-content: center !important;
}

.crop-overlay.crop-pos-top    { align-items: flex-start !important; }
.crop-overlay.crop-pos-center { align-items: center !important; }
.crop-overlay.crop-pos-bottom { align-items: flex-end !important; }

.crop-overlay.crop-pos-top .crop-card    { margin-top: 12vh !important; }
.crop-overlay.crop-pos-bottom .crop-card { margin-bottom: 10vh !important; }

/* Inline variant: the card sits in normal flow inside a caller-supplied
   container (the settings popup's preview) instead of covering the viewport.
   Must come after the .crop-pos-* rules so its margin reset wins the tie. */
.crop-overlay.crop-inline {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: auto !important;
  overflow: visible !important;
}
.crop-overlay.crop-inline.crop-visible { display: flex !important; }
.crop-overlay.crop-inline .crop-card {
  margin: 0 !important;
  box-shadow: none !important;
}

/* ---- card ---------------------------------------------------------------- */

.crop-card {
  pointer-events: none !important;   /* nothing here is interactive, by design */
  box-sizing: border-box !important;
  display: block !important;
  min-width: 240px !important;
  max-width: min(90vw, 460px) !important;
  margin: 0 !important;
  padding: 18px 26px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  background: rgba(14, 16, 20, 0.94) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55) !important;
  color: #f2f4f8 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-align: center !important;
  text-shadow: none !important;
  animation: crop-pop 140ms ease-out !important;
}

@keyframes crop-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .crop-card { animation: none !important; }
}

.crop-eyebrow {
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: rgba(242, 244, 248, 0.5) !important;
}

.crop-rows {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.crop-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.crop-swatch {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.45) !important;
  border-radius: 7px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18) !important;
  background: #888;
}

.crop-color {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 30px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
}

.crop-slot {
  display: inline-block !important;
  margin: 0 0 0 auto !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(242, 244, 248, 0.62) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.crop-hint {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.06em !important;
  color: rgba(242, 244, 248, 0.34) !important;
}

/* Small screens / phone-held-in-hand cubing */
@media (max-width: 480px) {
  .crop-card   { padding: 14px 18px 11px !important; min-width: 0 !important; }
  .crop-color  { font-size: 24px !important; }
  .crop-swatch { width: 28px !important; height: 28px !important; }
}
