/*
 * DirectMM - the card WordPress builds when an editor pastes one of our own links. Loaded inside
 * the card's own document, served from /<post>/embed/, after core's embed styles, so plain
 * specificity settles every override. The photograph sits above the title whatever its
 * proportions (the two filters in functions.php) and keeps them: a 3:2 or 4:3 makes a taller
 * card, not a cropped one; only what is taller than 4:3 is capped.
 */

/* Repeated the article's own opening, cut mid-sentence; on a phone it doubled the card. */
.wp-embed-excerpt {
	display: none;
}

.wp-embed {
	padding: 20px;
}

/* Negative side and top margins cancel that padding, so the photograph reaches the frame. */
.wp-embed-featured-image {
	margin: -20px -20px 7px;
}

/*
 * block: inline, the text baseline gap under the image added 5px to the 7px above. The
 * photograph is as wide as this document, so 75vw is the height of a 4:3: a landscape never
 * reaches it and is not cropped; a portrait or a near-square is.
 */
.wp-embed-featured-image img {
	display: block;
	max-height: 75vw;
	object-fit: cover;
}

/* break-word: nothing truncates the title, so a word wider than the card would be cut against the frame. */
p.wp-embed-heading {
	margin: 0;
	font-size: 20px;
	line-height: 1.32;
	font-weight: 600;
	overflow-wrap: break-word;
}

.wp-embed-footer {
	margin-top: 26px;
}

/* The site name and the date carry the same weight in the footer, so the same size. */
.wp-embed-site-title,
.dmm-embed-date {
	font-size: 16px;
}

/* The site symbol beside 16px text; core draws it at 25px and reserves the symbol plus 10px. */
.wp-embed-site-icon {
	width: 18px;
	height: 18px;
}

.wp-embed-site-title a {
	padding-left: 28px;
}

/* Core keeps this cell on one line for the two icon buttons the date replaces. */
.wp-embed-meta {
	white-space: normal;
}
