/* Converter foto P&B — page dashboard. Does not restyle the site header. */

body.page-converter-foto-preto-e-branco-online.is-fullscreen .fs-workspace.pbw-fs {
  min-height: 0;
  border: 0;
  background: #f4f7fc;
  padding: 18px 20px 12px;
}

body.page-converter-foto-preto-e-branco-online .fs-chrome { display: none; }

.pbw-app {
  --pbw-ink: #172554;
  --pbw-body: #3d4d6a;
  --pbw-muted: #64748b;
  --pbw-card: #fff;
  --pbw-line: #e4ebf5;
  --pbw-soft: #f3f6fb;
  --pbw-blue: #2f6fed;
  --pbw-blue-dark: #1d4ed8;
  --pbw-blue-soft: #e8f0ff;
  --pbw-green: #16a34a;
  --pbw-green-dark: #15803d;
  box-sizing: border-box;
  width: min(1440px, 100%);
  margin: 0 auto;
  color: var(--pbw-body);
  font-size: 15px;
  line-height: 1.45;
}

.pbw-app *,
.pbw-app *::before,
.pbw-app *::after { box-sizing: border-box; }

.pbw-app p,
.pbw-app h1,
.pbw-app h2,
.pbw-app h3,
.pbw-app ul,
.pbw-app figure { margin: 0; text-align: left; }

.pbw-app ul,
.pbw-app li { margin: 0; padding: 0; list-style: none; }

.article .pbw-app li::before,
.thecontent .pbw-app li::before { content: none; }

.pbw-app button,
.pbw-app input,
.pbw-app select { font: inherit; }

.pbw-app svg { display: block; max-width: none; flex: none; }
.pbw-app svg[width="16"] { width: 16px; height: 16px; }
.pbw-app svg[width="18"] { width: 18px; height: 18px; }
.pbw-app svg[width="20"] { width: 20px; height: 20px; }
.pbw-app svg[width="36"] { width: 36px; height: 36px; }

.pbw-app [hidden] { display: none !important; }

.pbw-sr,
.pbw-app canvas.pbw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pbw-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pbw-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.pbw-hero-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }

.pbw-hero-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 16px;
  background: #e8f0ff;
  color: var(--pbw-blue);
}

.pbw-title {
  color: var(--pbw-ink);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pbw-lede { margin-top: 4px; color: var(--pbw-muted); font-size: 0.95rem; }

.pbw-app .pbw-perks {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pbw-perks li { display: flex; align-items: center; gap: 8px; }
.pbw-perk-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f0ff;
  color: var(--pbw-blue);
}
.pbw-perks strong { display: block; color: var(--pbw-ink); font-size: 0.92rem; }
.pbw-perks li span span { display: block; color: var(--pbw-muted); font-size: 0.78rem; line-height: 1.25; }

.pbw-app .iadj-status,
.pbw-app #pbw-status {
  min-height: 1.2em;
  margin: 0 0 12px;
  color: var(--pbw-muted);
  font-size: 0.84rem;
}
.pbw-app #pbw-status.is-error { color: #b91c1c; }
.pbw-app #pbw-status.is-ok { color: #15803d; }
.pbw-app #pbw-status.is-loading { color: var(--pbw-blue); }

.pbw-grid {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(250px, 300px);
  gap: 16px;
  align-items: start;
}

.pbw-card,
.pbw-tips {
  background: var(--pbw-card);
  border: 1px solid var(--pbw-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.pbw-card { padding: 16px 16px 14px; }

.pbw-col,
.pbw-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pbw-step,
.pbw-app .pbw-side-title,
.pbw-app .pbw-tips h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--pbw-ink);
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 800;
}

.pbw-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pbw-blue);
  color: #fff;
  font-size: 0.82rem;
}

.pbw-label {
  display: block;
  margin-bottom: 8px;
  color: var(--pbw-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.pbw-tones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

#pbw-tints,
#pbw-look-tools { display: contents; }

.pbw-tones button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 4px 7px;
  border: 1px solid var(--pbw-line);
  border-radius: 10px;
  background: #fff;
  color: var(--pbw-ink);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.pbw-tones button::before {
  content: "";
  width: 100%;
  height: 36px;
  border-radius: 6px;
  background:
    linear-gradient(#8ec5ef, transparent 58%),
    linear-gradient(#c5d7a4, #6d7d55);
}

.pbw-tones [data-tint="none"]::before,
.pbw-tones [data-look="classico"]::before { filter: grayscale(1) contrast(1.05); }
.pbw-tones [data-look="suave"]::before { filter: grayscale(0.45) contrast(0.95); }
.pbw-tones [data-look="drama"]::before { filter: grayscale(1) contrast(1.45); }
.pbw-tones [data-look="sepia"]::before { filter: sepia(0.9) contrast(1.05); }
.pbw-tones [data-look="cool"]::before { filter: grayscale(0.85) sepia(0.35) hue-rotate(180deg) saturate(1.4); }

#pbw-tints [data-tint="sepia"],
#pbw-tints [data-tint="cool"] { display: none !important; }

.pbw-tones button.is-active {
  border-color: var(--pbw-blue);
  box-shadow: 0 0 0 1px var(--pbw-blue);
  background: var(--pbw-blue-soft);
}

.pbw-field { margin-top: 12px; }

.pbw-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--pbw-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.pbw-field-head span { color: var(--pbw-blue); font-variant-numeric: tabular-nums; }

.pbw-app input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pbw-app input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pbw-blue) var(--pbw-pct, 0%), #e2e8f0 var(--pbw-pct, 0%));
}

.pbw-app input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pbw-blue);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.pbw-app input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.pbw-app input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--pbw-blue);
}

