/* MeloTools finish layer — calm utility layout, July 2026. */

html[data-color-mode="dark"] {
  color-scheme: dark;
}

html {
  scroll-padding-top: 118px;
}

body {
  overflow-x: clip;
}

:where(h1, h2, h3) {
  text-wrap: balance;
}

:where(p, .note, .sub) {
  text-wrap: pretty;
}

:where(button, a, input, select, textarea, summary) {
  touch-action: manipulation;
}

:where(.section[id], h1[id], h2[id], h3[id]) {
  scroll-margin-top: 124px;
}

:where(.btn, .tabbtn, .theme-option, .lang-current, .lang-option, .footer-pix-copy, .footer-link) {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity;
  transition-duration: 160ms;
  transition-timing-function: ease;
}

html[data-ui-theme="saas"] .nav-rail-label,
html[data-ui-theme="saas"] .nav-rail-label-tools,
html[data-ui-theme="xp"] .nav-rail-label,
html[data-ui-theme="xp"] .nav-rail-label-tools {
  justify-content: center !important;
  text-align: center !important;
}

html[data-ui-theme="saas"] #toolTabs.tool-tabs,
html[data-ui-theme="saas"] body #toolTabs.tool-tabs,
html[data-ui-theme="xp"] #toolTabs.tool-tabs {
  justify-content: center !important;
  margin-inline: auto !important;
}

.section.show {
  width: min(100%, 1040px);
  margin-inline: auto;
}

.section.show > :is(h2, .title) {
  max-width: 780px;
  margin-inline: auto;
}

.section.show > :is(.sub, .note):not(.mt-inline-result) {
  max-width: 760px;
  margin-inline: auto;
}

.section :where(input, select, textarea, button) {
  min-width: 0;
}

.section :where(.inputs, .mt-legacy-controls, .media-action-strip) {
  justify-content: center;
}

.tool-search-row:focus-within {
  border-color: #4b8fe4 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important;
}

html[data-ui-theme="xp"] .tool-search-row:focus-within {
  outline: 1px dotted #111 !important;
  outline-offset: 2px !important;
}

html[data-ui-theme="xp"] .xp-dialog-btn:focus-visible {
  outline: 1px dotted #111 !important;
  outline-offset: 2px !important;
}

.mt-site-footer,
html[data-ui-theme="saas"] .mt-site-footer,
html[data-ui-theme="xp"] .mt-site-footer {
  box-sizing: border-box !important;
  width: min(1040px, calc(100vw - 28px)) !important;
  max-width: 1040px !important;
  margin: 28px auto max(18px, env(safe-area-inset-bottom)) !important;
  padding: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
}

html[data-ui-theme="saas"] .mt-site-footer {
  border: 1px solid #dce6ef !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #17324a !important;
  box-shadow: 0 14px 34px rgba(23, 50, 74, .07) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.mt-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: 28px;
  padding: 24px 26px 22px;
}

.mt-footer-copy,
.mt-footer-actions {
  min-width: 0;
}

.mt-footer-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #1769d2;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mt-footer-copy h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.16;
  letter-spacing: -.025em;
}

.mt-footer-copy p {
  max-width: 590px;
  margin: 8px 0 0;
  color: #667b8e;
  font-size: 13px;
  line-height: 1.55;
}

.mt-footer-actions {
  display: grid;
  gap: 9px;
}

.mt-footer-pix-action,
.mt-footer-contact {
  transition: transform 160ms ease, box-shadow 160ms ease !important;
}

.mt-footer-pix-action,
html[data-ui-theme="saas"] .mt-footer-pix-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 9px 12px 9px 15px;
  border: 1px solid #bdd4ed;
  border-radius: 11px;
  background: #f3f8fd;
  color: #173b62;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.mt-footer-pix-action:hover {
  border-color: #7eaddf;
  background: #eaf4ff;
  transform: translateY(-1px);
}

.mt-footer-pix-action:focus-visible,
.mt-footer-contact:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.mt-footer-pix-action.is-copied {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16784a !important;
  color: #fff !important;
  border-color: #16784a !important;
  font-weight: 800;
}

.mt-footer-pix-action .footer-pix {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit !important;
  font-size: 13px;
  font-weight: 780 !important;
  letter-spacing: .01em;
}

.mt-footer-action-label {
  color: #1769d2;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.mt-footer-contact,
html[data-ui-theme="saas"] .mt-footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #dce6ef;
  border-radius: 11px;
  background: #fff;
  color: #31536f !important;
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
}

