/* BlindWMLocal tool UI (extends ShrinkLocal site.css) */

.tool-card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}

.tool-card-fields {
  padding-top: 18px;
}

.tool-card-upload .preview-wrap:not([hidden]) {
  margin-top: 16px;
  margin-bottom: 0;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.field input[type='text'],
.field input[type='number'],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

/* Watermark text & embed strength — ShrinkLocal red theme blocks */
.field.wm-text,
.field.wm-strength {
  padding: 16px 18px;
  margin-bottom: 18px;
  background: var(--gradient-soft);
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.wm-text-head,
.wm-strength-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wm-text-head label,
.wm-strength-head label {
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}

.wm-text-count {
  flex-shrink: 0;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 10px;
}

.field.wm-text .wm-text-input {
  width: 100%;
  min-height: 80px;
  margin: 0;
  padding: 12px 14px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(185, 28, 28, 0.28);
  border-radius: 12px;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field.wm-text .wm-text-input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.field.wm-text .wm-text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.wm-capacity {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(185, 28, 28, 0.12);
}

.wm-capacity label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent-dark);
}

.wm-capacity-input {
  width: 100%;
  max-width: 8rem;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid rgba(185, 28, 28, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.wm-capacity-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.wm-capacity-hint {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.wm-strength-value {
  flex-shrink: 0;
  min-width: 2.75rem;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  background: var(--gradient);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(127, 29, 29, 0.28);
}

.wm-strength-range {
  display: block;
  width: 100%;
  height: 10px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  accent-color: var(--primary-dark);
  cursor: pointer;
}

.wm-strength-range:focus-visible {
  outline: 2px solid rgba(185, 28, 28, 0.45);
  outline-offset: 4px;
}

.wm-strength-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #fee2e2 0%,
    #fca5a5 28%,
    #b91c1c 62%,
    #7f1d1d 100%
  );
  box-shadow: inset 0 1px 2px rgba(69, 10, 10, 0.12);
}

.wm-strength-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 2px 8px rgba(127, 29, 29, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wm-strength-range:active::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.2);
}

.wm-strength-range::-moz-range-track {
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #fee2e2 0%,
    #fca5a5 28%,
    #b91c1c 62%,
    #7f1d1d 100%
  );
  box-shadow: inset 0 1px 2px rgba(69, 10, 10, 0.12);
}

.wm-strength-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 2px 8px rgba(127, 29, 29, 0.35);
}

.wm-strength-hint {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.preview-wrap:not([hidden]) {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

/* ShrinkLocal blog cards (homepage) */
.wm-guides {
  margin: 28px 0 0;
  padding: 22px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.wm-guides-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--accent-dark);
}

.wm-guides-lead {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.wm-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.wm-guide-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--gradient-soft);
  border: 1px solid rgba(185, 28, 28, 0.16);
  border-radius: 14px;
}

.wm-guide-thumb {
  display: block;
  margin: 0 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
}

.wm-guide-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.wm-guide-card-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 600;
}

.wm-guide-card-title a {
  color: var(--accent-dark);
  text-decoration: none;
}

.wm-guide-card-title a:hover {
  color: var(--violet);
}

.wm-guide-card-desc {
  margin: 0;
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.wm-guides-more {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.wm-guides-more a {
  font-weight: 600;
}

@media (max-width: 900px) {
  .wm-guide-list {
    grid-template-columns: 1fr;
  }
}

.preview-wrap img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 8px;
}

.result-card .result-format-label {
  margin: 16px 0 8px;
}

.wm-download-notice {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border: 1px solid rgba(234, 88, 12, 0.35);
  border-left: 4px solid #ea580c;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
}

.wm-download-notice-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #9a3412;
}

.wm-download-notice p:last-child {
  margin: 0;
}

.wm-download-notice code {
  font-size: 0.8125rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 6px;
}

.wm-download-notice a {
  font-weight: 600;
}

.format-options.wm-formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .format-options.wm-formats {
    grid-template-columns: 1fr;
  }
}

.format-options.wm-formats label {
  max-width: none;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  box-sizing: border-box;
}

.format-options.wm-formats label:has(input:checked) {
  border-color: rgba(127, 29, 29, 0.4);
  background: var(--gradient-soft);
  box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.12);
}

.result-meta .result-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 16px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.result-meta .result-meta-table th,
.result-meta .result-meta-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.result-meta .result-meta-table th {
  width: 38%;
  max-width: 140px;
  font-weight: 600;
  color: var(--text);
  background: #fafafa;
  border-right: 1px solid var(--border);
}

.result-meta .result-meta-table td {
  color: var(--muted);
  word-break: break-word;
}

.result-meta .result-meta-table tr + tr th,
.result-meta .result-meta-table tr + tr td {
  border-top: 1px solid var(--border);
}

.result-meta .result-meta-table code {
  font-size: 0.8125rem;
}

.result-meta-muted {
  color: var(--muted);
  font-weight: normal;
}

.controls.wm-quality {
  margin-top: 12px;
}

.controls.wm-quality input[type='range'] {
  flex: 1;
  accent-color: var(--violet);
}

.status-msg {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 12px;
  min-height: 1.2em;
}

.status-msg.ok {
  color: var(--success);
}

.status-msg.err {
  color: var(--error);
}