.pbw-app input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pbw-blue);
}

.pbw-app select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--pbw-line);
  border-radius: 10px;
  background: #fff;
  color: var(--pbw-ink);
}

.pbw-run,
.pbw-batch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--pbw-blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.pbw-run:hover:not(:disabled),
.pbw-batch:hover:not(:disabled) { background: var(--pbw-blue-dark); }
.pbw-run:disabled,
.pbw-batch:disabled { opacity: 0.55; cursor: not-allowed; }

.pbw-batch { margin-top: 8px; background: #fff; color: var(--pbw-blue); border: 1px solid var(--pbw-blue); }

.pbw-text-btn {
  display: inline-flex;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pbw-blue);
  font-weight: 700;
  cursor: pointer;
}

.pbw-text-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.pbw-stage-col { min-width: 0; }

.pbw-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 460px;
  padding: 28px 16px;
  border: 1.5px dashed #c5d4ea;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.pbw-drop-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--pbw-blue-soft);
  color: var(--pbw-blue);
}

.pbw-drop-title { color: var(--pbw-ink); font-weight: 800; }
.pbw-drop-hint { color: var(--pbw-muted); font-size: 0.82rem; }

.pbw-drop-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.pbw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--pbw-line);
  border-radius: 12px;
  background: #fff;
  color: var(--pbw-blue);
  font-weight: 700;
  cursor: pointer;
}

.pbw-btn-primary { border-color: transparent; background: var(--pbw-blue); color: #fff; }
.pbw-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.pbw-app.is-empty .pbw-stage { display: none; }
.pbw-app:not(.is-empty) .pbw-drop { display: none; }

.pbw-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pbw-panes:not(:has(#pbw-result-pane:not([hidden]))) {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}

.pbw-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--pbw-line);
  border-radius: 16px;
  background: #fff;
}

.pbw-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--pbw-blue);
  font-size: 0.92rem;
  font-weight: 800;
}

.pbw-badge {
  color: var(--pbw-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.pbw-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 460px;
  overflow: auto;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-color: #f8fafc;
}

.pbw-shot canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% * var(--zoom, 1));
  max-height: calc(100% * var(--zoom, 1));
}

.pbw-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.pbw-zoom button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--pbw-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pbw-ink);
  cursor: pointer;
}

