/* The Bermuda Means Business box, and the window its episodes play in.

   On bbc.bm it sits beside Listen to Radio News on the home page, in the place the Radio
   Interviews box had: two columns of about 337 px. So it is drawn as that player's twin,
   the same white card and the same blue as TTFN SoundCloud Player and TTFN Radio Interviews.

   Copyright (c) 2026 TTFN TV Limited. All rights reserved. */

.bbc-mb {
	--bbc-mb-accent: #005db6;
	--bbc-mb-accent-dark: #00478c;
	margin: 0 0 24px;
	padding: 14px;
	background: #fff;
	border: 1px solid #e1e5ec;
	border-radius: 10px;
	text-align: left;
	font-family: Verdana, Geneva, sans-serif;
}
.bbc-mb-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; }

.bbc-mb-link {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: #111;
	text-decoration: none;
}
.bbc-mb-link:hover .bbc-mb-name,
.bbc-mb-link:focus-visible .bbc-mb-name { color: var(--bbc-mb-accent); }
.bbc-mb-link:focus-visible { outline: 2px solid var(--bbc-mb-accent); outline-offset: 3px; border-radius: 6px; }

/* Pictures: 16:9, as the episodes are. */
.bbc-mb-thumb {
	position: relative;
	flex: 0 0 112px;
	width: 112px;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background: #0e2a52;
}
.bbc-mb .bbc-mb-thumb img, .bbc-mb-noimg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;          /* the theme shrinks images inside text blocks */
	margin: 0 !important;     /* and gives them a 21 px bottom margin */
	object-fit: cover;
	display: block;
}
.bbc-mb-noimg { background: linear-gradient(135deg, #0e2a52, #005db6); }

/* The play mark, drawn in CSS so there is nothing to load. */
.bbc-mb-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border-radius: 50%;
	background: rgba(0, 93, 182, .92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
	transition: transform .15s ease, background .15s ease;
}
.bbc-mb-play::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -6px 0 0 -3px;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent #fff;
}
.bbc-mb-link:hover .bbc-mb-play { background: var(--bbc-mb-accent-dark); transform: scale(1.08); }

.bbc-mb-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bbc-mb-date {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #6b7280;
}
/* Two lines at most, so the rows keep a steady height. */
.bbc-mb-name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.35;
}

/* The newest episode: the picture across the box, words under it. */
.bbc-mb-link--lead { flex-direction: column; gap: 8px; }
.bbc-mb-link--lead .bbc-mb-thumb { flex: none; width: 100%; border-radius: 8px; }
.bbc-mb-link--lead .bbc-mb-play { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.bbc-mb-link--lead .bbc-mb-play::after { margin: -10px 0 0 -6px; border-width: 10px 0 10px 17px; }
.bbc-mb-link--lead .bbc-mb-name { font-size: 15px; }

.bbc-mb-list { list-style: none; margin: 10px 0 0; padding: 0; }
.bbc-mb-item {
	margin: 0 !important;
	padding: 8px 0;
	border-top: 1px solid rgba(0, 0, 0, .12);
	list-style: none;
}
.bbc-mb-item::before { display: none !important; }   /* tagDiv's list bullets */

.bbc-mb-foot { margin: 8px 0 0 !important; padding-top: 8px; border-top: 1px solid rgba(0, 0, 0, .12); text-align: right; }
.bbc-mb-more { font-size: 13px; font-weight: 700; color: var(--bbc-mb-accent); text-decoration: none; }
.bbc-mb-more:hover { color: var(--bbc-mb-accent-dark); text-decoration: underline; }

/* Beside Listen to Radio News on a computer the two cards should come out level, so the
   older episodes scroll inside the box past --bbc-mb-max. Measured, not guessed: the radio
   news card is 437 px tall at 337 px wide (both cards then have the same 24 px under them);
   this card at that width is 14 + 1 px padding and border top and bottom, the newest episode
   240 px, the gap 10 px and the "All episodes" foot 40 px (beside the player its top margin
   is "auto"), which leaves 117 px: one older episode (80 px a row) and a glimpse of the
   next, which is what says there is more. With fewer episodes than that, the card stretches
   to the column's height so the two still end level. Set per placement with
   [bbc_means_business max="200"]. On a phone the columns stack and everything shows. */
.bbc-mb[style*="--bbc-mb-max"] .bbc-mb-list { max-height: var(--bbc-mb-max); overflow-y: auto; }
@media (min-width: 1141px) {
	.ttfn-duo .bbc-mb .bbc-mb-list {
		max-height: var(--bbc-mb-max, 117px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}
	.ttfn-duo__col:has(.bbc-mb) { display: flex; flex-direction: column; }
	.ttfn-duo__col > .bbc-mb { flex: 1 1 auto; display: flex; flex-direction: column; }
	.ttfn-duo .bbc-mb-foot { margin-top: auto !important; }
}

/* ---- The window ------------------------------------------------------------------- */

html.bbc-mb-open { overflow: hidden; }

.bbc-mb-window {
	width: min(960px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #0b1626;
	color: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
	overflow: auto;
	font-family: Verdana, Geneva, sans-serif;
}
.bbc-mb-window::backdrop { background: rgba(6, 12, 22, .82); }
.bbc-mb-window[open] { animation: bbc-mb-in .18s ease-out; }
@keyframes bbc-mb-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bbc-mb-window[open] { animation: none; } }

.bbc-mb-window-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px 12px;
}
.bbc-mb-window-titles { flex: 1; min-width: 0; }
.bbc-mb-window-kicker {
	margin: 0 0 3px !important;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #7fb6ee;
}
.bbc-mb-window h2.bbc-mb-window-title {
	margin: 0 !important;
	font-family: inherit;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	color: #fff;
}
.bbc-mb-close {
	flex: none;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 22px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
}
.bbc-mb-close:hover, .bbc-mb-close:focus-visible { background: rgba(255, 255, 255, .25); outline: none; }

.bbc-mb-window [hidden] { display: none !important; }
/* One player per episode, only the chosen one shown. BBC Ad Connector lays its ad and play button over it. */
.bbc-mb-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.bbc-mb-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.bbc-mb-window-foot { padding: 12px 16px 16px; }
.bbc-mb-window-date { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #9aa7b8; }
.bbc-mb-window-summary { margin: 6px 0 10px !important; font-size: 14px; line-height: 1.55; color: #dfe6ee; }
.bbc-mb-window-story { font-size: 13.5px; font-weight: 700; color: #7fb6ee; text-decoration: none; }
.bbc-mb-window-story:hover { color: #fff; text-decoration: underline; }

/* A phone held upright: the window fills the width, the words stay readable. */
@media (max-width: 600px) {
	.bbc-mb-window { width: 100vw; max-height: 100vh; border-radius: 0; }
	.bbc-mb-window-title { font-size: 16px; }
}
