/* Page-only layout for /imagem-para-base64/. Conversion stays in imagem-para-base64.js. */

body.page-imagem-para-base64 .b64-page {
  --b64-blue: #2563eb;
  --b64-ink: #172033;
}
@media (min-width: 1100px) {
  body.page-imagem-para-base64 .b64-page { --cv-aside: clamp(230px, 18vw, 280px); }
}
body.page-imagem-para-base64 .b64-page .conv-title {
  font-size: clamp(1.7rem, 2.2vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  hyphens: manual;
  overflow-wrap: normal;
}
body.page-imagem-para-base64 .article .b64-page .conv-lede {
  margin: 0 0 18px;
  color: #4f63b8;
  font-size: 1.02rem;
  line-height: 1.4;
  hyphens: manual;
}
body.page-imagem-para-base64 .article .b64-page .conv-perks { gap: 14px; }
body.page-imagem-para-base64 .article .b64-page .conv-perks li { gap: 12px; font-size: 0.84rem; }
body.page-imagem-para-base64 .b64-page .conv-perks strong { color: #1d4ed8; font-size: 0.95rem; }
body.page-imagem-para-base64 .b64-page .conv-perk { width: 42px; height: 42px; background-size: 22px; }
body.page-imagem-para-base64 .b64-page .conv-perk.is-formats {
  background-color: #ede9fe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='3' fill='%237c3aed'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23fff'/%3E%3Cpath d='m5 17 4.2-4.2 2.6 2.5 2.2-2 5 3.7z' fill='%23fff'/%3E%3C/svg%3E");
}
body.page-imagem-para-base64 .b64-page .conv-perk.is-web {
  background-color: #ffedd5;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f97316'/%3E%3Ccircle cx='12' cy='12' r='2.4' fill='%23fff'/%3E%3Cpath fill='%23fff' d='M12 6.2v1.6M12 16.2v1.6M6.2 12h1.6M16.2 12h1.6M8 8l1.1 1.1M14.9 14.9 16 16M16 8l-1.1 1.1M9.1 14.9 8 16'/%3E%3C/svg%3E");
}
body.page-imagem-para-base64 .b64-page .conv-perk.is-free {
  background-color: #dbeafe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='%232563eb'/%3E%3Cpath d='M12 7v7m0 0-3-3m3 3 3-3M8 17h8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.page-imagem-para-base64 .article .b64-page img.conv-art { max-width: 240px; margin-top: 16px; }

body.page-imagem-para-base64 .b64-app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--b64-ink);
}
body.page-imagem-para-base64 .b64-app [hidden] { display: none !important; }
body.page-imagem-para-base64 .b64-app > .itool-success,
body.page-imagem-para-base64 .b64-app.is-busy > .itool-busy-banner { display: none !important; }
body.page-imagem-para-base64 .b64-off { display: none !important; }

body.page-imagem-para-base64 .b64-page .conv-board {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  body.page-imagem-para-base64 .b64-page .conv-board { grid-template-columns: minmax(0, 1fr); }
}
body.page-imagem-para-base64 .b64-page .conv-stack,
body.page-imagem-para-base64 .b64-panel { gap: 14px; }
body.page-imagem-para-base64 .b64-panel { display: flex; flex-direction: column; min-width: 0; }
body.page-imagem-para-base64 .b64-page .conv-card,
body.page-imagem-para-base64 .b64-page .conv-steps {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
}
body.page-imagem-para-base64 .b64-page .conv-steps li > span:first-child {
  width: 36px;
  height: 36px;
  background: #e8eef8;
  color: #64748b;
}
body.page-imagem-para-base64 .b64-page .conv-steps li.is-on > span:first-child {
  background: var(--b64-blue);
  color: #fff;
}
body.page-imagem-para-base64 .b64-page .conv-steps li.is-done > span:first-child {
  background: #16a34a;
  color: #fff;
}
body.page-imagem-para-base64 .b64-page .conv-steps li.is-on strong { color: var(--b64-blue); }
body.page-imagem-para-base64 .b64-page .conv-steps li:not(:last-child)::after {
  content: "→";
  margin-left: auto;
  padding-left: 8px;
  color: #94a3b8;
  font-weight: 700;
}
body.page-imagem-para-base64 .b64-page .conv-card-title { color: var(--b64-blue); }
body.page-imagem-para-base64 .b64-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--b64-blue);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