.result-text {
  background: #f5f5f4;
  padding: 12px;
  border-radius: 10px;
  word-break: break-all;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.result-success {
  color: var(--success);
  font-weight: 600;
}

.result-fail {
  color: var(--error);
  font-weight: 600;
}

/* Detect — probe console */

.probe-log-panel {
  margin-top: 16px;
}

.probe-log-panel[hidden] {
  display: none !important;
}

.probe-console {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #0f1419;
  color: #c8d0da;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.probe-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1a2332 0%, #121820 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.probe-console-title {
  font-weight: 600;
  color: #e8edf4;
  letter-spacing: 0.02em;
}

.probe-console-badge {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(185, 28, 28, 0.25);
  color: #fca5a5;
}

.probe-console[data-phase='complete'] .probe-console-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.probe-log {
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
}

.probe-log-line {
  display: grid;
  grid-template-columns: 4.5rem 4.5rem 1fr;
  gap: 8px 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.probe-log-line:last-child {
  border-bottom: none;
}

.probe-log-ts {
  color: #64748b;
}

.probe-log-tag {
  color: #94a3b8;
  font-weight: 600;
}

.probe-log-ok .probe-log-msg {
  color: #6ee7b7;
}

.probe-log-warn .probe-log-msg {
  color: #fcd34d;
}

.probe-log-err .probe-log-msg {
  color: #f87171;
}

.probe-log-muted .probe-log-msg {
  color: #94a3b8;
}

.probe-log-detail {
  grid-column: 2 / -1;
  color: #64748b;
  font-size: 0.6875rem;
  word-break: break-all;
}

@media (min-width: 640px) {
  .probe-log-line {
    grid-template-columns: 4.5rem 5rem minmax(0, 1fr) minmax(0, 1.2fr);
  }
  .probe-log-detail {
    grid-column: auto;
  }
}

.probe-log-summary {
  margin: 0;
  padding: 10px 14px;
  background: #121820;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.6875rem;
}

.detect-watermark-text {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  text-align: left;
}

.detect-watermark-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #166534;
}

.detect-watermark-value {
  margin: 0;
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #14532d;
}

.detect-decoded-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  text-align: left;
}

.detect-decoded-preview code {
  font-size: 0.9rem;
  word-break: break-all;
}

.detect-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.score-ring {
  text-align: center;
  min-width: 140px;
}

.score-ring .score-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

.tag-low {
  background: #ecfdf5;
  color: #047857;
}

.tag-medium {
  background: #fffbeb;
  color: #b45309;
}

.tag-high {
  background: #fef2f2;
  color: #b91c1c;
}

.heatmap-img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 12px;
}

.wm-viz-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.wm-viz-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.wm-viz-hint {
  margin: 0 0 12px;
}

.wm-viz-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wm-viz-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.wm-viz-tab.active {
  border-color: rgba(127, 29, 29, 0.4);
  background: var(--gradient-soft);
}

.wm-viz-pane figcaption {
  margin-top: 8px;
}

.wm-viz-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.wm-viz-text-box {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.wm-viz-text-box .result-text {
  margin: 8px 0 12px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

/* File size increase guide (after embed) */

.size-guide-panel {
  margin-top: 16px;
  text-align: left;
}

.size-warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #78350f;
  margin-bottom: 12px;
}

.size-warn-mild {
  background: var(--gradient-soft);
  border-color: var(--border);
  color: var(--muted);
}

.size-guide-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  overflow: hidden;
}

.size-guide-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 14px;
  list-style: none;
  color: var(--text);
}

.size-guide-details summary::-webkit-details-marker {
  display: none;
}

.size-guide-details summary::after {
  content: ' ▾';
  color: var(--muted);
  float: right;
}

.size-guide-details[open] summary::after {
  transform: rotate(180deg);
  display: inline-block;
}

.size-guide-body {
  padding: 0 14px 14px;
  font-size: 0.875rem;
  color: var(--muted);
}

.size-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 14px;
  margin: 12px 0;
  background: linear-gradient(135deg, #f9fafb 0%, #fef2f2 100%);
  border: 1px dashed rgba(185, 28, 28, 0.25);
  border-radius: 12px;
  max-width: 100%;
}

.size-flow-compress {
  background: linear-gradient(135deg, #fffbeb 0%, #ecfdf5 100%);
}

.size-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  max-width: 120px;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 0.75rem;
}

.size-flow-step strong {
  color: var(--text);
  font-size: 0.8125rem;
}

.size-flow-step-mid {
  border-style: dashed;
  background: #fafafa;
}

.size-flow-step-warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.size-flow-step-ok {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.size-flow-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.size-flow-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--gradient-soft);
  padding: 2px 8px;
  border-radius: 10px;
}

.size-flow-size {
  font-size: 0.6875rem;
  color: var(--muted);
}

.size-flow-sub {
  font-size: 0.625rem;
  color: var(--muted);
}

.size-flow-arrow {
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}

.size-guide-list {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.size-guide-list li {
  margin-bottom: 6px;
}

.size-cta {
  margin-top: 14px;
  padding: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.size-cta p {
  margin: 0 0 12px;
  color: var(--text);
}

.size-cta .btn {
  display: inline-block;
  text-decoration: none;
}

.product-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  margin-left: 8px;
  vertical-align: middle;
}
