/**
 * Registration flow styling, scoped to .proact-reg.
 *
 * Carries over the layout rules the old dcpPATCMS forms relied on
 * (dcpPATCMS.style.css), so the ported markup in
 * src/Modules/Registration/views/groups/*.php renders as it does today.
 * Deliberately scoped to .proact-reg rather than #patcmsContainer so this
 * does not inherit any of the legacy stylesheet's global rules.
 *
 * Task 2 (2026-10-17): the dashboard vocabulary (cards, the
 * .proact-dash__nav-heading label treatment, the #2ea2cc accent) is layered
 * on top of that inherited layout, scoped to the .proact-reg__card markup
 * Task 1 wrapped every field group in. None of the selectors below need a
 * doubled .proact-reg qualifier to beat the theme: the theme's own rules
 * for input/select/table/h2/h3 are bare element selectors with no class, and
 * every selector here already carries at least one class from being scoped
 * under .proact-reg, which outranks them regardless of stylesheet order.
 */

/* Cards: one per field group (Task 1's CardMarkup), 12px apart. */
.proact-reg .proact-reg__card {
	background: #fff;
	border: 1px solid #e3e5e8;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 0 0 12px;
}

/* The heading a partial emits inside its card reads as a label, matching
   .proact-dash__nav-heading. class-info is the exception - see below. */
.proact-reg .proact-reg__card h2,
.proact-reg .proact-reg__card h3 {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #6b7280;
}

/* class-info is the page header, not a card: no border, and its own title
   stays legible at page-header size rather than the small-caps label
   treatment above. Three classes outrank the generic card-heading rule two
   classes up, so this wins regardless of source order. */
.proact-reg .proact-reg__card--class-info {
	border: none;
}
.proact-reg .proact-reg__card--class-info h2.classTitle {
	margin: 20px 0 5px;
	font-size: 22px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
	color: #0e3950;
}
.proact-reg .proact-reg__card--class-info .classDate {
	color: #6b7280;
}

/* A card whose entire content starts (or is later toggled) hidden must not
 * draw at all - otherwise its border and padding render as an empty box.
 * licences.php ships <div class='ceuLicenses' style="display:none;">
 * (no space after the colon, as PHP wrote it) as the card's only child, and
 * registration.js's refreshLicenses() toggles that same div with jQuery's
 * .toggle(), which re-serialises the style attribute as "display: none;"
 * (space after the colon) while hidden and clears it again once a
 * licence-bearing CEU is ticked. Both spellings are matched so the rule
 * holds before and after the JS runs; once the div's inline style no longer
 * says display:none, :has() stops matching and the card reappears with no
 * JS-side involvement. Written against the card generally, not
 * .proact-reg__card--licences specifically, so any other group that ships
 * the same "only child starts hidden" pattern is covered automatically.
 * :has() is supported by every browser this site targets.
 */
.proact-reg .proact-reg__card:has( > [style*="display:none"] ),
.proact-reg .proact-reg__card:has( > [style*="display: none"] ) {
	display: none;
}

.proact-reg h3#classTitle { margin: 0.5em 0; }
.proact-reg .classDate { font-size: 16px; }
.proact-reg .center { text-align: center !important; }
.proact-reg .required { font-size: 11px; color: red; vertical-align: super; font-weight: normal; }

/* Registrant / agency / shipping / sponsor tables */
.proact-reg table#tblRegistration,
.proact-reg table.tblRegistrationAgency,
.proact-reg table.tblRegistrationShipping,
.proact-reg table#tblSponsor {
	width: 100%;
	border-collapse: collapse;
}
.proact-reg td.label { width: 30%; }
.proact-reg input { display: inline; }

/* Text inputs and selects, in the dashboard's look. Replaces the old
   `input[type="text"] { width: 70% }` rule; the table-based layout still
   works because this only constrains the input's own width inside its td,
   not the table or column widths. */
.proact-reg input[type="text"],
.proact-reg select {
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 7px 9px;
	width: 100%;
	max-width: 640px;
}

.proact-reg td { padding: 5px 5px; }
.proact-reg tr.shipInfo td { background-color: #e4eef7; }

/* Certification option / fees */
.proact-reg .classSelect select#selClassType { width: 100%; max-width: 640px; }
.proact-reg .feeTotals table { width: 100%; }
.proact-reg .feeTotals td.feeTitle { text-align: left; width: 50%; }
.proact-reg .feeTotals td.feeAmount { text-align: right; font-size: 1.2em; }

/* CEUs and licences */
.proact-reg table.ceuSelection { width: inherit; }
.proact-reg table.ceuSelection td.ceuSelect { padding: 2px 25px; }
.proact-reg tr.ceuProACT,
.proact-reg tr.ceuProACTR,
.proact-reg span.restraintOption {
	filter: alpha(opacity=20);
	opacity: 0.2;
}

/* Honeypot: pushed off-screen, never visible to a real visitor */
.proact-reg div.hpOffset {
	margin-left: -12580px;
	float: left;
}

/* Submit */
.proact-reg input#btnSubmitRegistration {
	background-color: #2ea2cc;
	color: #fff;
	border: none;
	border-radius: 4px;
}
.proact-reg input#btnSubmitRegistration.isDisabled { opacity: 0.5; background-color: #ffefef; }

/* Focus outline, matching dashboard.css's nav-link treatment. */
.proact-reg input:focus-visible,
.proact-reg select:focus-visible,
.proact-reg button:focus-visible {
	outline: 2px solid #2ea2cc;
	outline-offset: 1px;
}

/* LiveValidation field states, carried over from dcpPATCMS.style.css */
.proact-reg .LV_validation_message.LV_valid { display: none; margin: 0; }
.proact-reg .LV_valid { color: #00cc00; font-weight: normal; }
.proact-reg .LV_invalid { color: #cc0000; font-weight: normal; }
.proact-reg .LV_valid_field,
.proact-reg input.LV_valid_field,
.proact-reg input.LV_valid_field:hover,
.proact-reg input.LV_valid_field:active,
.proact-reg textarea.LV_valid_field:hover,
.proact-reg textarea.LV_valid_field:active {
	border: 1px solid #00cc00;
	background-color: #b8f5b1;
}
.proact-reg .LV_invalid_field,
.proact-reg input.LV_invalid_field,
.proact-reg input.LV_invalid_field:hover,
.proact-reg input.LV_invalid_field:active,
.proact-reg textarea.LV_invalid_field:hover,
.proact-reg textarea.LV_invalid_field:active {
	border: 1px solid #cc0000;
	background-color: #ffafaf;
}

/* Closed / error states, restyled as a red-bordered card - the same
   palette dashboard.css's .proact-dash__error uses. */
.proact-reg.proact-reg--closed .errorClassRegFull,
.proact-reg.proact-reg--error p {
	padding: 14px 16px;
	background-color: #fef2f2;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	color: #991b1b;
}

/* The email step (client request, 2026-09-24).
   #regGatedFields and the two outcome messages ship with the hidden
   attribute and are revealed by assets/js/registration.js. Themes routinely
   set `display` on divs and paragraphs, which beats the browser's own
   [hidden] rule, so this restates it inside the form where it must hold. */
.proact-reg [hidden] { display: none !important; }

.proact-reg__email-step p { margin: 0 0 10px 0; }
.proact-reg__email-step .LV_invalid_field { font-weight: bold; }