body.page-imagem-para-base64 .b64-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.page-imagem-para-base64 .b64-modes button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-weight: 750;
  cursor: pointer;
}
body.page-imagem-para-base64 .b64-modes button.is-active {
  border-color: var(--b64-blue);
  background: var(--b64-blue);
  color: #fff;
}

body.page-imagem-para-base64 .b64-app .itool-drop {
  min-height: 210px;
  margin: 0;
  padding: 22px 16px 16px;
  border: 1.5px dashed #7eb6f6;
  border-radius: 16px;
  background: #f5f9ff;
  box-shadow: none;
}
body.page-imagem-para-base64 .b64-app .itool-drop-title {
  max-width: 26rem;
  color: #1e3a8a;
  font-size: 1.05rem;
  font-weight: 800;
}
body.page-imagem-para-base64 .b64-app .conv-cloud {
  width: 72px;
  height: 72px;
  background-color: #e7f1ff;
  background-size: 46px;
  box-shadow: none;
}
body.page-imagem-para-base64 .b64-drop-note { margin: 8px 0 0; color: #64748b; font-size: 0.8rem; }
body.page-imagem-para-base64 .b64-app button.itool-drop-sample {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}
body.page-imagem-para-base64 .b64-app button.itool-drop-sample::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.4' fill='%23475569' stroke='none'/%3E%3Cpath d='m4 16 4.5-4 3 2.8 2.2-2 6.3 5.2'/%3E%3C/svg%3E") center / 16px no-repeat;
}

