/* PicReady Edit Text in Image — scoped to .pr-et-tool */
.pr-et-tool {
  background: var(--pr-surface, #ffffff);
  border: 1px solid var(--pr-line, #dce3f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(21, 28, 44, 0.05);
}
.pr-et-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-page, #f4f6fb);
}
.pr-et-top-left,
.pr-et-top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pr-et-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  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;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pr-et-btn:hover:not(:disabled) {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
}
.pr-et-btn-primary {
  background: var(--pr-accent, #2f46c9);
  border-color: var(--pr-accent, #2f46c9);
  color: #ffffff;
}
.pr-et-btn-primary:hover:not(:disabled) {
  background: var(--pr-accent-active, #2336a3);
  border-color: var(--pr-accent-active, #2336a3);
}
.pr-et-btn-ai {
  background: #151c2c;
  border-color: #151c2c;
  color: #ffffff;
}
.pr-et-btn-ai:hover:not(:disabled) {
  background: #28344e;
  border-color: #28344e;
}
.pr-et-btn-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.pr-et-btn-danger:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #f87171;
}
.pr-et-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.8125rem;
  font-weight: 700;
}
.pr-et-points-pill:hover {
  background: #ffedd5;
  border-color: #fb923c;
}
.pr-et-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--pr-muted, #55627a);
}
.pr-et-user-chip img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}
.pr-et-banner {
  padding: 9px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-bottom: 1px solid var(--pr-line, #dce3f0);
  background: #ecfdf5;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pr-et-banner[data-tone="error"] {
  background: #fef2f2;
  color: #991b1b;
}
.pr-et-banner[data-tone="info"] {
  background: #eff6ff;
  color: #1e40af;
}
.pr-et-grid {
  display: grid;
  grid-template-columns: minmax(300px, 345px) minmax(0, 1fr);
  min-height: 540px;
}
.pr-et-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-page, #f4f6fb);
  min-width: 0;
}
.pr-et-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 9px;
  background: #e6ebf5;
}
.pr-et-mode-tabs button {
  min-height: 38px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--pr-muted, #55627a);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pr-et-mode-tabs button[aria-pressed="true"] {
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
.pr-et-badge-pts {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.75rem;
  font-weight: 700;
}
.pr-et-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--pr-ink, #151c2c);
}
.pr-et-text-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}
.pr-et-text-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 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;
  text-align: left;
}
.pr-et-text-item:hover {
  border-color: var(--pr-accent, #2f46c9);
}
.pr-et-text-item[aria-selected="true"] {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
  font-weight: 600;
}
.pr-et-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.pr-et-item-tag {
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  flex-shrink: 0;
}
.pr-et-item-tag[data-kind="erased"] {
  background: #fee2e2;
  color: #b91c1c;
}
.pr-et-inspector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
}
.pr-et-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pr-muted, #55627a);
}
.pr-et-field input,
.pr-et-field select,
.pr-et-field textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  color: var(--pr-ink, #151c2c);
  font-size: 0.875rem;
}
.pr-et-field input[type="color"] {
  height: 36px;
  padding: 3px;
}
.pr-et-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pr-et-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pr-et-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--pr-studio-canvas, #f7f9fd);
  min-width: 0;
}
.pr-et-drop {
  width: 100%;
  max-width: 560px;
  border: 2px dashed var(--pr-line, #dce3f0);
  border-radius: 12px;
  background: var(--pr-surface, #ffffff);
  padding: 36px 24px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pr-et-drop.pr-dragover {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
}
.pr-et-drop strong {
  display: block;
  font-size: 1.0625rem;
  color: var(--pr-ink, #151c2c);
  margin-bottom: 6px;
}
.pr-et-drop p {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--pr-muted, #55627a);
  line-height: 1.5;
}
.pr-et-drop-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pr-et-drop-btns .pr-et-btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9375rem;
}
.pr-et-privacy-note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--pr-muted, #55627a);
}
.pr-et-canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1);
  background: #ffffff;
}
.pr-et-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 620px;
  width: auto;
  height: auto;
}
.pr-et-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pr-et-box {
  position: absolute;
  border: 1.5px dashed rgba(47, 70, 201, 0.72);
  background: rgba(47, 70, 201, 0.08);
  border-radius: 3px;
  pointer-events: auto;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pr-et-box:hover {
  background: rgba(47, 70, 201, 0.18);
  border-style: solid;
}
.pr-et-box[data-selected="true"] {
  border: 2px solid #2f46c9;
  background: rgba(47, 70, 201, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.pr-et-box[data-modified="true"] {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.08);
}
.pr-et-busy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(3px);
  z-index: 20;
  padding: 20px;
  text-align: center;
}
.pr-et-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid #dce3f0;
  border-top-color: var(--pr-accent, #2f46c9);
  animation: pr-et-spin 0.8s linear infinite;
}
@keyframes pr-et-spin {
  to { transform: rotate(360deg); }
}
.pr-et-status-bar {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--pr-muted, #55627a);
  text-align: center;
}
.pr-et-presets-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pr-et-presets-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--pr-muted, #55627a);
}
.pr-et-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pr-et-chip {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-page, #f4f6fb);
  color: var(--pr-ink, #151c2c);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pr-et-chip:hover {
  border-color: var(--pr-accent, #2f46c9);
  background: var(--pr-selection-bg, #e9edff);
  color: var(--pr-accent, #2f46c9);
}
.pr-et-tool .pr-seeli-handoff {
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--pr-line, #dce3f0);
  background: var(--pr-surface, #ffffff);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--pr-muted, #55627a);
}
.pr-et-tool .pr-seeli-handoff[hidden] {
  display: none;
}
.pr-et-tool .pr-seeli-handoff a {
  color: var(--pr-accent, #2f46c9);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.pr-et-tool .pr-seeli-handoff a:hover {
  text-decoration: underline;
}

/* Modal (Buy Compute Points & Sign-In Gate) */
.pr-et-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.56);
  display: grid;
  place-items: center;
  padding: 16px;
}
.pr-et-modal {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}
.pr-et-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #151c2c;
  color: #ffffff;
}
.pr-et-modal-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
}
.pr-et-modal-close {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-size: 1.375rem;
  line-height: 1;
  padding: 4px 8px;
}
.pr-et-modal-close:hover {
  color: #ffffff;
}
.pr-et-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pr-et-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pr-et-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--pr-line, #dce3f0);
  background: #fafbfc;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pr-et-pack-card:hover {
  border-color: var(--pr-accent, #2f46c9);
}
.pr-et-pack-card[aria-pressed="true"] {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #ea580c;
}
.pr-et-pack-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.pr-et-pack-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pr-ink, #151c2c);
}
.pr-et-pack-off {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c2410c;
}
.pr-et-pack-price {
  font-size: 1.375rem;
  font-weight: 750;
  color: #151c2c;
}
.pr-et-pack-pts {
  font-size: 0.875rem;
  color: var(--pr-ink, #151c2c);
  font-weight: 600;
}
.pr-et-pack-foot {
  font-size: 0.75rem;
  color: var(--pr-muted, #55627a);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 6px;
}
.pr-et-faq-box {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--pr-muted, #55627a);
  background: var(--pr-page, #f4f6fb);
  padding: 12px 14px;
  border-radius: 9px;
}
.pr-et-pay-cta {
  width: 100%;
  min-height: 46px;
  border-radius: 9px;
  border: 0;
  background: #151c2c;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}
.pr-et-pay-cta:hover:not(:disabled) {
  background: #28344e;
}
@media (max-width: 840px) {
  .pr-et-grid {
    grid-template-columns: 1fr;
  }
  .pr-et-sidebar {
    border-right: 0;
    border-top: 1px solid var(--pr-line, #dce3f0);
    order: 2;
  }
  .pr-et-stage {
    order: 1;
    padding: 14px;
  }
}
@media (max-width: 640px) {
  .pr-et-pack-grid {
    grid-template-columns: 1fr;
  }
  .pr-et-drop-btns .pr-et-btn {
    width: 100%;
  }
  .pr-et-field input,
  .pr-et-field select,
  .pr-et-field textarea {
    font-size: 16px;
  }
}