/**
 * Donor-facing tribute fields. Collapsed by default; revealed when the
 * "Make this donation a tribute" checkbox is checked.
 *
 * Targets fields by their `data-tribute-field` and `data-tribute-toggle`
 * attributes (set in TributeFields.php). Markup-agnostic: works whether
 * the field is wrapped in <p>, <div>, <li>, or via the donation-form
 * template's standard wrapper.
 */

/* Hide tribute fields by default; JS reveals when parent toggle is checked. */
.charitable-donation-form .charitable-tributes-fields-hidden {
	display: none;
}

/* Nested fieldset visual indent — keeps it from looking like 8 random fields. */
.charitable-donation-form [data-tribute-field],
.charitable-donation-form [data-tribute-toggle="ecard"],
.charitable-donation-form [data-tribute-toggle="ecard"] ~ * {
	padding-left: 0;
}

/* Stack the nested notification-recipient fields under eCard checkbox. */
.charitable-donation-form .charitable-tributes-notification-group {
	margin-top: 8px;
	padding-left: 20px;
	border-left: 2px solid #e2e4e7;
}

/* Comfortable padding inside tribute text inputs + the message textarea
 * (the recipient name/email fields and the personal message looked cramped).
 * box-sizing keeps the padding inside the 48% one-row columns below. */
.charitable-donation-form input[type="text"][name^="tribute_"],
.charitable-donation-form input[type="email"][name^="tribute_"],
.charitable-donation-form textarea[name^="tribute_"] {
	padding: 8px 10px;
	box-sizing: border-box;
}

/* Uniform checkbox -> label gap across ALL tribute checkboxes.
 * Targeted by the stable `name` attr (prefix `tribute_`) rather than the
 * `data-tribute-*` attrs, because the field-collapse on dedicated tribute
 * campaigns strips `data-tribute-field` from the anonymous / hide-from-family
 * checkboxes while the eCard checkbox keeps `data-tribute-toggle` — which left
 * "Send an eCard" with a different gap than "Make my donation anonymous". The
 * name attr is never stripped, so every tribute checkbox lines up. */
.charitable-donation-form input[type="checkbox"][name^="tribute_"] {
	margin-right: 6px;
}

/* Read-only context line on a dedicated tribute fund form
   ("You're giving in memory of <Honoree>"). The honoree name inside is
   wrapped in <strong>; the line itself is normal weight so the name stands
   out rather than the whole sentence being bold. */
.charitable-donation-form .charitable-tributes-context-line {
	display: block;
	margin-bottom: 8px;
}

/* The context line is edited via the WP editor, which wraps content in a
 * <p>; zero its margins so the line stays tight against the fields below. */
.charitable-donation-form .charitable-tributes-context-line p {
	margin: 0;
}

/* Recipient name + email share one row on desktop. Guarded with
 * :not(.charitable-tributes-fields-hidden) so the inline-block (ID
 * specificity) never overrides the JS hide state when the eCard toggle is
 * unchecked — display:none must still win while the pair is collapsed. */
@media ( min-width: 700px ) {
	.charitable-donation-form #charitable_field_tribute_notification_name:not( .charitable-tributes-fields-hidden ),
	.charitable-donation-form #charitable_field_tribute_notification_email:not( .charitable-tributes-fields-hidden ) {
		display: inline-block;
		width: 48%;
		box-sizing: border-box;
		vertical-align: top;
	}
	.charitable-donation-form #charitable_field_tribute_notification_name:not( .charitable-tributes-fields-hidden ) {
		margin-right: 3%;
	}
}

/*
 * A field description moved above its input (charitable_tributes_field_description_position).
 * It sits inside the label, so undo the label's weight and show it on its own line.
 */
.charitable-donation-form .charitable-tributes-description-above {
	display: block;
	margin: 4px 0 0;
	font-weight: normal;
}
