/* 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: 880px;
  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: #0F766E;
}

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

body.embed-mode #calculator {
  margin: 0;
}

body.embed-mode .calculator-card {
  margin: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  border-radius: 10px;
}

/* Hide anything 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 .definition-card,
body.embed-mode .toc-card {
  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: #0F766E;
  text-decoration: none;
  font-weight: 500;
}

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

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

/* Smaller padding on very narrow widths */
@media (max-width: 480px) {
  body.embed-mode .embed-wrap {
    padding: 8px;
  }
  body.embed-mode .embed-header {
    font-size: 13px;
  }
}
