/**
 * OTA Author Card widget styles.
 *
 * The author band: a 159px round portrait, an uppercase credential eyebrow,
 * the name, a short bio, and one button on the right. Figma component "Author
 * Card", instance node 268:4755 on the content page frame 220:39887.
 *
 * Every colour is a colour theme role, mapped once in the token block below.
 * The frame binds the design's bar/* set, role for role what the theme system
 * carries, and the Teal theme resolves each to exactly the frame's value,
 * which is why the fallbacks below are the teal numbers:
 *
 *   card surface   bar/background     --ota-background    #005361
 *   eyebrow        bar/logo           --ota-logo          #d4f0d9
 *   name           bar/White Text     --ota-white-text    #ffffff
 *   bio            bar/text-muted     --ota-text-muted    #f0e7d8
 *   button         .ota-btn--primary, which reads cta-bg / cta-text itself
 *
 * BUT NOTE: on a page with any theme in force the roles resolve and the
 * fallbacks never fire, so the card ships expecting the editor to set its
 * Colour Theme to Teal, the same move the CTA Banner expects. On the site
 * default (Ash) the card is an ash card, correctly.
 *
 * Typography comes from the Elementor global fonts where a slot exists. The
 * eyebrow is the caption slot with a local bold, uppercase and tracking; the
 * name's 28px and the bio's 15px have no slot in the type scale, so both are
 * local constants with the Figma numbers on them (the bio shares the 15px the
 * Secondary Nav's label uses).
 *
 * The 14px radius is the design's radius/md. Figma reports it on this
 * component even though it would not on the CTA Banner's panel, so unlike
 * that widget's curve this one is read straight off the node.
 */

/*
 * THE SAME CARD ON AN AUTHOR ARCHIVE, WITH NO RULES OF ITS OWN
 *
 * Archive::view_intro() draws this component above the author's list of
 * articles, inside the archive layout's results column. That column
 * (.ota-results__main, ota-search.css) is a flex column with its own gap, so
 * the card needs no wrapper and no margins here: the layout it sits in does
 * the spacing, the same as for the toolbar and the cards below it.
 */
.ota-author {
	--oac-surface: var(--ota-background, #005361);
	--oac-eyebrow: var(--ota-logo, #d4f0d9);
	--oac-name: var(--ota-white-text, #fff);
	--oac-text: var(--ota-text-muted, #f0e7d8);

	/* The frame's own measurements. */
	--oac-radius: 14px;
	--oac-pad: 28px 34px;
	--oac-gap: 30px;
	--oac-portrait: 159px;

	display: flex;
	align-items: flex-start;
	gap: var(--oac-gap);
	padding: var(--oac-pad);
	border-radius: var(--oac-radius);
	/* The one editor override, falling through to the surface role. */
	background-color: var(--oac-card-bg, var(--oac-surface));
}

.ota-author__media {
	flex: none;
	width: var(--oac-portrait);
	height: var(--oac-portrait);
	border-radius: 50%;
	overflow: hidden;
}

/*
 * Two classes, not one. Elementor's own `.elementor img { height: auto }` is
 * a class and an element, which quietly beats a single class, and on a
 * portrait `height: auto` means the image keeps its aspect ratio inside the
 * 159px circle and paints an ellipse. Absolute anchoring is no escape either:
 * a replaced element with `height: auto` sizes from its intrinsic ratio even
 * when both vertical anchors are set.
 */
.ota-author .ota-author__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;

	/*
	 * The theme rounds every image in the content region by a few px from an
	 * id-strength rule (`main#agendtheme-content ... img { border-radius:
	 * var(--at-border-radius) }`). Inside this circle that paints notched
	 * corners just inside the clip. Same settlement as the Category Feature:
	 * feed the theme's own rule the value the design wants instead of
	 * fighting the id, and state it plainly for anywhere the theme rule does
	 * not reach.
	 */
	--at-border-radius: 50%;

	border-radius: 50%;
}

.ota-author__inner {
	display: flex;
	align-items: center;
	gap: var(--oac-gap);
	flex: 1;
	min-width: 0;
	/*
	 * Keeps the row no shorter than the portrait, so the text block centres
	 * against it the way the frame draws, instead of hugging the top edge the
	 * card's own alignment gives the media column.
	 */
	min-height: var(--oac-portrait);
}

.ota-author__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.ota-author__eyebrow {
	margin: 0;
	font-size: var(--e-global-typography-caption-font-size, 0.75rem);
	font-weight: 700;
	line-height: 1.65;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--oac-eyebrow);
}

.ota-author__name {
	margin: 0;
	/* 28px: no slot in the AAA type scale, see the header note. */
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: var(--oac-name);
}

/* The eyebrow sits 6px over the name, tighter than the body's 13px flow. */
.ota-author__eyebrow + .ota-author__name {
	margin-top: -7px;
}

.ota-author__bio {
	margin: 0;
	/* 15px: no slot in the AAA type scale, shared with the Secondary Nav label. */
	font-size: 0.9375rem;
	font-weight: 300;
	line-height: 1.55;
	color: var(--oac-text);
}

.ota-author__action {
	flex: none;
}

/*
 * Below the desktop layout the card stacks: portrait, then text, then the
 * button, each flush left. The portrait comes down a step so it does not
 * dominate a narrow card.
 */
@media (max-width: 900px) {
	.ota-author {
		flex-direction: column;
	}

	.ota-author__media {
		width: 120px;
		height: 120px;
	}

	.ota-author__inner {
		flex-direction: column;
		align-items: flex-start;
		min-height: 0;
		width: 100%;
	}
}
