/* embed.css — overrides for /embed.html when iframed on third-party sites */

html, body.embed-mode {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.embed-mode .embed-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px;
  box-sizing: border-box;
}

body.embed-mode .embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 4px 2px;
  font-size: 14px;
}

body.embed-mode .embed-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1D4ED8;
}

body.embed-mode .embed-brand .brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #1D4ED8;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

body.embed-mode main { margin: 0; padding: 0; }
body.embed-mode .calc-section { padding: 0; }
body.embed-mode .container { padding: 0; max-width: 100%; }

/* Hide everything that doesn't belong inside an embedded widget */
body.embed-mode .ad-slot,
body.embed-mode .cookie,
body.embed-mode .site-header,
body.embed-mode .site-footer,
body.embed-mode .sidebar,
body.embed-mode .hero,
body.embed-mode .content-section,
body.embed-mode .advanced,
body.embed-mode .accordion,
body.embed-mode .benchmark-table,
body.embed-mode .definition-card,
body.embed-mode .toc-card,
body.embed-mode .meta-updated {
  display: none !important;
}

body.embed-mode .embed-attribution {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  padding: 4px;
}

body.embed-mode .embed-attribution a {
  color: #1D4ED8;
  text-decoration: none;
  font-weight: 500;
}

body.embed-mode .embed-attribution a:hover {
  text-decoration: underline;
}

/* Force single-column layout in narrow iframe contexts */
@media (max-width: 720px) {
  body.embed-mode .calc-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 480px) {
  body.embed-mode .embed-wrap { padding: 8px; }
  body.embed-mode .embed-header { font-size: 13px; }
}
