/* Vome — article callouts.
 *
 * Paired with portal/static/js/callout.js. A callout is a shaded box in an
 * article with a picture and a headline. Its long text is not in the flow
 * of the article: pressing the box opens it in a reader that covers most
 * of the screen, the same way a diagram enlarges.
 *
 * On a phone a callout is a full-width break between paragraphs. On a wide
 * screen `vome-callout--side` floats it beside the text.
 */

.vome-callout {
	--vc-deep: #b23c06;
	--vc-warm: #e65100;
	--vc-ink: #fff7ef;

	margin: 1.75rem 0;
	clear: both;
}

.vome-callout__card {
	display: block;
	padding: 1rem 1.1rem 1.05rem;
	border-radius: .75rem;
	background: linear-gradient(150deg, var(--vc-warm) 0%, var(--vc-deep) 100%);
	color: var(--vc-ink);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.vome-callout__card:hover,
.vome-callout__card:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 3px rgba(255, 152, 0, .45);
	outline: none;
}

.vome-callout__card svg {
	display: block;
	width: 100%;
	max-width: 15rem;
	height: auto;
	margin-bottom: .75rem;
}

/* The card is written as <p>s so it still reads with the stylesheet gone. */
.vome-article .vome-callout__card p { color: inherit; margin: 0; }
.vome-callout__kicker {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	opacity: .85;
}
.vome-callout__title {
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.25;
	margin-top: .2rem !important;
}
.vome-callout__teaser {
	font-size: .9rem;
	line-height: 1.45;
	margin-top: .45rem !important;
	opacity: .92;
}
.vome-callout__card::after {
	content: 'Open  \2192';
	display: inline-block;
	margin-top: .8rem;
	padding: .3rem .8rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--vc-deep);
	background: var(--vc-ink);
	border-radius: 999px;
}

/* The long text waits in the page for the reader to ask for it. Without
   JavaScript the template's <noscript> rule shows it in place instead. */
.vome-callout__body { display: none; }

/* Several callouts side by side, wrapping to one column on a phone. */
.vome-callout-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1rem;
	margin: 1.75rem 0;
	clear: both;
}
.vome-callout-row .vome-callout { margin: 0; display: flex; }
.vome-callout-row .vome-callout__card { flex: 1; }

@media (min-width: 992px) {
	.vome-callout--side {
		float: right;
		clear: right;
		width: 17.5rem;
		margin: .35rem 0 1.25rem 1.75rem;
	}
}

/* Floated callouts must not squeeze the things that need the full column. */
.vome-article h2,
.vome-article .vome-diagram,
.vome-article table,
.vome-article pre { clear: both; }

/* ---- reader ---------------------------------------------------------- */

.vome-callout-overlay {
	position: fixed;
	inset: 0;
	z-index: 1070;                       /* under an enlarged diagram (1080) */
	background: rgba(10, 12, 14, .84);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(.5rem, 3vw, 2.5rem);
}

.vome-callout-reader {
	display: flex;
	flex-direction: column;
	width: min(900px, 100%);
	max-height: 100%;
	background: var(--bs-body-bg, #fff);
	color: var(--bs-body-color, #212529);
	border-radius: .8rem;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.vome-callout-reader__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: linear-gradient(150deg, #e65100 0%, #b23c06 100%);
	color: #fff7ef;
}
.vome-callout-reader__head .vome-callout__kicker,
.vome-callout-reader__head .vome-callout__title { margin: 0; color: inherit; }
.vome-callout-reader__head .vome-callout__title { font-size: 1.35rem; }

.vome-callout-reader__close {
	flex: 0 0 auto;
	width: 2.4rem;
	height: 2.4rem;
	font-size: 1.6rem;
	line-height: 1;
	color: inherit;
	background: rgba(0, 0, 0, .18);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.vome-callout-reader__close:hover,
.vome-callout-reader__close:focus-visible {
	background: rgba(0, 0, 0, .38);
	outline: 2px solid rgba(255, 255, 255, .6);
}

.vome-callout-reader .vome-callout__body {
	display: block;
	padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
	overflow-y: auto;
	line-height: 1.65;
}
.vome-callout-reader .vome-callout__body > :first-child { margin-top: 0; }
.vome-callout-reader .vome-callout__body > :last-child { margin-bottom: 0; }

/* On a phone a three-column table leaves a few letters per line for the
   last column, so each row becomes a small block instead. */
@media (max-width: 575.98px) {
	.vome-callout-reader table,
	.vome-callout-reader tbody,
	.vome-callout-reader tr,
	.vome-callout-reader td { display: block; width: auto; }
	.vome-callout-reader thead { display: none; }
	.vome-callout-reader tr { padding: .7rem 0; border-bottom: 1px solid var(--bs-border-color, #495057); }
	.vome-callout-reader td { border: 0; padding: .1rem 0; }
}

/* ---- verdict chips, for "how sure are we" tables --------------------- */

.vome-chip {
	display: inline-block;
	padding: .1rem .55rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 600;
	white-space: nowrap;
	color: #0b0d10;
	background: #94a3b8;
}
.vome-chip--yes   { background: #34d399; }
.vome-chip--maybe { background: #fbbf24; }
.vome-chip--wait  { background: #fb923c; }
.vome-chip--no    { background: #f87171; }

@media (prefers-reduced-motion: reduce) {
	.vome-callout__card { transition: none; }
	.vome-callout__card:hover { transform: none; }
}