body.page-imagem-para-base64 .b64-views,
body.page-imagem-para-base64 .b64-use-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 10px;
  border-bottom: 1px solid #e6edf5;
}
body.page-imagem-para-base64 .b64-views button,
body.page-imagem-para-base64 .b64-use-tabs button {
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}
body.page-imagem-para-base64 .b64-views button.is-on,
body.page-imagem-para-base64 .b64-use-tabs button.is-on {
  border-bottom-color: var(--b64-blue);
  background: #f5f9ff;
  color: var(--b64-blue);
}
body.page-imagem-para-base64 .b64-app textarea.b64-out {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 280px;
  margin: 0;
  padding: 12px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-all;
  resize: vertical;
}
body.page-imagem-para-base64 .b64-outsize {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.8rem;
}
body.page-imagem-para-base64 .b64-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
body.page-imagem-para-base64 .b64-app .b64-actions .itool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  font-weight: 750;
}
body.page-imagem-para-base64 .b64-app .b64-actions .itool-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.page-imagem-para-base64 .b64-app .b64-actions button.b64-copy {
  flex: 1 1 180px;
  border-color: var(--b64-blue);
  background: var(--b64-blue);
  color: #fff;
}
body.page-imagem-para-base64 .b64-app .b64-actions button.b64-copy:disabled {
  opacity: 0.5;
}
@media (min-width: 1100px) {
  body.page-imagem-para-base64 .b64-app .b64-actions { flex-wrap: nowrap; }
  body.page-imagem-para-base64 .b64-app .b64-actions .itool-btn {
    flex: 1 1 0;
    padding: 8px 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  body.page-imagem-para-base64 .b64-app .b64-actions button.b64-copy { flex: 1.35 1 0; }
}

body.page-imagem-para-base64 .b64-prev {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
body.page-imagem-para-base64 .b64-app:not(.is-decode) .b64-prev:not(:has(#b64-preview:not([hidden]))),
body.page-imagem-para-base64 .b64-app.is-decode .b64-prev:not(:has(#b64-dec-preview:not([hidden]))) {
  grid-template-columns: minmax(0, 1fr);
}
body.page-imagem-para-base64 .b64-prev-frame {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 8px;
  border-radius: 12px;
  background: #f4f7fb;
  overflow: hidden;
}
body.page-imagem-para-base64 .b64-prev-frame img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  border-radius: 8px;
}
body.page-imagem-para-base64 .b64-prev-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}
body.page-imagem-para-base64 .b64-app:not(.is-decode) .b64-prev-frame:has(#b64-preview:not([hidden])) .b64-prev-empty,
body.page-imagem-para-base64 .b64-app.is-decode .b64-prev-frame:has(#b64-dec-preview:not([hidden])) .b64-prev-empty { display: none; }
body.page-imagem-para-base64 .b64-app.is-decode #b64-preview,
body.page-imagem-para-base64 .b64-app:not(.is-decode) #b64-dec-preview { display: none !important; }
body.page-imagem-para-base64 .b64-facts { margin: 0; }
body.page-imagem-para-base64 .b64-facts div {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f7;
}
body.page-imagem-para-base64 .b64-facts div:last-child { border-bottom: 0; }
body.page-imagem-para-base64 .b64-facts dt { color: #94a3b8; font-size: 0.75rem; }
body.page-imagem-para-base64 .b64-facts dd {
  margin: 0;
  color: #172033;
  font-size: 0.92rem;
  font-weight: 750;
  word-break: break-word;
}
body.page-imagem-para-base64 .article .b64-facts { list-style: none; }

body.page-imagem-para-base64 .b64-ok {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
  color: #166534;
}
body.page-imagem-para-base64 .b64-ok strong,
body.page-imagem-para-base64 .b64-ok p { display: block; margin: 0; }
body.page-imagem-para-base64 .b64-ok p { color: #15803d; font-size: 0.86rem; line-height: 1.4; }
body.page-imagem-para-base64 .b64-ok-i {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #22c55e url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body.page-imagem-para-base64 .b64-bulb {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #dbeafe url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18h6M10 21h4' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M8 14a5 5 0 1 1 8 0c-.7.8-1.2 1.6-1.4 2.5H9.4C9.2 15.6 8.7 14.8 8 14z' fill='%232563eb'/%3E%3C/svg%3E") center / 18px no-repeat;
}
body.page-imagem-para-base64 .b64-snippet {
  position: relative;
  min-width: 0;
  padding: 12px 42px 12px 12px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #f8fafc;
}
body.page-imagem-para-base64 .b64-snippet pre {
  margin: 0;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}
body.page-imagem-para-base64 .b64-snippet-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
body.page-imagem-para-base64 .b64-snippet-copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
body.page-imagem-para-base64 .b64-snippet-copy:disabled { opacity: 0.45; cursor: not-allowed; }
body.page-imagem-para-base64 .b64-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.86rem;
  line-height: 1.4;
}
body.page-imagem-para-base64 .b64-note p { margin: 0; }
body.page-imagem-para-base64 .b64-note-i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--b64-blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}
body.page-imagem-para-base64 .b64-label {
  display: block;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}
body.page-imagem-para-base64 .b64-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.page-imagem-para-base64 .b64-app #b64-status {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
body.page-imagem-para-base64 .b64-app #b64-status.is-error,
body.page-imagem-para-base64 .b64-app #b64-status.is-loading {
  position: static !important;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
}
body.page-imagem-para-base64 .b64-app #b64-status.is-error { background: #fef2f2; color: #b91c1c; }
body.page-imagem-para-base64 .b64-app #b64-status.is-loading { background: #eff6ff; color: #1d4ed8; }

body.page-imagem-para-base64 .b64-park:not(:has(.itool-next, .itool-hist-host)) { display: none; }
body.page-imagem-para-base64 .b64-park { margin-top: 8px; }
body.page-imagem-para-base64 .b64-app.is-decode #b64-use { display: none; }

@media (max-width: 720px) {
  body.page-imagem-para-base64 .b64-prev { grid-template-columns: 1fr; }
  body.page-imagem-para-base64 .b64-app .itool-drop-actions { flex-direction: column; align-items: stretch; }
  body.page-imagem-para-base64 .b64-app .itool-drop-actions .itool-btn { width: 100%; }
}

html[data-theme="dark"] body.page-imagem-para-base64 .b64-app .itool-drop { background: #0f1b33; }
html[data-theme="dark"] body.page-imagem-para-base64 .b64-app textarea.b64-out,
html[data-theme="dark"] body.page-imagem-para-base64 .b64-snippet,
html[data-theme="dark"] body.page-imagem-para-base64 .b64-modes button:not(.is-active) {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] body.page-imagem-para-base64 .b64-facts dd,
html[data-theme="dark"] body.page-imagem-para-base64 .b64-snippet pre { color: #e2e8f0; }
