/* Shopify Image Resizer & Optimizer — scoped to .pr-shopify-tool */
.pr-shopify-tool {
  background: var(--pr-surface, #ffffff);
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(21, 28, 44, 0.05);
}
.pr-shop-grid {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.pr-shop-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 10px;
  background: var(--pr-page, #f4f6fb);
}
.pr-shop-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-shop-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pr-ink, #151c2c);
}
.pr-shop-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pr-shop-presets button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pr-shop-presets button strong {
  font-size: 0.8125rem;
  line-height: 1.25;
}
.pr-shop-presets button span {
  font-size: 0.75rem;
  color: var(--pr-muted, #55627a);
}
.pr-shop-presets button[aria-pressed="true"] {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
}
.pr-shop-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pr-shop-row-bg:has([data-color-wrap][hidden]) {
  grid-template-columns: 1fr;
}
.pr-shop-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pr-muted, #55627a);
  min-width: 0;
}
.pr-shop-field input,
.pr-shop-field select {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 7px;
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.875rem;
}
.pr-shop-field input[type="color"] {
  padding: 4px;
}
.pr-shop-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 8px;
  background: var(--pr-surface, #ffffff);
}
.pr-shop-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pr-ink, #151c2c);
  cursor: pointer;
}
.pr-shop-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pr-accent, #2f46c9);
  flex-shrink: 0;
}
.pr-shop-hint {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--pr-muted, #55627a);
}
.pr-shop-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.pr-shop-actions button {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  padding: 0 16px;
}
.pr-shopify-tool button.pr-primary {
  background: var(--pr-accent, #2f46c9);
  color: #ffffff;
  border-color: var(--pr-accent, #2f46c9);
}
.pr-shopify-tool button.pr-primary:hover:not(:disabled) {
  background: var(--pr-accent-active, #2336a3);
}
.pr-shopify-tool button.pr-accent {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}
.pr-shopify-tool button.pr-accent:hover:not(:disabled) {
  background: #115e59;
}
.pr-shop-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--pr-muted, #55627a);
}
.pr-shop-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.pr-shop-drop {
  border: 2px dashed var(--pr-line, #dce3f0);
  border-radius: 10px;
  background: var(--pr-studio-canvas, #f7f9fd);
  padding: 24px 18px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pr-shop-drop.pr-dragover {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
}
.pr-shop-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 48ch;
  margin: 0 auto;
}
.pr-shop-drop-inner strong {
  font-size: 1rem;
  color: var(--pr-ink, #151c2c);
}
.pr-shop-drop-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--pr-muted, #55627a);
  line-height: 1.5;
}
.pr-shop-drop-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.pr-shop-drop-btns button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.875rem;
  font-weight: 600;
}
.pr-shop-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--pr-selection-bg, #e9edff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.875rem;
  font-weight: 600;
}
.pr-shopify-tool .pr-seeli-handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-page, #f4f6fb);
  font-size: 0.8125rem;
  color: var(--pr-muted, #55627a);
}
.pr-shopify-tool .pr-seeli-handoff[hidden] {
  display: none;
}
.pr-shopify-tool .pr-seeli-handoff a {
  color: var(--pr-accent, #2f46c9);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.pr-shopify-tool .pr-seeli-handoff a:hover {
  text-decoration: underline;
}
.pr-shop-inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 10px;
  background: var(--pr-page, #f4f6fb);
}
.pr-shop-inspector[hidden] {
  display: none;
}
.pr-insp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pr-insp-head strong {
  font-size: 0.9375rem;
  color: var(--pr-ink, #151c2c);
  display: block;
}
.pr-insp-sub {
  margin: 3px 0 0;
  font-size: 0.8125rem;
  color: var(--pr-muted, #55627a);
  line-height: 1.4;
}
.pr-insp-close {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}
.pr-insp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pr-insp-bgs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pr-insp-bgs button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.8125rem;
  font-weight: 600;
}
.pr-insp-bgs button[aria-pressed="true"] {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
  color: var(--pr-accent, #2f46c9);
}
.pr-insp-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pr-insp-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: 380px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--pr-line, #dce3f0);
  overflow: hidden;
}
.pr-insp-stage.bg-checker {
  background: repeating-conic-gradient(var(--pr-checker, #dce3f0) 0 25%, #ffffff 0 50%) 0 0 / 16px 16px;
}
.pr-insp-stage.bg-white {
  background: #ffffff;
}
.pr-insp-stage.bg-dark {
  background: #0f172a;
}
.pr-insp-stage.bg-wood {
  background: linear-gradient(135deg, #c7a27c 0%, #9f7550 55%, #845c3c 100%);
}
.pr-insp-stage canvas {
  max-width: 100%;
  max-height: 356px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.pr-insp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.pr-insp-stat {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
}
.pr-insp-stat.is-alert {
  border-color: #fda4af;
  background: #fff1f2;
}
.pr-insp-stat dt {
  font-size: 0.75rem;
  color: var(--pr-muted, #55627a);
}
.pr-insp-stat dd {
  margin: 3px 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pr-ink, #151c2c);
}
.pr-insp-stat.is-alert dd {
  color: #be123c;
}
.pr-shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.pr-shop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 10px;
  background: var(--pr-surface, #ffffff);
  min-width: 0;
}
.pr-shop-card.is-inspected {
  border-color: var(--pr-accent, #2f46c9);
  box-shadow: 0 0 0 2px rgba(47, 70, 201, 0.14);
}
.pr-shop-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: repeating-conic-gradient(var(--pr-checker, #dce3f0) 0 25%, #ffffff 0 50%) 0 0 / 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pr-shop-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.pr-shop-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pr-shop-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pr-ink, #151c2c);
  overflow-wrap: anywhere;
}
.pr-shop-dims {
  font-size: 0.75rem;
  color: var(--pr-muted, #55627a);
}
.pr-shop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.pr-shop-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
}
.pr-shop-badge.is-alpha {
  background: #e0f2fe;
  color: #075985;
}
.pr-shop-badge.is-warn {
  background: #ffe4e6;
  color: #be123c;
}
.pr-shop-badge.is-trim {
  background: #f1f5f9;
  color: #334155;
}
.pr-shop-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.pr-shop-card-actions button {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.8125rem;
  font-weight: 600;
}
.pr-shop-card-actions button[data-inspect][aria-pressed="true"] {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
  color: var(--pr-accent, #2f46c9);
}
.pr-shop-card-actions button[data-remove] {
  flex: 0 0 auto;
  padding: 0 10px;
}
@media (max-width: 780px) {
  .pr-shop-grid {
    grid-template-columns: 1fr;
  }
  .pr-shop-stage {
    order: -1;
  }
  .pr-insp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .pr-shopify-tool {
    padding: 12px;
  }
  .pr-shop-panel {
    padding: 12px;
  }
  .pr-shop-row {
    grid-template-columns: 1fr;
  }
  .pr-shop-field input,
  .pr-shop-field select {
    font-size: 16px;
  }
  .pr-shop-drop-btns button {
    width: 100%;
  }
  .pr-shop-list {
    grid-template-columns: 1fr;
  }
}