/* ==========================================================================
   BRAVO Donacije
   Colours are exposed as custom properties so the theme can override them:
   .bd-wrap { --bd-accent: #e4002b; }
   ========================================================================== */

.bd-wrap {
	--bd-accent: #f5b301;
	--bd-accent-ink: #14213d;
	--bd-ink: #1a1a1a;
	--bd-muted: #6b7280;
	--bd-line: #e3e5e8;
	--bd-surface: #f1f2f4;
	--bd-radius: 10px;

	max-width: 560px;
	margin: 0 auto;
	color: var(--bd-ink);
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

.bd-wrap *,
.bd-wrap *::before,
.bd-wrap *::after {
	box-sizing: border-box;
}

.bd-title {
	margin: 0 0 18px;
	font-size: 1.6em;
}

.bd-testbanner {
	margin: 0 0 18px;
	padding: 8px 12px;
	border-radius: 6px;
	background: #fff4d6;
	border: 1px solid #f0d68a;
	color: #7a5c00;
	font-size: 13px;
}

/* ---------- step dots ---------- */

.bd-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.bd-steps li {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #d8dade;
	position: relative;
	margin: 0;
}

.bd-steps li + li {
	margin-left: 20px;
}

.bd-steps li + li::before {
	content: "";
	position: absolute;
	right: 100%;
	top: 50%;
	width: 20px;
	height: 2px;
	background: #d8dade;
	transform: translateY(-50%);
}

.bd-steps li.is-active,
.bd-steps li.is-done {
	background: var(--bd-accent);
}

/* ---------- steps ---------- */

.bd-step {
	display: none;
}

.bd-step.is-active {
	display: block;
	animation: bd-fade .2s ease;
}

@keyframes bd-fade {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: none; }
}

.bd-label {
	margin: 22px 0 10px;
	font-weight: 700;
}

.bd-label--small {
	font-weight: 600;
	font-size: 14px;
	color: var(--bd-muted);
}

/* ---------- type tabs ---------- */

.bd-tabs {
	display: flex;
	border-bottom: 4px solid var(--bd-surface);
	margin-bottom: 4px;
}

.bd-tab {
	flex: 1;
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 4px solid transparent;
	margin-bottom: -4px;
	padding: 10px 6px;
	font: inherit;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--bd-accent-ink);
	cursor: pointer;
	transition: color .15s, border-color .15s;
}

.bd-tab.is-active {
	color: #b98700;
	border-bottom-color: var(--bd-accent);
}

/* ---------- amounts ---------- */

.bd-amounts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.bd-amount {
	appearance: none;
	border: 0;
	border-radius: var(--bd-radius);
	background: var(--bd-surface);
	color: var(--bd-accent-ink);
	padding: 16px 10px;
	font: inherit;
	font-size: 18px;
	font-weight: 800;
	cursor: pointer;
	transition: background .15s, transform .08s;
}

