/* mon_donation form styles. Enqueued by app/config/functions.php (handle
   'mon_donation', ?ver=MON_VERSION) on pages containing [mon_donation].
   Gathers the former inline <style> of app/vc_templates/mon_donation.php and
   the former select2 inline styles of app/config/functions.php. */

.mon_donation_form label.mon_donation_type_disabled {
	color: #a7aaad;
	cursor: not-allowed;
}

.mon_donation_form .tr-mon_donation_options td:last-child {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mon_donation_form label.mon_donation_option {
	flex: 0 0 100%;
}

.mon_donation_form label.mon_donation_option_box {
	position: relative;
	flex: 1 1 0;
	min-width: 80px;
	box-sizing: border-box;
	border: 2px solid #e9b449;
	padding: 12px 8px;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
}

.mon_donation_form label.mon_donation_option_box:hover {
	background: #e9b449;
}

.mon_donation_form label.mon_donation_option_box input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.mon_donation_form label.mon_donation_option_box.mon_donation_option_selected {
	border-color: #e9b449;
	background: #e9b449;
}

/* Long (named) options: same yellow box as the bare €-amounts, but full
   width (one per row) with wrapping text. Overrides the box's flex:1 1 0 /
   white-space:nowrap, so it must stay after the box rules above. */
.mon_donation_form label.mon_donation_option_box_full {
	flex: 0 0 100%;
	white-space: normal;
}

/* Donation-form layout — originally from the theme's style-mondo.css, kept in
   the plugin so the mon_donation WPBakery element is self-contained. (The
   shared ".front figure/figcaption" rules stayed in the theme; only the
   ".mon_donation_*" selectors moved.) */
.mon_donation_page figure {
	margin-top: 0;
	margin-right: 0;
}

.mon_donation_page figcaption {
	font-size: small;
}

.mon_donation_table {
	border: 1px solid rgb(238, 238, 238);
	border-collapse: unset;
	margin-bottom: 0;
	width: 100%;
}

.mon_donation_active {
	background-color: unset;
	border-top: 3px solid rgb(218, 153, 13);
	border-bottom: 0;
}

.mon_donation_table tr:nth-of-type(1) td {
	padding-top: 18px;
	padding-bottom: 0;
}

.mon_donation_table tr:nth-of-type(1) td:last-of-type {
	padding-right: 20px;
}

.mon_donation_table tr:nth-child(2n) {
	background-color: unset;
}

.mon_donation_table th {
	display: none;
	padding-left: 0;
	padding-right: 3%;
	text-align: left;
	vertical-align: middle;
	width: 25%;
}

.mon_donation_table th.va_baseline {
	vertical-align: top;
}

.mon_donation_table td:nth-of-type(1) {
	vertical-align: middle;
	padding-left: 10px;
}

.mon_donation_table td:nth-of-type(2) {
	padding-left: 0;
	padding-right: 20px;
}

.mon_donation_table td.va_baseline {
	vertical-align: top;
}

.mon_donation_table select, .mon_donation_table input {
	margin-bottom: 0;
}

.mon_donation_table label {
	float: left;
}

.mon_donation_table label:not(:last-child) {
	margin-bottom: 5px;
}

.mon_donation_table label:last-child {
	width: 100%;
}

.mon_donation_table .req {
	color: rgb(218, 153, 13);
	font-weight: 900;
	font-size: 32px;
	padding-bottom: 0;
}

a.mon_donation_hover {
	border-bottom: 3px solid gainsboro;
}

a.mon_donation_hover:hover {
	border-bottom: 3px solid black;
}

a.mon_donation_hover.active {
	border-bottom: 3px solid rgb(218, 153, 13);
}

.mon_donation_response_box {
	padding-top: 15px !important;
	padding-bottom: 15px !important;
	padding-left: 0;
	padding-right: 0;
}

.mon_donation_response_box div {
	border: 3px solid rgb(4, 149, 72);
	padding: 15px !important;
	text-align: left;
	width: 100%;
}

tr.p-t-0 th, tr.p-t-0 td {
	padding-top: 0;
}

.mon_donation_error:invalid {
	border-color: #f00;
}

/* Fund jump anchors (#ukraina etc.) rendered by the vc template next to the
   form for native fragment scrolling; the margin keeps the donation box clear
   of the sticky header (same 75px offset mon_donation_find_y() uses). */
.mon_donation_anchor {
	scroll-margin-top: 75px;
}

@media(max-width: 1024px) {
	.mon_donation_table th {
		display: none;
	}
}

@media(max-width: 767px) {
	.mon_donation_sidebar {
		padding-top: 30px;
	}

	/* Full-bleed donation box: stretch the form to the viewport edges no
	   matter what side padding the theme wrappers add (2.1875rem on
	   .vc_column-inner for phones, 1rem on .wpb_column under 351px). The
	   column is centered, so 50% of the containing block plus 50vw lands
	   exactly on the left screen edge. */
	.mon_donation_form {
		width: 100vw;
		margin-left: calc(50% - 50vw);
	}

	/* Edge-to-edge box: side borders would hug the screen edge — drop them. */
	.mon_donation_table {
		border-left: 0;
		border-right: 0;
	}

	.mon_donation_flex_container {
		display: flex;
		flex-flow: column-reverse;
	}

	.mon_donation_sidebar .vc_column-inner {
		padding-bottom: 0 !important;
	}

	.mon_donation_sidebar #canvas-holder {
		display: none;
	}
}

@media(max-width: 394px) {
	a.mon_donation_hover {
		border-bottom: 0;
	}

	a.mon_donation_hover:hover {
		border-bottom: 0;
	}

	a.mon_donation_hover.active {
		border-bottom: 0;
	}

	span.mon_donation_hover {
		border-bottom: 3px solid gainsboro;
	}

	span.mon_donation_hover:hover {
		border-bottom: 3px solid black;
	}

	span.mon_donation_hover.active {
		border-bottom: 3px solid rgb(218, 153, 13);
	}
}

/* --- select2 fund dropdown (Chromium-on-Windows flag fix, see mon_donation.js)
   The 'select2' style is a dependency of this file, so these load after it.
   The <img class="emoji"> that wp.emoji makes of the 🇺🇦 needs no sizing here:
   WP core's wp-emoji-styles inline CSS covers img.emoji (with !important). --- */

/* Make the select2 widget look like the form's native <select>/<input>
   (#fafafa box, 1px #eee border, square, 39px tall, 16px text). */
.mon_donation_form .select2-container--default .select2-selection--single {
	height: 39px;
	box-sizing: border-box;
	border: 1px solid #eee;
	border-radius: 0;
	background-color: #fafafa;
}

.mon_donation_form .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 37px;
	padding-left: 8px;
	padding-right: 28px;
	color: #000;
	font-size: 16px;
}

.mon_donation_form .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 37px;
	right: 6px;
}

.mon_donation_form .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: #ccc;
}

/* Match the open dropdown (and its search box) to the closed select's #eee
   border instead of select2's default #aaa. */
.select2-dropdown.mon-donation-fund-dd {
	border-color: #ccc;
}

.mon-donation-fund-dd .select2-search--dropdown .select2-search__field {
	border-color: #eee;
}

/* EOF */
