/* WordPress oEmbed cards have their own document, including in sandboxed
   iframes. prefers-color-scheme follows the embedding page's color-scheme,
   so the card also responds to the theme toggle without reloading. */
:root {
  color-scheme: light;
  --surface: #FFFFFF;
  --line: #E3E6EB;
  --ink: #1B1E24;
  --ink-2: #5A626E;
  --primary: #2660C8;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface: #1D2026;
    --line: #2A2E36;
    --ink: #E9EBEF;
    --ink-2: #9AA3B0;
    --primary: #8FB4F2;
  }
}

.wp-embed {
  color: var(--ink-2);
  background: var(--surface);
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: none;
}
.wp-embed a { color: var(--ink-2); }
.wp-embed-heading a, .wp-embed-site-title a { color: var(--ink); }
.wp-embed .wp-embed-more,
.wp-embed a:hover,
.wp-embed-meta a:hover { color: var(--primary); }

/* The share dialog lives inside the card and needs the same palette. */
.wp-embed-share-dialog {
  color: var(--ink);
  background: var(--surface);
  border-radius: 6px;
}
.wp-embed-share-tab-button button { color: var(--ink-2); }
.wp-embed-share-tab-button button:hover,
.wp-embed-share-tab-button [aria-selected="true"] { color: var(--primary); }
.wp-embed-share-tab-button + .wp-embed-share-tab-button { border-color: var(--line); }
p.wp-embed-share-description { color: var(--ink-2); }
.wp-embed-share-input {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
}
.wp-embed-share-tab-button button:focus,
.wp-embed a:focus,
.wp-embed-share-dialog-open:focus,
.wp-embed-share-dialog-close:focus,
.wp-embed-share-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* WordPress's close glyph is white; its other glyphs are gray SVG images. */
.wp-embed-share-dialog-close .dashicons { filter: brightness(.4); }
@media (prefers-color-scheme: dark) {
  .wp-embed .dashicons { filter: brightness(1.6); }
  .wp-embed-share-dialog-close .dashicons { filter: none; }
}
