/**
 * Third-party plugin styling.
 *
 * The theme hands donations, events, forms and FAQs to established plugins;
 * this makes them look like they belong to the design. Everything is scoped to
 * each plugin's own classes and only loads when that plugin is running.
 */

/* ---------------------------------------------------------------
 * Shared form controls — WPForms, Gravity Forms, Contact Form 7
 * ------------------------------------------------------------ */

.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field input[type="tel"],
.wpforms-field input[type="number"],
.wpforms-field select,
.wpforms-field textarea,
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper select,
.gform_wrapper textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	padding: 12px 14px;
	background: #fff;
	border: var(--macdade-border-width) solid var(--macdade-border);
	border-radius: var(--macdade-btn-radius);
	color: var(--macdade-heading);
	font-family: var(--macdade-font-body);
	font-size: 15px;
}

.wpforms-field input:focus,
.wpforms-field select:focus,
.wpforms-field textarea:focus,
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: var(--macdade-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--macdade-accent-rgb), .18);
}

.wpforms-field-label,
.gform_wrapper .gfield_label,
.wpcf7 label {
	color: var(--macdade-heading);
	font-family: var(--macdade-font-body);
	font-weight: 700;
	font-size: 14px;
}

/* Their submit buttons take the theme's button shape. */
.wpforms-submit,
.gform_wrapper .gform_button,
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
	padding: var(--macdade-btn-pad-y) var(--macdade-btn-pad-x) !important;
	background: var(--macdade-accent) !important;
	border: 2px solid var(--macdade-accent) !important;
	border-radius: var(--macdade-btn-radius) !important;
	color: var(--macdade-on-brand) !important;
	font-family: var(--macdade-font-accent) !important;
	font-size: var(--macdade-btn-size) !important;
	font-weight: var(--macdade-btn-weight) !important;
	letter-spacing: var(--macdade-btn-tracking) !important;
	text-transform: var(--macdade-btn-transform) !important;
	cursor: pointer;
	transition: background-color var(--macdade-transition) ease;
}

.wpforms-submit:hover,
.gform_wrapper .gform_button:hover,
.wpcf7 .wpcf7-submit:hover {
	background: var(--macdade-accent-dark) !important;
	border-color: var(--macdade-accent-dark) !important;
}

/* ---------------------------------------------------------------
 * GiveWP — donations
 * ------------------------------------------------------------ */

.give-form-wrap,
.give-embed-form {
	--give-primary-color: var(--macdade-accent);
}

.give-form-title,
.give-form-wrap legend {
	color: var(--macdade-heading);
	font-family: var(--macdade-font-heading);
	text-transform: var(--macdade-heading-transform);
	letter-spacing: var(--macdade-heading-spacing);
}

.give-btn,
.give-submit,
input.give-btn,
.give-donation-levels-wrap .give-btn {
	padding: var(--macdade-btn-pad-y) var(--macdade-btn-pad-x) !important;
	background: var(--macdade-accent) !important;
	border: 2px solid var(--macdade-accent) !important;
	border-radius: var(--macdade-btn-radius) !important;
	color: var(--macdade-on-brand) !important;
	font-family: var(--macdade-font-accent) !important;
	font-weight: var(--macdade-btn-weight) !important;
	letter-spacing: var(--macdade-btn-tracking) !important;
	text-transform: var(--macdade-btn-transform) !important;
}

.give-btn:hover,
.give-submit:hover {
	background: var(--macdade-accent-dark) !important;
	border-color: var(--macdade-accent-dark) !important;
}

/* The level buttons read as a choice, not as five calls to action. */
.give-donation-levels-wrap .give-btn:not(.give-default-level) {
	background: transparent !important;
	border-color: var(--macdade-border) !important;
	color: var(--macdade-heading) !important;
}

.give-donation-levels-wrap .give-btn:not(.give-default-level):hover {
	border-color: var(--macdade-accent) !important;
	color: var(--macdade-accent-ink) !important;
}

.give-goal-progress .give-progress-bar {
	height: 10px;
	background: var(--macdade-border);
	border-radius: 99px;
	overflow: hidden;
}

.give-goal-progress .give-progress-bar > span {
	background: var(--macdade-accent) !important;
}

/* ---------------------------------------------------------------
 * The Events Calendar
 * ------------------------------------------------------------ */

