/**
 * dopic.app - Minimalist Tool Stylesheet for [redact]
 * Clean, modern Linear/Apple aesthetic
 */

.app-box {
  max-width: 980px;
  margin: 1.5rem auto 2.5rem auto;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(15, 23, 42, 0.03);
  padding: 1.75rem 2rem;
  box-sizing: border-box;
}

/* Privacy Suite Tabs */
.suite-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.suite-tabs-nav {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #e2e8f0;
}
.suite-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  user-select: none;
}
.suite-tab-item:hover {
  color: #0f172a;
}
.suite-tab-item.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Preview Showcase Area */
.preview-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.stage-frame {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Minimalist Before / After Compare Stage */
.compare-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 290px;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}
@media (max-width: 600px) {
  .compare-stage {
    height: 240px;
  }
}

.compare-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.compare-clipped {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: polygon(var(--split-pos, 50%) 0, 100% 0, 100% 100%, var(--split-pos, 50%) 100%);
  pointer-events: none;
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split-pos, 50%);
  width: 1.5px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 30;
}

.compare-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  border: 1px solid #cbd5e1;
  transition: transform 0.15s ease;
}
.compare-stage:hover .compare-thumb {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Minimalist Indicators */
.indicator-badge {
  position: absolute;
  top: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 25;
  pointer-events: none;
  user-select: none;
}
.indicator-badge.unmasked {
  left: 10px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #e2e8f0;
  color: #64748b;
}
.indicator-badge.masked {
  right: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Card Mockup Elements (Rendered inside layers) */
.card-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.card-mini-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-mini-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #475569;
}
.card-mini-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
}
.card-mini-badge.protected {
  background: #ecfdf5;
  color: #059669;
}

.card-mini-body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.card-mini-avatar {
  width: 68px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
}
.card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-mini-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skel-row {
  display: flex;
  align-items: center;
}
.skel-line {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
}
.skel-line.dark {
  background: #cbd5e1;
}
.skel-id-num {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.05em;
}

.card-mini-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #f8fafc;
}

/* Redaction Effects in Mockup */
.redact-fbi-bar {
  height: 18px;
  background: #09090b !important;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.redact-eye-blur {
  position: absolute;
  top: 26%;
  left: 8%;
  right: 8%;
  height: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.redact-pixel-box {
  background: repeating-conic-gradient(#059669 0% 25%, #047857 0% 50%) 50% / 6px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}


/* Minimalist Upload Bar */
.preview-upload-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin-top: 14px;
}
#previewShowcase.is-editing .preview-upload-bar,
.preview-upload-bar.is-hidden {
  display: none !important;
}

.btn-preview-upload {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.btn-preview-upload:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.btn-preview-upload:active {
  transform: scale(0.98);
}

.upload-security-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Live Canvas Stage */
.canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent !important;
  border-radius: 12px;
  width: fit-content !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: none;
  cursor: crosshair;
}
#redactCanvas {
  max-width: 100% !important;
  max-height: 68vh !important;
  width: auto !important;
  height: auto !important;
  border-radius: 10px;
  display: block !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  touch-action: none;
}

/* Workspace Editing Controls */
.workspace-wrap {
  display: none;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 780px;
  margin: 1.25rem auto 0 auto;
}

/* Safety Studio Tab Bar */
.safety-tab-bar {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin: 0 auto;
}
.safety-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.safety-tab-btn:hover {
  color: #0f172a;
}
.safety-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.safety-tab-btn#tabBtnRedact.active {
  color: #dc2626;
}
.safety-tab-btn#tabBtnWatermark.active {
  color: #0284c7;
}

/* Redact Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mode-group {
  display: flex;
  gap: 0.4rem;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.mode-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
.mode-btn.active {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 600;
}
.mode-btn.btn-undo {
  color: #64748b;
}

.mode-icon-solid {
  display: inline-block;
  width: 11px;
  height: 11px;
  background: #0f172a;
  border-radius: 2px;
}
.mode-btn.active .mode-icon-solid {
  background: #dc2626;
}

.mode-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mode-status-badge {
  font-size: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mode-hint-text {
  font-size: 0.75rem;
  color: #64748b;
}

/* Secondary Options Bar */
.sub-option-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.sub-ctrl-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.sub-ctrl-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.sub-ctrl-badge {
  color: #2563eb;
  background: #eff6ff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  font-size: 0.75rem;
}
.sub-ctrl-badge.pixel-badge {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.sub-ctrl-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 140px;
  max-width: 280px;
}
.sub-ctrl-slider-wrap input[type="range"] {
  flex: 1;
  accent-color: #0f172a;
  cursor: pointer;
  height: 4px;
}

.sub-ctrl-presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.preset-pill {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.preset-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
}
#blurControls .preset-pill.active {
  background: #2563eb;
  border-color: #2563eb;
}
#pixelControls .preset-pill.active {
  background: #059669;
  border-color: #059669;
}

/* Embedded Watermark Controls */
.wm-tab-panel {
  width: 100%;
}
.wm-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.wm-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.wm-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 640px) {
  .wm-field-row {
    grid-template-columns: 1fr;
  }
}
.wm-field-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.wm-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wm-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}
.wm-val-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 1px 5px;
  border-radius: 6px;
}
.wm-input, .wm-select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.84rem;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
}
.wm-input:focus, .wm-select:focus {
  border-color: #0284c7;
  background: #ffffff;
}
.wm-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.wm-tag {
  font-size: 0.72rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
}
.wm-tag:hover {
  background: #e0f2fe;
  color: #0369a1;
}
.wm-color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
}
.wm-color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease;
}
.wm-color-dot.color-white {
  background: #ffffff;
  border-color: #cbd5e1;
}
.wm-color-dot.color-black {
  background: #0f172a;
}
.wm-color-dot.color-red {
  background: #dc2626;
}
.wm-color-dot.color-blue {
  background: #2563eb;
}
.wm-color-dot.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #0284c7;
}

/* Actions */
.btn-action-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.65rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-reupload {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}
.btn-reupload:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}
.btn-download {
  background: #0f172a;
  color: #ffffff;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.btn-download:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.btn-download:active {
  transform: scale(0.98);
}