/* BWD Quick Actions: buttons and video popup, matched to the theme's
   orange and ink, with motion limited to transform and opacity. */

.bwd-qa-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 1.5rem;
}

.bwd-qa-row--floating {
	justify-content: center;
	padding: 12px 16px;
}

.bwd-qa-row + .bwd-btn { margin-top: 0.75rem; }

.bwd-qa-btn {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #e2e6ec;
	border-radius: 999px;
	background: #fff;
	color: #10151f;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.bwd-qa-btn:hover { transform: translateY(-1px); }
.bwd-qa-btn:active { transform: translateY(0) scale(0.98); opacity: 0.9; }
.bwd-qa-btn:focus-visible { outline: 2px solid #f97d0a; outline-offset: 2px; }
.bwd-qa-btn svg { flex: none; }

.bwd-qa-btn--wa { border-color: #1e9e57; background: #1e9e57; color: #fff; }
.bwd-qa-btn--wa:focus-visible { outline-color: #10151f; }

/* Hero buttons sit beside the theme's own; keep them the same height. */
.bwd-qa-btn--hero { flex: 0 0 auto; min-height: 48px; padding-inline: 20px; font-size: 0.9375rem; }
/* The inner-page hero is dark; the homepage hero is light and uses white
   secondary buttons, so match each. */
.bwd-page-hero .bwd-qa-btn--hero:not(.bwd-qa-btn--wa) {
	border-color: rgb(255 255 255 / 35%);
	background: rgb(255 255 255 / 8%);
	color: #fff;
}

.bwd-hero2 .bwd-qa-btn--hero:not(.bwd-qa-btn--wa) {
	border-color: #e2e6ec;
	border-radius: 12px;
	background: #fff;
	color: #10151f;
	box-shadow: 0 1px 2px rgb(16 21 31 / 6%);
}

.bwd-hero2 .bwd-qa-btn--hero { border-radius: 12px; }

@media (prefers-color-scheme: dark) {
	.bwd-qa-btn:not(.bwd-qa-btn--wa):not(.bwd-qa-btn--hero) { border-color: #2b3342; background: #151b26; color: #eef1f6; }
}

/* ---------------------------------------------------- popup */

.bwd-qa-modal {
	/* The theme's CSS reset removes the native dialog's auto margins, which
	   is what centres it; restore them explicitly. */
	position: fixed;
	inset: 0;
	margin: auto;
	height: fit-content;
	width: min(960px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #0b0f16;
	color: #fff;
	box-shadow: 0 30px 80px -20px rgb(0 0 0 / 60%);
	overflow: hidden;
}

.bwd-qa-modal::backdrop { background: rgb(8 10 14 / 78%); }
.bwd-qa-modal[open] { animation: bwd-qa-in 220ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes bwd-qa-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

.bwd-qa-modal__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 10px 10px 18px;
}

.bwd-qa-modal__title { margin: 0; overflow: hidden; font-size: 0.9375rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

.bwd-qa-modal__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 10%);
	color: #fff;
	cursor: pointer;
	transition: transform 160ms ease, opacity 160ms ease;
}

.bwd-qa-modal__close:hover { transform: scale(1.06); }
.bwd-qa-modal__close:active { transform: scale(0.96); }
.bwd-qa-modal__close:focus-visible { outline: 2px solid #f97d0a; outline-offset: 2px; }

.bwd-qa-modal__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.bwd-qa-modal__frame iframe,
.bwd-qa-modal__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (prefers-reduced-motion: reduce) {
	.bwd-qa-btn, .bwd-qa-modal__close { transition: none; }
	.bwd-qa-modal[open] { animation: none; }
}
