/* Shared footer treatment, only enabled by the investment-platform example. */
.platform-info-button,
.platform-frame .platform-info-button,
.platform-frame #info-toggle.platform-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  height: 27px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #e5eaf1;
  border-radius: 999px;
  background: #fff;
  color: #8793a5;
  font:
    400 9px 'Inter',
    'Segoe UI',
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.platform-info-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.4;
}
.platform-info-button:hover,
.platform-info-button[aria-expanded='true'] {
  border-color: #cbd5e1;
  background: #f7f9fc;
}
.platform-info-button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.platform-frame .embed-metric-footer,
.platform-frame footer,
.investor-calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 27px;
  color: #8793a5;
  font:
    400 9px 'Inter',
    'Segoe UI',
    sans-serif;
}
.platform-frame .embed-metric-footer .powered-by {
  color: #8793a5;
  font-size: 9px;
}

.platform-frame .platform-footer-details {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: none;
}

.platform-frame .embed-metric-footer > .powered-by,
.platform-frame footer > :last-child:not(.platform-footer-details) {
  flex-shrink: 0;
  margin-left: auto;
}
.platform-frame .embed-metric-info,
.platform-frame .insight-info,
.investor-calendar-info {
  position: relative;
  flex: 0 0 auto;
}
.platform-frame .platform-info-popover,
.platform-frame #info-text.platform-info-popover,
.platform-info-popover {
  position: absolute;
  inset: auto auto calc(100% + 8px) 0;
  z-index: 10;
  width: min(300px, calc(100vw - 60px));
  max-height: 350px;
  overflow-y: auto;
  padding: 13px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  color: #42526a;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 14%);
  font:
    400 10px/1.5 'Inter',
    'Segoe UI',
    sans-serif;
}
.platform-info-popover[hidden] {
  display: none;
}
.platform-info-popover p {
  margin: 6px 0 0;
}
.platform-info-popover h2 {
  margin: 0 0 4px;
  color: #42526a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.platform-info-popover section + section {
  margin-top: 12px;
}
.platform-frame .platform-footer-details .platform-source {
  min-width: 0;
  margin: 0;
  color: #8793a5;
  font-size: 9px;
  white-space: normal;
}
.platform-frame[data-chart-controls='external'] .embed-metric-toolbar,
.platform-frame[data-chart-controls='external'] .comparison-toolbar {
  display: none;
}
.platform-frame .embed-metric-event-controls {
  margin: 6px 0;
}
.platform-frame.comparison-feature-frame .comparison-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}
.platform-comparison-controls {
  grid-column: 2;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.platform-frame .platform-comparison-controls .comparison-value-selector,
.platform-frame .platform-comparison-controls .comparison-period-selector {
  grid-column: auto;
  grid-row: auto;
  margin: 0;
}
.platform-frame .platform-comparison-controls .comparison-secondary-controls {
  min-height: 0;
  margin: 0;
}

.platform-frame .embed-metric-toolbar > .embed-range-selector {
  grid-column: 2;
  justify-self: end;
}

.platform-frame .embed-metric-periodicity {
  justify-self: end;
}

.platform-frame .controls > .segmented {
  margin-left: auto;
}

/* One metric-pill definition for the parent and both opt-in iframe renderers. */
.investor-metrics button,
.platform-frame .comparison-metric-selector button,
.platform-frame .metric-pill,
.platform-frame .metric-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  color: #42526a;
  background: #fbfcfe;
  font:
    600 10px/1.2 'Inter',
    'Segoe UI',
    sans-serif;
  white-space: nowrap;
}
.investor-metrics button[aria-pressed='true'],
.platform-frame .comparison-metric-selector button.active,
.platform-frame .metric-pill,
.platform-frame .metric-tabs button.active {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}
.investor-metrics button:hover,
.platform-frame .comparison-metric-selector button:hover,
.platform-frame .metric-tabs button:hover {
  border-color: #bfd1f8;
  color: #42526a;
}
.investor-metrics button[aria-pressed='true']:hover,
.platform-frame .comparison-metric-selector button.active:hover,
.platform-frame .metric-tabs button.active:hover {
  color: #fff;
}
html[data-heading='external'] .platform-frame .controls {
  padding-right: 0;
}
.investor-calendar-footer {
  padding: 12px 18px 0;
}
html[data-heading='external'] #macro-embed-frame-root .card-head,
html[data-heading='external'] #macro-embed-frame-root .embed-metric-selector {
  display: none;
}