.bd-amount:hover { background: #e6e8ea; }
.bd-amount:active { transform: scale(.98); }

.bd-amount.is-active {
	background: var(--bd-accent);
	color: var(--bd-accent-ink);
}

/* ---------- stepper ---------- */

.bd-stepper {
	display: inline-flex;
	align-items: stretch;
	border-radius: var(--bd-radius);
	overflow: hidden;
	background: var(--bd-surface);
}

.bd-stepper__btn {
	appearance: none;
	border: 0;
	background: #e3e5e8;
	width: 46px;
	font-size: 22px;
	line-height: 1;
	font-weight: 700;
	color: var(--bd-accent-ink);
	cursor: pointer;
}

.bd-stepper__btn:hover { background: #d5d8dc; }

.bd-stepper__input {
	width: 120px;
	border: 0;
	background: transparent;
	text-align: center;
	font: inherit;
	font-size: 20px;
	font-weight: 800;
	color: var(--bd-accent-ink);
	padding: 14px 4px;
	-moz-appearance: textfield;
}

.bd-stepper__input::-webkit-outer-spin-button,
.bd-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.bd-stepper__cur {
	display: flex;
	align-items: center;
	padding: 0 14px 0 4px;
	font-weight: 700;
	color: var(--bd-muted);
}

/* ---------- recurring explainer ---------- */

.bd-recurring-note {
	margin-top: 18px;
	padding: 14px 16px;
	border-radius: var(--bd-radius);
	background: #fff8e1;
	border: 1px solid #f0dea0;
	text-align: left;
	font-size: 14px;
}

.bd-recurring-note ul {
	margin: 8px 0 0;
	padding-left: 18px;
}

.bd-recurring-note li + li { margin-top: 6px; }

/* ---------- consent ---------- */

.bd-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 20px 0;
	text-align: left;
	font-size: 14px;
	cursor: pointer;
}

.bd-check input {
	margin: 3px 0 0;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	accent-color: var(--bd-accent);
}

.bd-check a { text-decoration: underline; }

/* ---------- buttons ---------- */

.bd-btn {
	appearance: none;
	border: 0;
	border-radius: var(--bd-radius);
	padding: 15px 26px;
	font: inherit;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .03em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity .15s, transform .08s;
	text-decoration: none;
	display: inline-block;
}

.bd-btn--primary {
	width: 100%;
	background: var(--bd-accent);
	color: var(--bd-accent-ink);
}

.bd-btn--ghost {
	background: var(--bd-surface);
	color: var(--bd-accent-ink);
	text-transform: none;
	font-weight: 700;
}

.bd-btn:active { transform: scale(.99); }

.bd-btn[disabled],
.bd-btn.is-disabled {
	opacity: .5;
	cursor: not-allowed;
}

.bd-actions {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.bd-actions .bd-btn--ghost { flex: 0 0 auto; }
.bd-actions .bd-btn--primary { flex: 1 1 auto; width: auto; }

/* ---------- summary ---------- */

.bd-summary {
	margin-bottom: 6px;
	padding: 12px 14px;
	border-radius: var(--bd-radius);
	background: var(--bd-surface);
	font-size: 15px;
	font-weight: 700;
}

.bd-summary span { font-weight: 400; color: var(--bd-muted); }

/* ---------- fields ---------- */

.bd-grid {
	display: grid;
	gap: 12px;
}

.bd-grid--2 { grid-template-columns: 1fr 1fr; }

.bd-field {
	display: block;
	text-align: left;
	margin-bottom: 12px;
}

.bd-field > span {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 5px;
}

.bd-field em {
	color: #c0392b;
	font-style: normal;
}

.bd-field input {
	width: 100%;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--bd-surface);
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--bd-ink);
}

.bd-field input:focus {
	outline: none;
	border-color: var(--bd-accent);
	background: #fff;
}

.bd-field input.bd-invalid {
	border-color: #c0392b;
	background: #fdeceb;
}

.bd-field small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--bd-muted);
}

.bd-fineprint {
	font-size: 12px;
	color: var(--bd-muted);
	text-align: left;
	line-height: 1.6;
	margin: 14px 0;
}

.bd-error {
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: #fdeceb;
	border: 1px solid #f2b8b2;
	color: #a12f22;
	font-size: 14px;
	text-align: left;
}

/* ---------- redirect ---------- */

.bd-redirect { padding: 40px 0; }

.bd-spinner {
	width: 38px;
	height: 38px;
	margin: 0 auto 18px;
	border: 4px solid var(--bd-surface);
	border-top-color: var(--bd-accent);
	border-radius: 50%;
	animation: bd-spin .8s linear infinite;
}

@keyframes bd-spin { to { transform: rotate(360deg); } }

/* ---------- badges ---------- */

.bd-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 48px; /* >= 4x programme mark width is enforced by the 48px+ gap and wrapping */
	margin: 18px 0;
}

.bd-badges__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

/* Every mark rule is scoped through .bd-badges on purpose.
 *
 * Elementor ships `.elementor img { height: auto }`, which has exactly the same
 * specificity (0,1,1) as a bare `.bd-badges__group--accept img`. Which one wins
 * then comes down to stylesheet order — and this plugin's order is not stable:
 * on a page whose content contains the shortcode, register_assets() enqueues in
 * <head> ahead of Elementor and LOSES; on any other page the render-time
 * enqueue lands after Elementor and WINS. That is why the marks rendered at
 * full natural size on the donation page but correctly in the footer elsewhere.
 * The extra class takes these to (0,2,1) so they win either way.
 */

