/*
 * One button system for every call to action. Scoped to body.rp-cta (published 2026-10-01, RP_LAYOUT_PUBLISH_CTA).
 * CSS only: no link target, label or form behaviour changes.
 *
 * Primary   (the page's main action: schedule a tour, register, call, send a form):
 *           sun-orange block, dark label, dark outline and a solid dark "step" under it, like a toy block.
 *           The outline is what separates it from its background: orange alone is only 1.5:1 against the green
 *           panels and 1.8:1 against white, the outline is 5.0:1 and 12.7:1.
 * Secondary (everything else that is a button): white block, same outline, no step.
 * Text link: underlined, blue on white, dark on green.
 */
body.rp-cta {
	--rp-btn-ink: #31313f;
	--rp-btn-sun: #ffaf47;
	--rp-btn-sun-hover: #ffc06b;
}

/* ---------- Shared shape: every theme button, the header buttons and the form buttons ---------- */
.rp-cta a.primary-btn,
.rp-cta .review-content a,
.rp-cta .rp-btn,
.rp-cta .rp-call,
.rp-cta .gform_wrapper.gform_wrapper input[type="submit"],
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_next_button,
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_previous_button,
.rp-cta input.printbtn {
	position: relative;
	top: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 48px;
	padding: 11px 26px;
	box-sizing: border-box;
	border: 2px solid var(--rp-btn-ink) !important;
	border-radius: 14px !important;
	background: #fff !important;
	box-shadow: none !important;
	font: 700 16px/1.2 "Roboto Slab", Georgia, serif !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	text-shadow: none;
	color: var(--rp-btn-ink) !important;
	cursor: pointer;
	transition: top 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
	/* the theme lifts buttons with transform on hover, which fights the scroll animation on the same element */
	-webkit-transform: none;
	transform: none;
	align-self: center;
}

.rp-cta a.primary-btn:hover,
.rp-cta .review-content a:hover,
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_previous_button:hover {
	background: #fff4e3 !important;
}

/* The theme prints a button even when its label is empty (Services, FAQ). */
.rp-cta a.primary-btn:empty {
	display: none;
}

/* ---------- Primary ---------- */
.rp-cta a.primary-btn[href*="/contact"],
.rp-cta a.primary-btn[href*="/registration"],
.rp-cta a.primary-btn[href^="tel:"],
.rp-cta .rp-btn,
.rp-cta .rp-call,
.rp-cta .gform_wrapper.gform_wrapper input[type="submit"],
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_next_button {
	background: var(--rp-btn-sun) !important;
	box-shadow: 0 4px 0 var(--rp-btn-ink) !important;
}

.rp-cta a.primary-btn[href*="/contact"]:hover,
.rp-cta a.primary-btn[href*="/registration"]:hover,
.rp-cta a.primary-btn[href^="tel:"]:hover,
.rp-cta .rp-btn:hover,
.rp-cta .rp-call:hover,
.rp-cta .gform_wrapper.gform_wrapper input[type="submit"]:hover,
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_next_button:hover {
	top: -2px;
	background: var(--rp-btn-sun-hover) !important;
	box-shadow: 0 6px 0 var(--rp-btn-ink) !important;
}

.rp-cta a.primary-btn[href*="/contact"]:active,
.rp-cta a.primary-btn[href*="/registration"]:active,
.rp-cta .rp-btn:active,
.rp-cta .rp-call:active,
.rp-cta .gform_wrapper.gform_wrapper input[type="submit"]:active,
.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_next_button:active {
	top: 3px;
	box-shadow: 0 1px 0 var(--rp-btn-ink) !important;
}

/* Keyboard focus: a white gap then a blue ring, visible on white and on green. */
.rp-cta a.primary-btn:focus-visible,
.rp-cta .review-content a:focus-visible,
.rp-cta .rp-btn:focus-visible,
.rp-cta .rp-call:focus-visible,
.rp-cta .gform_wrapper.gform_wrapper input[type="submit"]:focus-visible,
.rp-cta .gform_wrapper.gform_wrapper input[type="button"]:focus-visible {
	outline: 3px solid #0b5fa5;
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff, 0 4px 0 var(--rp-btn-ink) !important;
}

/* The header strip is 48px tall and dark green: same button, compact, no step, white outline
   (white is 5.3:1 against the strip; the dark outline would be 2.4:1). */
.rp-cta #masthead .rp-btn {
	min-height: 36px;
	padding: 6px 16px;
	border-color: #fff !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	font-size: 14px !important;
}

/* The Call button belongs to the phone header only. */
@media (min-width: 1024px) {
	.rp-cta #masthead .rp-call { display: none; }
}

/* On the blue form panels the dark outline is only 2.7:1, white is 4.7:1. The dark step stays. */
.rp-cta .registration-page .gform_wrapper.gform_wrapper input[type="submit"],
.rp-cta .registration-page .gform_wrapper.gform_wrapper input[type="button"].gform_next_button,
.rp-cta .registration-page .gform_wrapper.gform_wrapper input[type="button"].gform_previous_button {
	border-color: #fff !important;
}

.rp-cta #masthead .rp-btn:hover {
	top: 0;
	box-shadow: none !important;
}

/* ---------- Text links that act as calls to action ---------- */
.rp-cta section.contracts-forms .forms-items div a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.rp-cta section.contracts-forms .forms-items div a:hover {
	color: #fff;
}

/* ---------- Phones ---------- */
@media (max-width: 1023px) {
	.rp-cta a.primary-btn,
	.rp-cta .review-content a,
	.rp-cta .gform_wrapper.gform_wrapper input[type="submit"],
	.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_next_button,
	.rp-cta .gform_wrapper.gform_wrapper input[type="button"].gform_previous_button {
		min-height: 48px;
		padding: 11px 20px;
		font-size: 15px !important;
		line-height: 1.25 !important;
		text-align: center;
	}

	.rp-cta .rp-call {
		min-height: 44px;
		padding: 8px 16px;
		border-radius: 12px !important;
		box-shadow: 0 3px 0 var(--rp-btn-ink) !important;
		font-size: 15px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rp-cta a.primary-btn,
	.rp-cta .rp-btn,
	.rp-cta .rp-call,
	.rp-cta .gform_wrapper.gform_wrapper input[type="submit"] { transition: none; }
}
