/* ══════════════════════════════════════════════════════════════════════════
   AI Image Upscaler — additions on top of css/i2i.css (aipe-* design system)
   Load AFTER i2i.css. Bump ?v= in the blade when you edit this file.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Helpers that img2imgMulti.blade.php defines inline (not in i2i.css) ── */
.aipe-settings-group { margin-top: 0.85rem; }
.aipe-settings-group-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.4rem;
}
.aipe-credit-hint {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}
.aipe-model-pill.locked,
.aipe-pill-badge-wrap.locked .aipe-model-pill {
  opacity: 0.48;
  filter: grayscale(1);
  cursor: not-allowed;
  pointer-events: auto;
  position: relative;
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: none !important;
  transform: none !important;
}
.aipe-model-pill.locked:hover,
.aipe-pill-badge-wrap.locked .aipe-model-pill:hover {
  opacity: 0.62;
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.aipe-model-pill.locked::after {
  content: '🔒';
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.9;
  transform: translateY(-1px);
}
.aipe-pill-badge-wrap.locked .aipe-best-badge { opacity: 0.52; filter: grayscale(1); }
.aipe-creation-tile[data-status="failed"] .dot,
.aipe-creation-processing.is-failed .dot { display: none !important; animation: none !important; }
.aipe-creation-processing.is-failed { color: rgba(255, 255, 255, 0.64); }

/* ── Upload box: single-slot preview ─────────────────────────────────────── */
.upsc-upload { cursor: pointer; }
.upsc-upload.has-file { border-style: solid; border-color: rgba(101, 113, 255, 0.35); background: rgba(0, 0, 0, 0.25); }

.upsc-preview {
  position: relative;
  min-height: 220px;
  max-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
}
.upsc-preview img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.upsc-preview-meta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}
.upsc-dims,
.upsc-filesize {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}
.upsc-filesize { color: rgba(255, 255, 255, 0.7); }
.upsc-preview .upsc-remove { opacity: 1; }
.upsc-preview-change {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.upsc-upload:hover .upsc-preview-change { opacity: 1; }
@media (hover: none) { .upsc-preview-change { opacity: 1; } }

/* ── Model pills tweaks ──────────────────────────────────────────────────── */
.upsc-model-pills { margin-top: 0.35rem; }
.upsc-model-pills .aipe-model-pill svg { width: 15px; height: 15px; }
.upsc-badge-free { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); color: #032b1e; box-shadow: 0 2px 8px rgba(52, 211, 153, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.1); }
.upsc-model-hint {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  min-height: 2.2em;
}

/* ── Scale pills ─────────────────────────────────────────────────────────── */
.upsc-scale-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.5rem;
}
.upsc-scale-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.55rem 0.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.upsc-scale-pill:hover { border-color: rgba(101, 113, 255, 0.45); color: #fff; transform: translateY(-1px); }
.upsc-scale-pill.active {
  background: rgba(101, 113, 255, 0.16);
  border-color: rgba(101, 113, 255, 0.7);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(101, 113, 255, 0.16);
}
.upsc-scale-pill.locked {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
}
.upsc-scale-pill.locked:hover { transform: none; border-color: rgba(255, 255, 255, 0.12); }
.upsc-scale-main { font-size: 1.05rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.upsc-scale-sub { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.upsc-scale-pill.active .upsc-scale-sub { color: rgba(255, 255, 255, 0.8); }

/* ── Output estimate + warnings ──────────────────────────────────────────── */
.upsc-output-estimate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}
.upsc-output-estimate svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.upsc-output-estimate strong { color: #fff; font-weight: 900; }
.upsc-arrow { color: rgba(101, 113, 255, 0.95); font-weight: 900; margin: 0 0.15rem; }
.upsc-warning {
  margin-top: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(251, 188, 6, 0.1);
  border: 1px solid rgba(251, 188, 6, 0.35);
  color: rgba(255, 224, 138, 0.95);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ── Captcha ─────────────────────────────────────────────────────────────── */
.upsc-captcha {
  margin-top: 0.9rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(255, 51, 102, 0.06);
  border: 1px solid rgba(255, 51, 102, 0.25);
}
.upsc-captcha-title { margin: 0 0 0.35rem; font-size: 0.85rem; font-weight: 800; color: #fff; }
.upsc-captcha-sub { margin: 0 0 0.5rem; font-size: 0.76rem; color: rgba(255, 255, 255, 0.6); }
.upsc-captcha-sub a { color: #fff; text-decoration: underline; }
.upsc-captcha-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.upsc-captcha-row img { border-radius: 8px; max-width: 100%; height: auto; }
.upsc-captcha-row .btn { padding: 0.35rem 0.6rem; border-radius: 10px; }
.upsc-captcha .form-control { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #fff; }

/* ── Compare slider (demo + result) ──────────────────────────────────────── */
.upsc-compare {
  --pos: 50%;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  isolation: isolate;
}
.upsc-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.upsc-compare--result img { object-fit: contain; background: #0a0f1c; }
.upsc-compare-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  z-index: 1;
}
.upsc-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 0 18px rgba(0, 0, 0, 0.45);
  z-index: 2;
  pointer-events: none;
}
.upsc-compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(12, 20, 39, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}
.upsc-compare-handle span::before,
.upsc-compare-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translateY(-50%) rotate(-45deg);
  left: 9px;
}
.upsc-compare-handle span::after { transform: translateY(-50%) rotate(135deg); left: auto; right: 9px; }
.upsc-compare-label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.upsc-compare-label--before { left: 12px; }
.upsc-compare-label--after { right: 12px; background: rgba(101, 113, 255, 0.55); border-color: rgba(150, 160, 255, 0.7); }
.upsc-compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.upsc-compare-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 100%; }
.upsc-compare-range::-moz-range-thumb { width: 48px; height: 100%; border: 0; background: transparent; }
.upsc-compare-range:focus-visible ~ .upsc-compare-handle span { box-shadow: 0 0 0 4px rgba(101, 113, 255, 0.55); }

/* Compare toggled off → only the upscaled image is shown */
.upsc-compare.is-single .upsc-compare-before,
.upsc-compare.is-single .upsc-compare-handle,
.upsc-compare.is-single .upsc-compare-label--before,
.upsc-compare.is-single .upsc-compare-range { display: none; }
.upsc-compare.is-single .upsc-compare-label--after { right: auto; left: 12px; }

/* ── Showcase ────────────────────────────────────────────────────────────── */
.upsc-showcase { gap: 0.9rem; }
.upsc-demo-card {
  border-radius: 22px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 55px rgba(0, 0, 0, 0.45);
}
.upsc-demo-card .upsc-compare { max-width: 560px; margin: 0 auto; }
.upsc-demo-caption {
  text-align: center;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
.upsc-steps-card {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.upsc-steps-title { font-size: 0.98rem; font-weight: 900; color: #fff; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.upsc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.upsc-steps li { display: flex; gap: 0.6rem; align-items: flex-start; }
.upsc-steps li div { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.upsc-steps li strong { color: #fff; font-size: 0.86rem; font-weight: 800; }
.upsc-steps li span:not(.upsc-step-num) { color: rgba(255, 255, 255, 0.6); font-size: 0.76rem; line-height: 1.45; }
.upsc-step-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
  background: var(--aipe-gradient);
  box-shadow: 0 6px 16px rgba(101, 113, 255, 0.35);
}
@media (max-width: 640px) {
  .upsc-steps { grid-template-columns: 1fr; gap: 0.55rem; }
  .upsc-demo-card { padding: 0.5rem; border-radius: 18px; }
}

/* ── Result ──────────────────────────────────────────────────────────────── */
.upsc-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.upsc-result-title { color: #fff; font-weight: 900; font-size: 1rem; letter-spacing: -0.01em; }
.upsc-result-dims { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); font-weight: 700; }
.upsc-result-dims strong { color: #fff; }
.upsc-compare--result { max-height: 72vh; }
.upsc-result-tools { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.upsc-tool-btn {
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
}
.upsc-tool-btn:hover { color: #fff; background: rgba(101, 113, 255, 0.14); border-color: rgba(101, 113, 255, 0.4); }
.upsc-tool-btn[aria-pressed="true"] { background: rgba(101, 113, 255, 0.2); border-color: rgba(101, 113, 255, 0.55); color: #fff; }

/* ── SEO: stretching vs enhancing ────────────────────────────────────────── */
.upsc-vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
@media (max-width: 768px) { .upsc-vs-grid { grid-template-columns: 1fr; } }
.upsc-vs-col { border-radius: 16px; padding: 1rem 1.1rem; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); }
.upsc-vs-col--bad { border-color: rgba(255, 92, 92, 0.3); background: rgba(255, 92, 92, 0.06); }
.upsc-vs-col--good { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.07); }
.upsc-vs-head { font-weight: 900; color: #fff; margin-bottom: 0.6rem; font-size: 0.98rem; }
.upsc-vs-col--bad .upsc-vs-head::before { content: "✕ "; color: #ff5c5c; }
.upsc-vs-col--good .upsc-vs-head::before { content: "✓ "; color: #34d399; }
.upsc-vs-col ul { margin: 0; padding-left: 1.15rem; color: rgba(255, 255, 255, 0.78); line-height: 1.7; font-size: 0.94rem; }
.upsc-vs-col li { margin-bottom: 0.3rem; }

/* ── Mobile polish ───────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  /* Result/showcase sits above the form on mobile; keep the demo compact so the form is one swipe away */
  .upsc-demo-card .upsc-compare { max-width: 100%; }
  .upsc-compare--result { max-height: 64vh; }
}
@media (max-width: 520px) {
  .aipe-header h1 { font-size: 1.5rem; }
  .aipe-header p { font-size: 0.92rem; padding: 0 0.5rem; }
  .upsc-preview { min-height: 180px; max-height: 260px; }
  .upsc-preview img { max-height: 260px; }
  .upsc-compare-label { font-size: 0.64rem; padding: 0.25rem 0.55rem; top: 8px; }
  .upsc-compare-label--before { left: 8px; }
  .upsc-compare-label--after { right: 8px; }
  .upsc-compare-handle span { width: 34px; height: 34px; }
  /* Up to four pills (1×/2×/4×/Max) on one row: items may shrink below their
     text width, sub-labels get clipped with an ellipsis instead of wrapping. */
  .upsc-scale-pills { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 0.35rem; }
  .upsc-scale-pill { padding: 0.5rem 0.25rem; border-radius: 12px; min-width: 0; }
  .upsc-scale-main { font-size: 0.98rem; }
  .upsc-scale-sub { font-size: 0.58rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .upsc-result-tools .upsc-tool-btn { flex: 1; text-align: center; }
  .aipe-generate-btn { position: sticky; bottom: 0.5rem; z-index: 5; }
}
@media (prefers-reduced-motion: reduce) {
  .upsc-scale-pill, .upsc-tool-btn, .upsc-preview-change { transition: none; }
}

/* ── Custom resolution (Pro) ─────────────────────────────────────────────── */
.upsc-custom { margin-top: 0.7rem; }
.upsc-custom-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.upsc-custom-toggle:hover { border-color: rgba(101, 113, 255, 0.35); background: rgba(255, 255, 255, 0.05); }
.upsc-custom.open .upsc-custom-toggle {
  border-color: rgba(101, 113, 255, 0.55);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 0 0 3px rgba(101, 113, 255, 0.14);
}
.upsc-custom-toggle > svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.upsc-custom-toggle-label { font-size: 0.86rem; font-weight: 800; letter-spacing: -0.01em; }
.upsc-custom-toggle-value {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.upsc-custom.open .upsc-custom-toggle-value { color: #fff; background: rgba(101, 113, 255, 0.22); border-color: rgba(101, 113, 255, 0.5); text-transform: none; letter-spacing: 0; }
.upsc-custom-caret { width: 16px; height: 16px; flex: none; color: rgba(255, 255, 255, 0.55); transition: transform 0.22s ease; }
.upsc-custom.open .upsc-custom-caret { transform: rotate(90deg); }

.upsc-custom-panel {
  padding: 0.85rem 0.85rem 0.9rem;
  border: 1px solid rgba(101, 113, 255, 0.35);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(101, 113, 255, 0.06);
  animation: aipeFadeIn 0.25s ease;
}
.upsc-custom-fields { display: flex; align-items: flex-end; gap: 0.5rem; }
.upsc-custom-field { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.upsc-custom-field > span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.upsc-custom-field input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(6, 11, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.upsc-custom-field input::-webkit-outer-spin-button,
.upsc-custom-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.upsc-custom-field input:focus { border-color: rgba(101, 113, 255, 0.75); box-shadow: 0 0 0 3px rgba(101, 113, 255, 0.18); }
.upsc-custom-field input::placeholder { color: rgba(255, 255, 255, 0.25); font-weight: 600; }
.upsc-custom-x { padding-bottom: 0.65rem; color: rgba(255, 255, 255, 0.5); font-weight: 900; }
.upsc-custom-unit { padding-bottom: 0.7rem; font-size: 0.74rem; font-weight: 800; color: rgba(255, 255, 255, 0.45); }
.upsc-custom-lock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  user-select: none;
}
.upsc-custom-lock input { width: 17px; height: 17px; accent-color: var(--aipe-primary); cursor: pointer; flex: none; }
.upsc-custom-lock-icon { width: 14px; height: 14px; color: rgba(255, 255, 255, 0.45); }
.upsc-custom-lock:has(input:not(:checked)) .upsc-custom-lock-icon { opacity: 0.35; }
.upsc-custom-hint { margin: 0.6rem 0 0; font-size: 0.74rem; line-height: 1.5; color: rgba(255, 255, 255, 0.5); }

/* Scale presets are inactive while a custom size is set */
.upsc-scale-pills.is-muted .upsc-scale-pill { opacity: 0.55; }
.upsc-scale-pills.is-muted .upsc-scale-pill:hover { opacity: 1; }

.upsc-crop-note {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(255, 224, 138, 0.95);
  background: rgba(251, 188, 6, 0.12);
  border: 1px solid rgba(251, 188, 6, 0.3);
  vertical-align: middle;
}

.upsc-crop-note--ok {
  color: rgba(167, 243, 208, 0.95);
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}

/* Custom (cropped) result: original rendered with cover so both halves align */
.upsc-compare--result.is-cropped .upsc-compare-before { object-fit: cover; }

@media (max-width: 520px) {
  .upsc-custom-fields { gap: 0.4rem; }
  .upsc-custom-field input { font-size: 16px; } /* stop iOS zoom-on-focus */
}

/* ---- My recent upscales: delete controls (v1.3) ---------------------- */
.aipe-creations-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.aipe-delete-all{color:rgba(255,100,100,.9)!important;border-color:rgba(255,100,100,.18)!important;background:rgba(255,60,60,.06)!important}
.aipe-delete-all:hover{color:#fff!important;background:rgba(220,53,69,.55)!important;border-color:rgba(220,53,69,.7)!important}
.aipe-delete-all:disabled{opacity:.55;pointer-events:none}
.aipe-creation-delete{position:absolute;top:4px;right:4px;z-index:3;width:22px;height:22px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.6);color:#fff;font-size:16px;line-height:20px;padding:0;text-align:center;cursor:pointer;opacity:0;transition:opacity .2s,background .2s,transform .2s}
.aipe-creation-tile:hover .aipe-creation-delete,.aipe-creation-tile:focus-within .aipe-creation-delete{opacity:1}
.aipe-creation-delete:hover{background:#dc3545;border-color:#dc3545;transform:scale(1.08)}
.aipe-creation-tile.is-deleting{opacity:.4;pointer-events:none}
@media (hover:none),(pointer:coarse),(max-width:767.98px){.aipe-creation-delete{opacity:1}}  /* touch / phones: no hover, keep it visible */