/* Acceptance marks: identical size, within 37x23 .. 180x113 px. */
.bd-badges .bd-badges__group--accept img {
	height: 30px;
	width: auto;
	display: block;
}

/* Programme marks: identical size, 60 .. 155 px wide. */
.bd-badges .bd-badges__group--programme img {
	width: 92px;
	height: auto;
	display: block;
}

.bd-badges .bd-badges__group--bank img {
	height: 30px;
	width: auto;
	display: block;
}

/* ---------- badges: compact (footer) ----------
 *
 * [bravo_kartice kompakt="da"]. Uputstvo 2.2 bounds the marks from BELOW only
 * — acceptance marks no smaller than 37x23px, programme marks no narrower than
 * 60px — so this variant sits on those floors and cannot legitimately go
 * smaller. Only the sizes and the within-group spacing shrink: the gap BETWEEN
 * the groups is rule-governed, so it is left at the default.
 */

.bd-badges--compact {
	gap: 10px 48px;
	margin: 10px 0;
}

.bd-badges--compact .bd-badges__group {
	gap: 8px;
}

/* One identical box per acceptance mark, letterboxed with object-fit. Sizing
   by height alone (as the default rule does) gives every mark a different
   width, which the "all the same size" requirement does not allow; a fixed
   box holds both that and the 37x23 floor. */
.bd-badges.bd-badges--compact .bd-badges__group--accept img {
	width: 38px;
	height: 24px;
	object-fit: contain;
}

.bd-badges.bd-badges--compact .bd-badges__group--programme img {
	width: 60px;
	height: auto;
}

.bd-badges.bd-badges--compact .bd-badges__group--bank img {
	height: 24px;
	width: auto;
}

.bd-methods { margin-top: 20px; }

.bd-securebar {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--bd-line);
}

/* ==========================================================================
   Receipt
   ========================================================================== */

.bd-receipt {
	max-width: 760px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.6;
}

.bd-receipt__head {
	padding: 20px 22px;
	border-radius: 10px;
	margin-bottom: 24px;
}

.bd-receipt.is-ok .bd-receipt__head {
	background: #eaf7ee;
	border-left: 5px solid #2e9e4f;
}

.bd-receipt.is-fail .bd-receipt__head {
	background: #fdeceb;
	border-left: 5px solid #c0392b;
}

.bd-receipt__head h2 {
	margin: 6px 0 8px;
	font-size: 1.25em;
	line-height: 1.35;
}

.bd-receipt__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.bd-receipt.is-ok .bd-receipt__icon { background: #2e9e4f; }
.bd-receipt.is-fail .bd-receipt__icon { background: #c0392b; }

.bd-receipt__lead { margin: 0; }

.bd-receipt__notice {
	padding: 16px 18px;
	border-radius: 10px;
	background: #fff8e1;
	border-left: 5px solid #f0b400;
	margin-bottom: 24px;
}

.bd-receipt__notice p { margin: 8px 0 0; }

.bd-receipt h3 {
	margin: 30px 0 10px;
	font-size: 1.05em;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #444;
}

.bd-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.bd-table th,
.bd-table td {
	padding: 9px 12px;
	border-bottom: 1px solid #e6e6e6;
	text-align: left;
	vertical-align: top;
}

.bd-table th {
	width: 42%;
	font-weight: 600;
	color: #555;
}

.bd-table--items th { width: auto; }
.bd-table--items thead th { background: #f6f7f8; }
.bd-table--items tfoot th { text-align: right; }

.bd-receipt .bd-fineprint { text-align: left; }

.bd-receipt--missing {
	padding: 24px;
	background: #f6f7f8;
	border-radius: 10px;
}

/* ---------- small screens ---------- */

@media (max-width: 540px) {
	.bd-grid--2 { grid-template-columns: 1fr; }
	.bd-amounts { grid-template-columns: 1fr 1fr; }
	.bd-badges { gap: 14px 24px; }
	.bd-table th, .bd-table td { display: block; width: auto; }
	.bd-table th { border-bottom: 0; padding-bottom: 0; }
	.bd-table--items th, .bd-table--items td { display: table-cell; }
}