.pbw-zoom-full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pbw-dl-split { display: flex; gap: 0; }
.pbw-dl {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: var(--pbw-green);
  color: #fff;
  cursor: pointer;
}
.pbw-dl:disabled { background: #94a3b8; cursor: not-allowed; }
.pbw-dl:hover:not(:disabled) { background: var(--pbw-green-dark); }
.pbw-dl-main { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.pbw-dl-main strong { font-size: 0.95rem; }
.pbw-dl-main small { font-size: 0.72rem; font-weight: 650; opacity: 0.9; }
.pbw-dl-more {
  width: 42px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0 12px 12px 0;
  background: var(--pbw-green);
  color: #fff;
  cursor: pointer;
}
.pbw-dl-more:hover { background: var(--pbw-green-dark); }

.pbw-fmt-menu {
  display: grid;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid var(--pbw-line);
  border-radius: 10px;
  background: #fff;
}
.pbw-fmt-menu button {
  padding: 8px 12px;
  border: 0;
  border-top: 1px solid var(--pbw-line);
  background: #fff;
  color: var(--pbw-ink);
  text-align: left;
  cursor: pointer;
}
.pbw-fmt-menu button:first-child { border-top: 0; }
.pbw-fmt-menu button.is-on { background: var(--pbw-blue-soft); color: var(--pbw-blue); font-weight: 800; }

.pbw-share { width: 100%; margin-top: 8px; }
.pbw-wa { color: #128c7e; border-color: #b7e4dc; }

.pbw-info { display: grid; margin: 0; }
.pbw-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--pbw-line);
  font-size: 0.86rem;
}
.pbw-info div:first-child { border-top: 0; }
.pbw-info dt { margin: 0; color: var(--pbw-muted); }
.pbw-info dd { margin: 0; color: var(--pbw-ink); font-weight: 700; text-align: right; }

.pbw-tips { padding: 14px; background: #fff8e8; border-color: #f3e3b0; }
.pbw-tips h2 { color: #92400e; }
.pbw-tips h2 svg { color: #d97706; }
.pbw-tips li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  color: #78350f;
  font-size: 0.84rem;
}
.pbw-tips li svg { margin-top: 2px; color: #16a34a; }

.pbw-app .itool-hist-host { margin-top: 14px; }
.pbw-app .itool-hist-host[hidden] { display: none !important; }
.pbw-app .itool-hist-list { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.article .pbw-app .itool-hist-list > li,
.pbw-app .itool-hist-list > li { margin: 0; }

.pbw-app .aib-panel,
.pbw-app #pbw-batch-panel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--pbw-line);
  border-radius: 12px;
  background: var(--pbw-soft);
}

@media (max-width: 1180px) {
  .pbw-grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
  .pbw-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .pbw-tips { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  body.page-converter-foto-preto-e-branco-online.is-fullscreen .fs-workspace.pbw-fs { padding: 12px 12px 8px; }
  .pbw-hero { flex-direction: column; align-items: flex-start; }
  .pbw-app .pbw-perks { display: none; }
  .pbw-grid,
  .pbw-side { grid-template-columns: 1fr; }
  .pbw-panes { grid-template-columns: 1fr; }
  .pbw-shot { height: 280px; }
  .pbw-drop { min-height: 240px; }
}

html[data-theme="dark"] body.page-converter-foto-preto-e-branco-online.is-fullscreen .fs-workspace.pbw-fs,
html.dark body.page-converter-foto-preto-e-branco-online.is-fullscreen .fs-workspace.pbw-fs { background: #0b1220; }

html[data-theme="dark"] .pbw-app,
html.dark .pbw-app {
  --pbw-ink: #e2e8f0;
  --pbw-body: #cbd5e1;
  --pbw-muted: #94a3b8;
  --pbw-card: #111827;
  --pbw-line: #243044;
  --pbw-soft: #1e293b;
  --pbw-blue-soft: #1e3a5f;
}

html[data-theme="dark"] .pbw-drop,
html.dark .pbw-drop,
html[data-theme="dark"] .pbw-shot,
html.dark .pbw-shot,
html[data-theme="dark"] .pbw-tones button,
html.dark .pbw-tones button,
html[data-theme="dark"] .pbw-app select,
html.dark .pbw-app select { background: #0f172a; color: var(--pbw-ink); }

html[data-theme="dark"] .pbw-tips,
html.dark .pbw-tips { background: #2a2112; border-color: #5c4a1e; }
html[data-theme="dark"] .pbw-tips h2,
html[data-theme="dark"] .pbw-tips li,
html.dark .pbw-tips h2,
html.dark .pbw-tips li { color: #fde68a; }

/* Mockup pass: same grid as the other tools, one left card, two panes always */
.pbw-grid {
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) minmax(240px, 280px);
  gap: 14px;
}

.pbw-col {
  gap: 0;
  padding: 4px 0;
  border: 1px solid var(--pbw-line);
  border-radius: 18px;
  background: var(--pbw-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.pbw-col > .pbw-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pbw-col > .pbw-card + .pbw-card {
  margin: 0 16px;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid var(--pbw-line);
}

.pbw-panes:not(:has(#pbw-result-pane:not([hidden]))) {
  grid-template-columns: 1fr 1fr;
  justify-content: stretch;
}

.pbw-panes:has(#pbw-result-pane:not([hidden])) .pbw-pane-ph { display: none; }

.pbw-pane-head { color: var(--pbw-ink); flex-wrap: wrap; align-content: flex-start; min-height: 50px; }
.pbw-pane-head .pbw-badge { max-width: 100%; }

.pbw-badge {
  padding: 3px 9px;
  border-radius: 8px;
  background: #f1f5f9;
  font-weight: 600;
}

.pbw-badge:empty { display: none; }

.pbw-shot {
  height: 500px;
  background: #f3f6fb;
}

@media (max-width: 1180px) {
  .pbw-grid { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .pbw-grid { grid-template-columns: 1fr; }
  .pbw-panes:not(:has(#pbw-result-pane:not([hidden]))) { grid-template-columns: 1fr; }
  .pbw-pane-ph { display: none; }
  .pbw-shot { height: 280px; }
}

html[data-theme="dark"] .pbw-shot,
html.dark .pbw-shot { background: #0f172a; }

/* Download: one solid green button, format chips underneath */
.pbw-dl { border-radius: 12px; min-height: 56px; }
.pbw-dl:disabled { background: var(--pbw-green); opacity: 0.55; }

.pbw-fmt-menu {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pbw-fmt-menu button {
  flex: 1;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--pbw-line);
  border-radius: 999px;
  background: #fff;
  color: var(--pbw-ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.pbw-fmt-menu button:first-child { border-top: 1px solid var(--pbw-line); }
.pbw-fmt-menu button:hover { background: var(--pbw-blue-soft); }

.pbw-fmt-menu button.is-on {
  border-color: var(--pbw-blue);
  background: var(--pbw-blue-soft);
  color: var(--pbw-blue);
}
