/* =========================================================================
   Divine Healers Signup — Glass UI
   Palette: deep healing blue #1F3A5F + violet #6C5B9E, on a luminous aura.
   Type:    Georgia (display) — matches the brand & the book template.
   Approach: glassmorphism (frosted card over an aura gradient), mobile-first.
   Accessibility: visible focus, prefers-reduced-motion, prefers-color-scheme.
   ========================================================================= */

.dhs-wrap{
	--dh-blue:#1F3A5F;
	--dh-blue-700:#16293f;
	--dh-violet:#6C5B9E;
	--dh-violet-300:#a99fce;
	--dh-ink:#243b53;
	--dh-muted:#5a6b82;
	--dh-line:rgba(31,58,95,.14);
	--dh-glass:rgba(255,255,255,.42);
	--dh-glass-strong:rgba(255,255,255,.66);
	--dh-radius:22px;
	--dh-shadow:0 24px 70px rgba(31,58,95,.28);
	position:relative;
	display:flex;
	justify-content:center;
	padding:48px 16px;
	font-family:Georgia,"Times New Roman",serif;
	color:var(--dh-ink);
	isolation:isolate;
}

/* Luminous aura behind the card (the "healing orb" feel from the flyer). */
.dhs-aura{
	position:absolute;
	inset:0;
	z-index:-1;
	background:
		radial-gradient(60% 50% at 30% 20%, rgba(108,91,158,.45) 0%, transparent 60%),
		radial-gradient(55% 55% at 75% 30%, rgba(120,170,220,.5) 0%, transparent 60%),
		radial-gradient(80% 70% at 50% 100%, rgba(31,58,95,.4) 0%, transparent 70%),
		linear-gradient(160deg,#dbe4f5 0%, #b9c8e6 45%, #9fb2da 100%);
	filter:saturate(115%);
}

.dhs-card{
	width:100%;
	max-width:600px;
	background:var(--dh-glass);
	backdrop-filter:blur(20px) saturate(160%);
	-webkit-backdrop-filter:blur(20px) saturate(160%);
	border:1px solid rgba(255,255,255,.6);
	border-radius:var(--dh-radius);
	box-shadow:var(--dh-shadow);
	padding:40px 36px;
	animation:dhs-rise .6s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes dhs-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

/* ---- Header ---- */
.dhs-head{text-align:center;margin-bottom:26px;}
.dhs-mark{
	width:64px;height:64px;
	filter:drop-shadow(0 4px 14px rgba(108,91,158,.4));
	animation:dhs-spin 60s linear infinite;
}
@keyframes dhs-spin{to{transform:rotate(360deg)}}
.dhs-title{
	font-size:30px;line-height:1.15;margin:14px 0 6px;
	color:var(--dh-blue);font-weight:700;letter-spacing:.01em;
}
.dhs-sub{margin:0 auto;max-width:42ch;color:var(--dh-muted);font-size:16px;line-height:1.5;}

/* ---- Status banner ---- */
.dhs-status{
	margin:0 0 20px;padding:14px 16px;border-radius:12px;font-size:15px;line-height:1.5;
	border:1px solid transparent;
}
.dhs-status.is-success{background:rgba(46,125,90,.14);border-color:rgba(46,125,90,.35);color:#1d5e42;}
.dhs-status.is-error{background:rgba(176,42,55,.12);border-color:rgba(176,42,55,.35);color:#8c1f2b;}

/* ---- Fieldsets ---- */
.dhs-fs{border:none;padding:0;margin:0 0 22px;}
.dhs-fs legend{
	font-size:14px;text-transform:uppercase;letter-spacing:.12em;
	color:var(--dh-blue);font-weight:700;margin-bottom:12px;padding:0;
}
.dhs-req{color:var(--dh-violet);}
.dhs-opt{color:var(--dh-muted);font-size:.82em;font-weight:400;text-transform:none;letter-spacing:0;}

/* ---- List checkboxes (the four groups) ---- */
.dhs-lists{display:flex;flex-direction:column;gap:10px;}

/* Defensive: WordPress wpautop can inject stray <br> into shortcode output.
 * Our render strips them server-side, but if any survive, ensure they add no
 * height inside the form so row spacing stays controlled purely by flex gap. */
.dhs-card br{display:none;}

/* Hide the real input robustly. This rule is placed FIRST and uses
 * clip+pointer-events so it cannot inflate row height or absorb clicks,
 * even if a later selector (e.g. :has()) is dropped by a minifier. */
.dhs-check input[type="checkbox"],
.dhs-consent input[type="checkbox"]{
	position:absolute;
	width:1px;height:1px;
	margin:0;padding:0;border:0;
	opacity:0;
	clip:rect(0 0 0 0);
	clip-path:inset(50%);
	-webkit-appearance:none;appearance:none;
}
.dhs-check,.dhs-consent{
	display:flex;gap:12px;align-items:flex-start;cursor:pointer;
	padding:13px 15px;border-radius:13px;
	background:var(--dh-glass-strong);
	border:1px solid var(--dh-line);
	transition:border-color .18s, box-shadow .18s, transform .12s;
}
.dhs-check:hover,.dhs-consent:hover{border-color:var(--dh-violet-300);}
.dhs-check.is-checked,.dhs-consent.is-checked{
	border-color:var(--dh-violet);
	box-shadow:0 0 0 3px rgba(108,91,158,.15);
}
/* Base (unchecked) box. */
.dhs-box{
	flex:0 0 22px;width:22px;height:22px;border-radius:7px;margin-top:1px;
	border:2px solid var(--dh-violet-300);background:#fff;position:relative;
	transition:background .15s, border-color .15s;
}
/* Checkmark glyph — hidden (scale 0) by default. Defined BEFORE the checked
 * override so the checked rule (below) wins the cascade. */
.dhs-box::after{
	content:"";position:absolute;left:6px;top:2px;width:6px;height:11px;
	border:solid #fff;border-width:0 2.5px 2.5px 0;
	transform:rotate(45deg) scale(0);
	transition:transform .15s ease;
}
.dhs-check-label{font-size:16px;line-height:1.45;}
input:focus-visible + .dhs-box{outline:3px solid var(--dh-blue);outline-offset:2px;}

/* CHECKED FILL — placed LAST in the file's normal flow and using a literal
 * color (not a custom property) so nothing downstream, including the dark-mode
 * block, can override or invalidate it. Both the native :checked sibling AND
 * the JS .is-checked class drive it, for full robustness. */
.dhs-check.is-checked .dhs-box,
.dhs-consent.is-checked .dhs-box,
.dhs-check input:checked + .dhs-box,
.dhs-consent input:checked + .dhs-box{
	background:#6C5B9E;
	border-color:#6C5B9E;
}
.dhs-check.is-checked .dhs-box::after,
.dhs-consent.is-checked .dhs-box::after,
.dhs-check input:checked + .dhs-box::after,
.dhs-consent input:checked + .dhs-box::after{
	transform:rotate(45deg) scale(1);
}

/* ---- Inputs ---- */
.dhs-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.dhs-col-2{grid-column:1 / -1;}
.dhs-field{display:flex;flex-direction:column;}
.dhs-field label{font-size:14px;font-weight:600;color:var(--dh-blue);margin-bottom:6px;}
.dhs-field input,.dhs-field textarea{
	font-family:inherit;font-size:16px;color:var(--dh-ink);
	padding:12px 14px;border-radius:11px;
	background:rgba(255,255,255,.82);
	border:1px solid var(--dh-line);
	transition:border-color .18s, box-shadow .18s, background .18s;
	width:100%;box-sizing:border-box;
}
.dhs-field textarea{resize:vertical;min-height:80px;}
.dhs-field input:focus,.dhs-field textarea:focus{
	outline:none;border-color:var(--dh-violet);
	box-shadow:0 0 0 3px rgba(108,91,158,.16);
	background:#fff;
}
.dhs-field.is-invalid input,.dhs-field.is-invalid textarea{
	border-color:#b02a37;box-shadow:0 0 0 3px rgba(176,42,55,.14);
}
/* The theme styles <p> with block-gap margins; our hint/err paragraphs live
 * inside .dhs-field and must not inherit that, or large gaps open between
 * fields. The error paragraph is HIDDEN by default and only revealed when JS
 * marks the field .is-invalid. We do NOT rely on :empty, because the theme/
 * wpautop can inject whitespace (&nbsp;, zero-width space) that defeats it. */
.dhs-card .dhs-hint{font-size:12.5px;color:var(--dh-muted);margin:6px 0 0!important;}
.dhs-card .dhs-err{
	display:none!important;
	font-size:13px;color:#8c1f2b;margin:6px 0 0!important;
}
.dhs-card .dhs-err.is-shown{display:block!important;}

/* ---- Optional disclosure ---- */
.dhs-more{
	margin:0 0 22px;border:1px solid var(--dh-line);border-radius:13px;
	background:var(--dh-glass-strong);overflow:hidden;
}
.dhs-more summary{
	cursor:pointer;list-style:none;padding:14px 16px;font-weight:600;color:var(--dh-blue);
	display:flex;justify-content:space-between;align-items:center;gap:8px;
}
.dhs-more summary::-webkit-details-marker{display:none;}
.dhs-more summary::after{content:"+";font-size:20px;color:var(--dh-violet);transition:transform .2s;}
.dhs-more[open] summary::after{transform:rotate(45deg);}
.dhs-more .dhs-grid{padding:0 16px 18px;}

/* ---- Consent ---- */
.dhs-consent{margin-top:4px;}
.dhs-consent a{color:var(--dh-violet);text-decoration:underline;}

/* ---- Turnstile ---- */
.dhs-turnstile{margin:18px 0 4px;}

/* ---- Honeypot (invisible to humans, present for bots) ---- */
.dhs-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden;}

/* ---- Submit ---- */
.dhs-submit{
	margin-top:22px;width:100%;border:none;cursor:pointer;
	font-family:inherit;font-size:18px;font-weight:700;letter-spacing:.02em;color:#fff;
	padding:16px 24px;border-radius:13px;
	background:linear-gradient(135deg,var(--dh-blue) 0%, var(--dh-violet) 100%);
	box-shadow:0 10px 30px rgba(31,58,95,.35);
	display:flex;align-items:center;justify-content:center;gap:12px;
	transition:transform .12s, box-shadow .18s, filter .18s;
}
.dhs-submit:hover{transform:translateY(-1px);box-shadow:0 14px 38px rgba(31,58,95,.42);}
.dhs-submit:active{transform:translateY(0);}
.dhs-submit:disabled{filter:grayscale(.3) opacity(.7);cursor:wait;transform:none;}
.dhs-submit:focus-visible{outline:3px solid var(--dh-blue-700);outline-offset:3px;}
.dhs-spinner{
	width:18px;height:18px;border-radius:50%;display:none;
	border:2.5px solid rgba(255,255,255,.45);border-top-color:#fff;
	animation:dhs-rot .7s linear infinite;
}
.dhs-submit.is-loading .dhs-spinner{display:inline-block;}
@keyframes dhs-rot{to{transform:rotate(360deg)}}

.dhs-fineprint{text-align:center;font-size:13px;color:var(--dh-muted);margin:14px 0 0;}

/* ---- Responsive ---- */
@media (max-width:560px){
	.dhs-wrap{padding:28px 12px;}
	.dhs-card{padding:28px 20px;border-radius:18px;}
	.dhs-title{font-size:25px;}
	.dhs-grid{grid-template-columns:1fr;}
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion:reduce){
	.dhs-card,.dhs-mark,.dhs-spinner{animation:none!important;}
	.dhs-submit,.dhs-box,.dhs-box::after,.dhs-more summary::after{transition:none!important;}
}

/* ---- Dark mode (the aura deepens; glass stays legible) ---- */
@media (prefers-color-scheme:dark){
	.dhs-wrap{--dh-ink:#e8eef9;--dh-muted:#aab8d0;--dh-glass:rgba(28,40,64,.5);--dh-glass-strong:rgba(28,40,64,.7);--dh-line:rgba(255,255,255,.14);}
	.dhs-aura{background:
		radial-gradient(60% 50% at 30% 20%, rgba(108,91,158,.4) 0%, transparent 60%),
		radial-gradient(55% 55% at 75% 30%, rgba(80,120,180,.4) 0%, transparent 60%),
		linear-gradient(160deg,#1a2540 0%, #131c33 60%, #0d1424 100%);}
	.dhs-card{border-color:rgba(255,255,255,.12);}
	.dhs-field input,.dhs-field textarea{background:rgba(18,26,44,.7);color:var(--dh-ink);}
	.dhs-field input:focus,.dhs-field textarea:focus{background:rgba(18,26,44,.92);}
	.dhs-check:not(.is-checked) .dhs-box,.dhs-consent:not(.is-checked) .dhs-box{background:rgba(18,26,44,.9);}
	.dhs-title,.dhs-field label,.dhs-fs legend{color:#cdd9f0;}
}