.mt-footer-contact:hover {
  border-color: #b9cbdc;
  background: #f8fafc;
  color: #173b62 !important;
}

.mt-footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border-top: 1px solid #e7edf3;
  background: #f8fafc;
  color: #718394;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.mt-footer-meta a {
  color: #496a86;
  font-weight: 760;
  text-underline-offset: 3px;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-site-footer {
  border-color: #2a3d4e !important;
  background: #0d1823 !important;
  color: #eff6fc !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .22) !important;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-copy p {
  color: #9eb0bf;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-eyebrow,
html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-action-label {
  color: #7db5f5;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-pix-action {
  border-color: #31506d !important;
  background: #102438 !important;
  color: #d9ebff !important;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-pix-action:hover {
  border-color: #4777a4 !important;
  background: #15304a !important;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-contact {
  border-color: #2a3d4e !important;
  background: #111f2c !important;
  color: #bdd0df !important;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-contact:hover {
  border-color: #405a70 !important;
  background: #162837 !important;
  color: #f1f7fc !important;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-meta {
  border-top-color: #253748;
  background: #0a141e;
  color: #91a5b6;
}

html[data-ui-theme="saas"][data-color-mode="dark"] .mt-footer-meta a {
  color: #9fc8f7;
}

html[data-ui-theme="xp"] .mt-site-footer {
  position: relative;
  padding: 29px 3px 3px !important;
  border: 1px solid #003c74 !important;
  border-radius: 6px 6px 3px 3px !important;
  background: #ece9d8 !important;
  color: #111 !important;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, .24) !important;
  font-family: Tahoma, "MS Sans Serif", sans-serif !important;
  font-size: 12px !important;
}

html[data-ui-theme="xp"] .mt-site-footer::before {
  content: "MeloTools — Rodapé";
  position: absolute;
  inset: 3px 3px auto;
  display: flex;
  align-items: center;
  height: 23px;
  padding: 0 7px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #0a246a, #3a6ea5);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 1px 1px #0a246a;
}

html[data-ui-theme="xp"] .mt-footer-main {
  gap: 18px;
  padding: 18px;
  border: 1px solid #7f9db9;
  background: #fff;
}

html[data-ui-theme="xp"] .mt-footer-eyebrow {
  color: #0a246a;
}

html[data-ui-theme="xp"] .mt-footer-copy h2 {
  font-size: 17px;
  letter-spacing: 0;
}

html[data-ui-theme="xp"] .mt-footer-copy p {
  color: #444;
}

html[data-ui-theme="xp"] .mt-footer-pix-action,
html[data-ui-theme="xp"] .mt-footer-contact {
  min-height: 32px !important;
  border: 1px solid #003c74 !important;
  border-radius: 2px !important;
  background: #ece9d8 !important;
  color: #111 !important;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #aca899 !important;
}

html[data-ui-theme="xp"] .mt-footer-pix-action:hover,
html[data-ui-theme="xp"] .mt-footer-contact:hover {
  background: #f5f3e9 !important;
  transform: none !important;
}

html[data-ui-theme="xp"] .mt-footer-action-label {
  color: #0a246a;
}

html[data-ui-theme="xp"] .mt-footer-meta {
  min-height: 34px;
  border-top: 3px solid #ece9d8;
  background: #ece9d8;
  color: #333;
}

html[data-ui-theme="xp"] .mt-footer-meta a {
  color: #0000ee;
}

@media (max-width: 720px) {
  .mt-footer-main {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 21px 18px 18px;
    text-align: center;
  }

  .mt-footer-copy p {
    margin-inline: auto;
  }

  .mt-footer-actions {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .mt-footer-meta {
    gap: 6px 8px;
  }
}

@media (max-width: 420px) {
  .mt-site-footer,
  html[data-ui-theme="saas"] .mt-site-footer,
  html[data-ui-theme="xp"] .mt-site-footer {
    width: calc(100vw - 20px) !important;
  }

  .mt-footer-pix-action {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 3px;
  }

  .mt-footer-meta > span[aria-hidden="true"] {
    display: none;
  }

  .mt-footer-meta {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.btn, .tabbtn, .theme-option, .lang-current, .lang-option, .footer-pix-copy, .footer-link) {
    transition-duration: .001ms !important;
  }
}
