/*
 * Donation widget block.
 * All values taken from Figma: Brook Checkout w Donations, node 22900-147.
 * Styles the widget card interior only — the surrounding section (image,
 * background, layout) is handled by GenerateBlocks.
 */

.brook-donate-widget {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.brook-donate-widget,
.brook-donate-widget * {
	box-sizing: border-box;
}

/* Tab switcher
   Figma: 6px gap, 17px/40px/21px padding, top radius 8px (radius-s).
   Active: #fff bg, #5c2c68 text. Dormant: #f5f3eb bg, #686868 text. */
.brook-donate-widget__tabs {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	width: 100%;
}

.brook-donate-widget__tab {
	flex: 1 1 0;
	min-width: 1px;
	padding: 17px 40px 21px;
	border: 0;
	border-radius: 8px 8px 0 0;
	background: #f5f3eb;
	color: #686868;
	font-family: obviously-narrow, sans-serif;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.22px;
	line-height: normal;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

.brook-donate-widget__tab.is-active {
	background: #fff;
	color: #5c2c68;
}

/* Card body — Figma: #fff bg, bottom radius 8px, 35px vertical padding, 50px gap */
.brook-donate-widget__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	width: 100%;
	padding: 35px 25px;
	background: #fff;
	border-radius: 0 0 8px 8px;
}

.brook-donate-widget__selection {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
}

/* Amount buttons — Figma: 16px gap, 11px/25px padding, 4px radius, 1px black
   border, Lexend Bold 22px. Selected: #5c2c68 bg + border, #fff text. */
.brook-donate-widget__amounts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 16px;
}

.brook-donate-widget__amounts[hidden] {
	display: none;
}

.brook-donate-widget__amount {
	position: relative;
	padding: 11px 25px;
	background: #fff;
	border: 1px solid #000;
	border-radius: 4px;
	color: #000;
	font-family: "Lexend", sans-serif;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.22px;
	line-height: normal;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

/* Hover matches the selected state but without the pointer tail.
   Scoped to hover-capable devices so touch screens don't get stuck states. */
@media (hover: hover) {
	.brook-donate-widget__amount:hover {
		background: #5c2c68;
		border-color: #5c2c68;
		color: #fff;
	}
}

.brook-donate-widget__amount.is-selected {
	background: #5c2c68;
	border-color: #5c2c68;
	color: #fff;
}

/* Pointer tail below the selected amount */
.brook-donate-widget__amount.is-selected::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -8px;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #5c2c68;
}

/* "Other" input — Figma: 11px padding, 10px gap, 4px radius, 1px black border.
   £ prefix Lexend Bold 22px black; placeholder Lexend Regular 22px #6f6f6f. */
.brook-donate-widget__other {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px;
	background: #fff;
	border: 1px solid #000;
	border-radius: 4px;
}

.brook-donate-widget__other-currency {
	font-family: "Lexend", sans-serif;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.22px;
	line-height: normal;
	color: #000;
	text-transform: uppercase;
	cursor: text;
}

.brook-donate-widget__other-input {
	width: 5ch;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: "Lexend", sans-serif;
	font-weight: 400;
	font-size: 22px;
	letter-spacing: -0.22px;
	line-height: normal;
	color: #000;
}

.brook-donate-widget__other-input:focus {
	outline: none;
}

.brook-donate-widget__other-input::placeholder {
	color: #6f6f6f;
	opacity: 1;
}

/* Description strip — Figma: rgba(255,150,187,0.28) bg, 13px/15px padding,
   Lexend Regular 16px, -0.16px tracking, amount in bold, text width 448px. */
.brook-donate-widget__description {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 13px 15px;
	background: rgba(255, 150, 187, 0.28);
	font-family: "Lexend", sans-serif;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -0.16px;
	line-height: normal;
	color: #000;
	text-align: center;
}

.brook-donate-widget__description.is-hidden {
	display: none;
}

.brook-donate-widget__description-inner {
	max-width: 448px;
	margin: 0;
}

.brook-donate-widget__description-amount {
	font-weight: 700;
}

/* Donate button — Figma: #4646ff bg, 18px/30px padding, 8px radius (radius-s),
   Lexend SemiBold 20px / 29px line-height, -0.2px tracking, white text. */
.brook-donate-widget__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 18px 30px;
	background: #4646ff;
	border-radius: 8px;
	color: #fff;
	font-family: "Lexend", sans-serif;
	font-weight: 600;
	font-size: 20px;
	letter-spacing: -0.2px;
	line-height: 29px;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
}

.brook-donate-widget__button:hover,
.brook-donate-widget__button:focus {
	color: #fff;
	text-decoration: none;
}

.brook-donate-widget__tab:focus-visible,
.brook-donate-widget__amount:focus-visible,
.brook-donate-widget__button:focus-visible {
	outline: 2px solid #5c2c68;
	outline-offset: 2px;
}

/* Small screens: keep padding proportions usable */
@media (max-width: 480px) {
	.brook-donate-widget__tab {
		padding-left: 12px;
		padding-right: 12px;
		font-size: 18px;
	}
}