.tribe-common .tribe-common-c-btn,
.tribe-common a.tribe-common-c-btn,
#tribe-events .tribe-events-button,
.tribe-events-button {
	background: var(--macdade-accent) !important;
	border-radius: var(--macdade-btn-radius) !important;
	color: var(--macdade-on-brand) !important;
	font-family: var(--macdade-font-accent) !important;
	font-weight: var(--macdade-btn-weight) !important;
	letter-spacing: var(--macdade-btn-tracking) !important;
	text-transform: var(--macdade-btn-transform) !important;
}

.tribe-common .tribe-common-c-btn:hover,
.tribe-events-button:hover {
	background: var(--macdade-accent-dark) !important;
}

.tribe-common .tribe-common-h1,
.tribe-common .tribe-common-h2,
.tribe-common .tribe-common-h3,
.tribe-common .tribe-common-h4,
.tribe-events-single h1,
.tribe-events-single h2 {
	font-family: var(--macdade-font-heading) !important;
	color: var(--macdade-heading) !important;
	letter-spacing: var(--macdade-heading-spacing);
}

.tribe-common .tribe-common-b1,
.tribe-common .tribe-common-b2,
.tribe-common .tribe-common-b3 {
	font-family: var(--macdade-font-body) !important;
}

/* The date badge picks up the race navy. */
.tribe-events-calendar-list__event-date-tag-daynum,
.tribe-events-calendar-day__event-datetime {
	color: var(--macdade-heading) !important;
}

.tribe-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date {
	color: var(--macdade-accent-ink) !important;
}

/* Give the archive the theme's page width and rhythm. */
.tribe-events,
#tribe-events-pg-template {
	width: var(--macdade-content);
	margin-inline: auto;
	padding-block: var(--macdade-section-pad);
}

/* ---------------------------------------------------------------
 * Ultimate FAQ
 * ------------------------------------------------------------ */

.ewd-ufaq-faq-title,
.ewd-ufaq-post-margin .ewd-ufaq-post-title {
	font-family: var(--macdade-font-heading) !important;
	color: var(--macdade-heading) !important;
	letter-spacing: var(--macdade-heading-spacing);
}

.ewd-ufaq-faq-div,
.ewd-ufaq-post-margin {
	border: var(--macdade-border-width) solid var(--macdade-border);
	border-radius: var(--macdade-radius);
	margin-bottom: 10px;
	background: var(--macdade-card);
}

.ewd-ufaq-faq-title:hover { color: var(--macdade-accent-ink) !important; }

.ewd-ufaq-faq-body { font-family: var(--macdade-font-body); }

/* ---------------------------------------------------------------
 * Event list — the theme's own rendering of The Events Calendar's data
 * ------------------------------------------------------------ */

.macdade-events__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.macdade-event {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 18px 20px;
	margin-bottom: 12px;
	background: var(--macdade-card);
	border: var(--macdade-border-width) solid var(--macdade-border);
	border-radius: var(--macdade-radius);
}

.macdade-event__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	background: var(--macdade-primary);
	border-radius: var(--macdade-radius);
	color: #fff;
	line-height: 1;
}

.macdade-event__date b {
	font-family: var(--macdade-font-heading);
	font-size: 26px;
	font-weight: var(--macdade-heading-weight);
}

.macdade-event__date i {
	margin-top: 3px;
	font-size: 11px;
	font-style: normal;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	opacity: .85;
}

.macdade-event__body {
	flex: 1 1 auto;
	min-width: 0;
}

.macdade-event__name {
	display: block;
	color: var(--macdade-heading);
	font-family: var(--macdade-font-heading);
	font-size: 20px;
	font-weight: var(--macdade-heading-weight);
	line-height: 1.2;
	letter-spacing: var(--macdade-heading-spacing);
	text-transform: var(--macdade-heading-transform);
}

.macdade-event__name:hover { color: var(--macdade-accent-ink); }

.macdade-event__meta {
	display: block;
	margin-top: 5px;
	color: var(--macdade-muted-ink);
	font-size: 14px;
}

.macdade-event__where::before { content: "·"; margin: 0 8px; }

.macdade-event__text {
	display: block;
	margin-top: 7px;
	font-size: 14.5px;
	line-height: 1.55;
}

.macdade-event__cta { flex: 0 0 auto; }

.macdade-events__all { margin: 18px 0 0; }

.macdade-events__empty {
	margin: 0;
	padding: 20px 22px;
	background: var(--macdade-surface-alt);
	border-radius: var(--macdade-radius);
}

@media (max-width: 640px) {
	.macdade-event { flex-wrap: wrap; gap: 14px; }
	.macdade-event__body { flex: 1 1 100%; order: 3; }
	.macdade-event__cta { width: 100%; text-align: center; }
}
