/*
 * SEACHA Membership — public form.
 *
 * Inherits the theme's typography entirely: no font-family, font-size or
 * line-height on text elements (the single exception is the reference code,
 * which the spec requires monospace). Every colour is a custom property with
 * a fallback, set from Settings → Membership → Appearance. No !important.
 */

.seacha-form {
	max-width: var(--seacha-max-width, 720px);
	margin-left: auto;
	margin-right: auto;
	color: var(--seacha-text, #222222);
}

/* --- Sections: one long scrolling form ------------------------------------ */

.seacha-step {
	padding: 8px 0 16px;
	border-bottom: 1px solid var(--seacha-border, #d0d0d0);
	margin-bottom: 24px;
	/* Anchor jumps land below the sticky section nav. */
	scroll-margin-top: 88px;
}

.seacha-step-title {
	outline: none;
}

.seacha-submit-row {
	margin-top: 20px;
}

/* --- Section navigation (sticky, clickable, scroll-spy) -------------------- */

.seacha-progress-nav {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--seacha-soft-bg, #f7f5f4);
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	padding: 8px 12px;
	margin-bottom: 24px;
}

.seacha-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Divi (and some themes) set list markers on the li itself, which the ol
   rule above cannot override — scope it out explicitly. */
.seacha-form .seacha-progress li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.seacha-progress a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 4px;
	text-decoration: none;
	color: var(--seacha-muted, #595959);
	border-radius: var(--seacha-radius, 8px);
}

.seacha-progress a:hover {
	color: var(--seacha-text, #222222);
}

.seacha-progress-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* rem, not em: the is-done state zeroes the font size to swap the
	   number for a tick, and an em-sized box would collapse with it. */
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	border: 1px solid var(--seacha-border, #d0d0d0);
	background: #ffffff;
	flex-shrink: 0;
}

.seacha-progress li.is-active a {
	color: var(--seacha-text, #222222);
	font-weight: 600;
}

.seacha-progress li.is-active .seacha-progress-num {
	background: var(--seacha-primary, #7d3c3f);
	border-color: var(--seacha-primary, #7d3c3f);
	color: #ffffff;
}

/* Completed section: tick instead of number. */
.seacha-progress li.is-done .seacha-progress-num {
	border-color: var(--seacha-primary, #7d3c3f);
	color: var(--seacha-primary, #7d3c3f);
	font-size: 0;
}

.seacha-progress li.is-done .seacha-progress-num::after {
	content: "\2713";
	font-size: 1rem;
}

.seacha-progress li.is-done.is-active .seacha-progress-num {
	color: #ffffff;
}

/* --- Tier chooser: pricing cards -------------------------------------------
   Sizes use em so everything scales with the theme's base font size rather
   than imposing absolute typography. */

/* The cards-only view has its own width setting, independent of the form's
   reading-width cap. Default (none) = fill the containing row. */
.seacha-form-chooser {
	max-width: var(--seacha-chooser-max-width, none);
	margin-left: auto;
	margin-right: auto;
}

.seacha-tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--seacha-tier-gap, 20px);
	align-items: stretch;
	margin: 16px 0;
}

/* Fixed column counts (shortcode columns="N" / module setting). */
.seacha-tiers-cols-1 {
	grid-template-columns: 1fr;
}

.seacha-tiers-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.seacha-tiers-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.seacha-tiers-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Fixed counts still collapse sensibly on smaller screens. */
@media (max-width: 980px) {
	.seacha-tiers-cols-3,
	.seacha-tiers-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

.seacha-tier-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 28px 24px;
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: calc(var(--seacha-radius, 8px) * 1.5);
	background: #ffffff;
	color: var(--seacha-text, #222222);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.seacha-tier-card:hover {
	border-color: var(--seacha-primary, #7d3c3f);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.seacha-tier-card.is-featured {
	background: var(--seacha-featured-bg, #3b2224);
	color: var(--seacha-featured-text, #ffffff);
	border-color: var(--seacha-featured-bg, #3b2224);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.seacha-tier-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--seacha-soft-bg, #f7f5f4);
	color: var(--seacha-primary, #7d3c3f);
	font-weight: 600;
	font-size: 0.8em;
}

.is-featured .seacha-tier-badge {
	background: rgba(255, 255, 255, 0.16);
	color: var(--seacha-featured-text, #ffffff);
}

.seacha-tier-name {
	margin: 0 0 8px;
	font-weight: 700;
	font-size: 1.15em;
	/* Themes (Divi included) set explicit heading colours that beat
	   inheritance — the featured card needs its light text back. */
	color: inherit;
	padding: 0;
}

.seacha-tier-desc {
	margin: 0 0 16px;
	color: var(--seacha-muted, #595959);
	font-size: 0.95em;
}

.is-featured .seacha-tier-desc {
	color: color-mix(in srgb, var(--seacha-featured-text, #ffffff) 78%, transparent);
}

.seacha-tier-price {
	margin: 0 0 20px;
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.seacha-tier-amount {
	font-size: 2.2em;
	font-weight: 800;
	line-height: 1.1;
}

.seacha-tier-per {
	color: var(--seacha-muted, #595959);
}

.is-featured .seacha-tier-per {
	color: color-mix(in srgb, var(--seacha-featured-text, #ffffff) 78%, transparent);
}

.seacha-tier-per abbr {
	text-decoration: none;
}

.seacha-tier-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 20px;
	border: 2px solid var(--seacha-primary, #7d3c3f);
	border-radius: var(--seacha-radius, 8px);
	color: var(--seacha-primary, #7d3c3f);
	background: transparent;
	text-decoration: none;
	font-weight: 600;
}

.seacha-tier-cta:hover,
.seacha-tier-cta:focus-visible {
	background: var(--seacha-primary, #7d3c3f);
	color: #ffffff;
}

.is-featured .seacha-tier-cta {
	background: var(--seacha-primary, #7d3c3f);
	border-color: var(--seacha-primary, #7d3c3f);
	color: #ffffff;
}

.is-featured .seacha-tier-cta:hover,
.is-featured .seacha-tier-cta:focus-visible {
	background: var(--seacha-primary-hover, #5f2e30);
	border-color: var(--seacha-primary-hover, #5f2e30);
}

.seacha-tier-features {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	border-top: 1px solid var(--seacha-border, #d0d0d0);
}

/* Breathing room below the separator lives on the first item, not on the
   ul's padding — Divi zeroes list padding with higher-specificity resets. */
.seacha-form .seacha-tier-features li:first-child {
	margin-top: 20px;
}

.is-featured .seacha-tier-features {
	border-top-color: color-mix(in srgb, var(--seacha-featured-text, #ffffff) 25%, transparent);
}

/* Guard against theme list markers (Divi styles li directly). */
.seacha-form .seacha-tier-features li {
	list-style: none;
	position: relative;
	margin: 0 0 10px;
	padding: 0 0 0 28px;
}

.seacha-tier-features li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--seacha-primary, #7d3c3f);
}

.is-featured .seacha-tier-features li::before {
	color: var(--seacha-featured-text, #ffffff);
}

.seacha-muted {
	color: var(--seacha-muted, #595959);
}

/* Fallback when the theme doesn't define WP's screen-reader-text. */
.seacha-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.seacha-tiers {
		grid-template-columns: 1fr;
	}
}

.seacha-form-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

/* --- Fields ----------------------------------------------------------------- */

.seacha-field {
	margin-bottom: 20px;
}

.seacha-field > label,
.seacha-group legend {
	display: block;
	font-weight: 600;
	font-size: var(--seacha-label-size, 1em);
	margin-bottom: var(--seacha-label-gap, 4px);
}

.seacha-help {
	color: var(--seacha-muted, #595959);
	margin: 2px 0 6px;
	font-size: 0.85em;
}

.seacha-req {
	color: var(--seacha-error, #b32d2e);
}

.seacha-form input,
.seacha-form select,
.seacha-form textarea,
.seacha-form button {
	/* Browsers do not inherit typography into form controls; the theme's
	   font must flow into them explicitly. */
	font: inherit;
}

.seacha-form input[type="text"],
.seacha-form input[type="email"],
.seacha-form input[type="tel"],
.seacha-form input[type="date"],
.seacha-form input[type="url"],
.seacha-form select,
.seacha-form textarea {
	width: 100%;
	min-height: 48px; /* phone-first: comfortable touch targets */
	padding: 10px 12px;
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-input-radius, 8px);
	background: #ffffff;
	color: var(--seacha-text, #222222);
	box-sizing: border-box;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.seacha-form input:hover,
.seacha-form select:hover,
.seacha-form textarea:hover {
	border-color: color-mix(in srgb, var(--seacha-primary, #7d3c3f) 45%, var(--seacha-border, #d0d0d0));
}

.seacha-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}

.seacha-form textarea {
	min-height: 96px;
}

.seacha-form input[type="file"] {
	width: 100%;
	padding: 14px;
	border: 2px dashed var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	background: var(--seacha-soft-bg, #f7f5f4);
	box-sizing: border-box;
	cursor: pointer;
}

.seacha-form input[type="file"]:hover {
	border-color: var(--seacha-primary, #7d3c3f);
}

.seacha-form input[type="checkbox"],
.seacha-form input[type="radio"] {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	accent-color: var(--seacha-primary, #7d3c3f);
}

/* Visible focus everywhere, never removed. */
.seacha-form a:focus-visible,
.seacha-form input:focus-visible,
.seacha-form select:focus-visible,
.seacha-form textarea:focus-visible,
.seacha-form button:focus-visible {
	outline: 2px solid var(--seacha-primary, #7d3c3f);
	outline-offset: 2px;
}

.seacha-form [aria-invalid="true"] {
	border-color: var(--seacha-error, #b32d2e);
	outline: 2px solid var(--seacha-error, #b32d2e);
	outline-offset: 2px;
}

/* Keyboard focus on an errored field: keep ONE ring, in the error colour,
 * slightly stronger — two stacked rings would just look broken. */
.seacha-form [aria-invalid="true"]:focus,
.seacha-form [aria-invalid="true"]:focus-visible {
	outline: 3px solid var(--seacha-error, #b32d2e);
	outline-offset: 2px;
}

.seacha-field-error {
	display: block;
	color: var(--seacha-error, #b32d2e);
	margin-top: 4px;
	font-size: 0.85em;
}

.seacha-field-error:empty {
	display: none;
}

/* --- Choice groups ------------------------------------------------------------ */

.seacha-group {
	border: 0;
	padding: 0;
	margin: 0;
}

.seacha-choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 6px 0;
	min-height: 36px;
}

.seacha-choice-other .seacha-other-text {
	min-height: 40px;
	flex: 1 1 auto;
	width: auto;
}

/* --- Guardian block -------------------------------------------------------------- */

.seacha-guardian {
	border-left: 4px solid var(--seacha-primary, #7d3c3f);
	background: var(--seacha-soft-bg, #f7f5f4);
	border-radius: var(--seacha-radius, 8px);
	padding: 16px;
	margin: 20px 0;
}

.seacha-js .seacha-guardian {
	display: none;
}

.seacha-js .seacha-guardian.is-visible {
	display: block;
}

/* --- Payment ------------------------------------------------------------------------ */

.seacha-refcode-box {
	background: var(--seacha-soft-bg, #f7f5f4);
	border: 1px dashed var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	padding: 16px;
	margin-bottom: 16px;
	text-align: center;
}

/* Spec-mandated exception to the "inherit typography" rule: the reference
   code must be monospace and easy to copy. */
.seacha-refcode {
	display: inline-block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.4em;
	letter-spacing: 0.08em;
	user-select: all;
	padding: 4px 10px;
	background: #ffffff;
	border-radius: var(--seacha-radius, 8px);
}

.seacha-method-block {
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	padding: 16px;
	margin: 12px 0;
}

.seacha-js .seacha-method-block {
	display: none;
}

.seacha-js .seacha-method-block.is-visible {
	display: block;
}

.seacha-js .seacha-slip-field {
	display: none;
}

.seacha-js .seacha-slip-field.is-visible {
	display: block;
}

.seacha-qr {
	max-width: 100%;
	height: auto;
}

.seacha-bank-details dt {
	font-weight: 600;
	margin-top: 8px;
}

.seacha-bank-details dd {
	margin: 0;
}

/* --- Review ----------------------------------------------------------------------------- */

.seacha-review-group {
	border-bottom: 1px solid var(--seacha-border, #d0d0d0);
	padding: 12px 0;
}

.seacha-review-group h4 {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 8px;
}

.seacha-review dt {
	color: var(--seacha-muted, #595959);
	margin-top: 8px;
}

.seacha-review dd {
	margin: 0;
	white-space: pre-wrap;
}

.seacha-edit-step {
	background: none;
	border: none;
	padding: 0;
	color: var(--seacha-primary, #7d3c3f);
	text-decoration: underline;
	cursor: pointer;
}

/* --- Buttons (skipped entirely when a theme button class is configured) ------------------- */

.seacha-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 24px;
	border: none;
	border-radius: var(--seacha-radius, 8px);
	background: var(--seacha-primary, #7d3c3f);
	color: #ffffff;
	cursor: pointer;
}

.seacha-btn:hover {
	background: var(--seacha-primary-hover, #5f2e30);
}

.seacha-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* --- Errors / status ------------------------------------------------------------------------ */

/* (success box styled by the notice component below) */


/* --- Notices (error / success): soft tint, accent bar, icon, dismiss ------- */

/* display:flex below would defeat the hidden attribute (hidden = UA
 * display:none, which any author display overrides) — restate it. */
.seacha-form-error[hidden],
.seacha-form-success[hidden] {
	display: none;
}

.seacha-form-error,
.seacha-form-success {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	margin-top: 16px;
	border-radius: var(--seacha-radius, 8px);
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-left: 4px solid currentColor;
	background: color-mix(in srgb, currentColor 7%, var(--seacha-bg, #ffffff));
	font-size: 0.95em;
	line-height: 1.5;
}

.seacha-form-error {
	color: var(--seacha-error, #b32d2e);
}

.seacha-form-success {
	color: var(--seacha-success, #1e7a3c);
}

.seacha-form-error::before,
.seacha-form-success::before {
	content: "";
	flex: 0 0 20px;
	height: 20px;
	margin-top: 1px;
	background-color: currentColor;
	-webkit-mask: var(--seacha-notice-icon) center / contain no-repeat;
	mask: var(--seacha-notice-icon) center / contain no-repeat;
}

.seacha-form-error::before {
	--seacha-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 21h22L12 2zm1 14h-2v2h2v-2zm0-7h-2v5h2V9z'/%3E%3C/svg%3E");
}

.seacha-form-success::before {
	--seacha-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.6-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E");
}

.seacha-notice-text {
	flex: 1;
	min-width: 0;
	color: var(--seacha-text, #222222);
}

.seacha-notice-x {
	flex: 0 0 auto;
	margin-left: 4px;
	padding: 0 2px;
	border: none;
	background: none;
	color: currentColor;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
}

.seacha-notice-x:hover,
.seacha-notice-x:focus-visible {
	opacity: 1;
}

.seacha-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --- Honeypot: hidden from people, present for bots ------------------------------------------- */

.seacha-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Motion: only for those who accept it ------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	.seacha-tier-card,
	.seacha-btn {
		transition: border-color 0.15s ease, background-color 0.15s ease;
	}
}

/* =====================================================================
   Polish pass (v0.11): floating labels, stepper styles, live feedback.
   ===================================================================== */

/* --- Floating labels (pure CSS: works without JavaScript) ---------------- */

.seacha-float {
	position: relative;
}

/* Must match the base input rule's specificity (.seacha-form + [type=…])
   or these paddings silently lose the cascade. */
.seacha-form .seacha-float input,
.seacha-form .seacha-float textarea {
	min-height: 54px;
	padding: 24px 12px 6px;
}

.seacha-float label {
	position: absolute;
	left: 13px;
	top: 15px;
	margin: 0;
	color: var(--seacha-muted, #595959);
	font-weight: 400;
	pointer-events: none;
	transform-origin: left top;
	max-width: calc(100% - 26px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.seacha-float input:focus + label,
.seacha-float input:not(:placeholder-shown) + label,
.seacha-float textarea:focus + label,
.seacha-float textarea:not(:placeholder-shown) + label,
.seacha-float-date label {
	transform: translateY(-11px) scale(0.68);
	color: var(--seacha-primary, #7d3c3f);
}

/* --- Stepper: pills (default, refined) ----------------------------------- */

.seacha-progress li {
	display: flex;
	align-items: center;
}

.seacha-progress-style-pills li:not(:first-child)::before {
	content: "";
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: var(--seacha-border, #d0d0d0);
	margin-right: 12px;
}

.seacha-progress-style-pills li.is-done:not(:first-child)::before {
	background: var(--seacha-primary, #7d3c3f);
}

/* --- Stepper: slim progress bar ------------------------------------------- */

.seacha-progress-status {
	margin: 0 0 8px;
	font-weight: 600;
}

.seacha-progress-track {
	height: 6px;
	border-radius: 999px;
	background: var(--seacha-border, #d0d0d0);
	overflow: hidden;
}

.seacha-progress-fill {
	display: block;
	height: 100%;
	width: var(--seacha-progress, 10%);
	border-radius: inherit;
	background: var(--seacha-primary, #7d3c3f);
}

/* With JS the bar speaks for the list; without JS the links stay visible. */
.seacha-js .seacha-progress-style-bar .seacha-progress {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --- Stepper: underline tabs ----------------------------------------------- */

.seacha-progress-style-underline .seacha-progress-num {
	display: none;
}

.seacha-progress-style-underline .seacha-progress a {
	border-bottom: 3px solid transparent;
	border-radius: 0;
	padding: 8px 2px;
}

.seacha-progress-style-underline li.is-done a {
	color: var(--seacha-primary, #7d3c3f);
}

.seacha-progress-style-underline li.is-active a {
	color: var(--seacha-text, #222222);
	font-weight: 600;
	border-bottom-color: var(--seacha-primary, #7d3c3f);
}

/* --- Stepper: dots ----------------------------------------------------------- */

.seacha-progress-style-dots .seacha-progress-num {
	width: 10px;
	height: 10px;
	border: none;
	background: var(--seacha-border, #d0d0d0);
	font-size: 0;
}

.seacha-progress-style-dots li.is-done .seacha-progress-num {
	background: color-mix(in srgb, var(--seacha-primary, #7d3c3f) 55%, #ffffff);
}

.seacha-progress-style-dots li.is-done .seacha-progress-num::after {
	display: none;
}

.seacha-progress-style-dots li.is-active .seacha-progress-num {
	background: var(--seacha-primary, #7d3c3f);
}

/* Only the active label shows (JS mode); no-JS keeps all labels visible. */
.seacha-js .seacha-progress-style-dots li:not(.is-active) .seacha-progress-title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --- Live validation feedback -------------------------------------------------- */

.seacha-field.is-valid .seacha-float::after {
	content: "\2713";
	position: absolute;
	right: 14px;
	top: 13px;
	color: var(--seacha-success, #2e7d32);
	font-weight: 700;
	pointer-events: none;
}

/* Native date controls keep their calendar icon on the right. */
.seacha-field.is-valid .seacha-float-date::after {
	right: 44px;
}

.seacha-word-count {
	display: block;
	margin-top: 4px;
	color: var(--seacha-muted, #595959);
}

.seacha-word-count.is-out {
	color: #9a6a00;
	font-weight: 600;
}

/* --- Motion (only for those who accept it) --------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	.seacha-form input,
	.seacha-form select,
	.seacha-form textarea {
		transition: border-color 0.15s ease, box-shadow 0.15s ease;
	}

	.seacha-float label {
		transition: transform 0.18s ease, color 0.18s ease;
	}

	.seacha-progress-fill {
		transition: width 0.4s ease;
	}

	.seacha-progress-style-underline .seacha-progress a {
		transition: border-color 0.2s ease, color 0.2s ease;
	}

	/* Section reveal: the class pair is only ever added by JS. */
	.seacha-js .seacha-step.seacha-reveal {
		opacity: 0;
		transform: translateY(14px);
		transition: opacity 0.5s ease, transform 0.5s ease;
	}

	.seacha-js .seacha-step.seacha-reveal.is-in {
		opacity: 1;
		transform: none;
	}

	.seacha-guardian.is-visible,
	.seacha-method-block.is-visible,
	.seacha-slip-field.is-visible {
		animation: seacha-fade-in 0.35s ease;
	}

	.seacha-field.is-shake {
		animation: seacha-shake 0.45s ease;
	}

	@keyframes seacha-fade-in {
		from {
			opacity: 0;
			transform: translateY(6px);
		}
		to {
			opacity: 1;
			transform: none;
		}
	}

	@keyframes seacha-shake {
		20% {
			transform: translateX(-5px);
		}
		40% {
			transform: translateX(4px);
		}
		60% {
			transform: translateX(-3px);
		}
		80% {
			transform: translateX(2px);
		}
	}
}

/* --- Step-by-step layout (Form tab setting; no-JS renders as one page) --- */

.seacha-nav {
	display: none;
}

.seacha-js.seacha-layout-steps .seacha-step {
	display: none;
	border-bottom: none;
}

.seacha-js.seacha-layout-steps .seacha-step.is-active {
	display: block;
}

.seacha-js.seacha-layout-steps .seacha-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
}

.seacha-js.seacha-layout-steps .seacha-nav .seacha-btn-prev.is-hidden,
.seacha-js.seacha-layout-steps .seacha-nav .seacha-btn-next.is-hidden {
	visibility: hidden;
}

/* Scoped to the APPLICATION form only: the in-place payment view lives in
 * the same steps-mode container, and its Confirm button must never be
 * swallowed by the wizard's show/hide logic. */
.seacha-js.seacha-layout-steps .seacha-app-form .seacha-submit-row {
	display: none;
}

.seacha-js.seacha-layout-steps .seacha-app-form .seacha-submit-row.is-visible {
	display: block;
}

/* --- SEACHA Focus page template (no theme header/footer) ------------------ */

body.seacha-focus {
	margin: 0;
	background: #ffffff;
}

.seacha-focus-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 24px;
	background: var(--seacha-bg, #ffffff);
	border-bottom: 1px solid var(--seacha-border, #d0d0d0);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.seacha-focus-bar a {
	text-decoration: none;
}

.seacha-focus-home {
	font-weight: 700;
	color: var(--seacha-text, #222222);
	display: flex;
	align-items: center;
}

.seacha-focus-home img {
	max-height: 40px;
	width: auto;
}

.seacha-focus-exit {
	color: var(--seacha-muted, #595959);
}

.seacha-focus-exit:hover {
	color: var(--seacha-primary, #7d3c3f);
}

.seacha-focus-main {
	padding: 32px 24px 64px;
}

/* No fixed theme header on this template, so anchors need less clearance. */
body.seacha-focus .seacha-step {
	scroll-margin-top: 72px;
}

/* --- PayPal completion claim ------------------------------------------------ */

.seacha-paypal-claim {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: var(--seacha-radius, 8px);
	border: 1px dashed var(--seacha-border, #d0d0d0);
}

.seacha-paypal-claim.is-nudged {
	border-color: var(--seacha-primary, #7d3c3f);
	background: var(--seacha-soft-bg, #f7f5f4);
}


/* --- Post-submit payment view ---------------------------------------------- */

.seacha-form .seacha-pay-view[hidden] {
	display: none;
}

.seacha-form .seacha-pay-view {
	margin-top: 8px;
}

/* Method cards: 3 per row, flowing to new rows when more are enabled. */
.seacha-form .seacha-pay-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 8px 0 4px;
}

@media (max-width: 760px) {
	.seacha-form .seacha-pay-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.seacha-form .seacha-pay-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

.seacha-form .seacha-pay-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 18px 12px 14px;
	text-align: center;
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	background: var(--seacha-bg, #ffffff);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.seacha-form .seacha-pay-card:hover {
	border-color: var(--seacha-primary, #7d3c3f);
}

.seacha-form .seacha-pay-card input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.seacha-form .seacha-pay-card.is-selected {
	border-color: var(--seacha-primary, #7d3c3f);
	box-shadow: 0 0 0 2px var(--seacha-primary, #7d3c3f) inset;
}

.seacha-form .seacha-pay-card:focus-within {
	outline: 2px solid var(--seacha-primary, #7d3c3f);
	outline-offset: 2px;
}

.seacha-form .seacha-pay-card-icon {
	color: var(--seacha-primary, #7d3c3f);
	line-height: 0;
}

.seacha-form .seacha-pay-card-icon img {
	width: 100%;
	max-width: 120px;
	height: 56px;
	object-fit: contain;
}

.seacha-form .seacha-pay-card-label {
	font-size: 1rem;
	color: var(--seacha-text, #222222);
}

.seacha-form .seacha-pay-card-desc {
	font-size: 0.85em;
	color: var(--seacha-muted, #595959);
}

/* No-JS: every method block visible so the page still works. */
.seacha-form:not(.seacha-js) .seacha-pay-view .seacha-method-block,
.seacha-form:not(.seacha-js) .seacha-pay-view .seacha-slip-field {
	display: block;
}


/* --- Steps-mode button row refinements ------------------------------------- */

/* Back is the secondary action: outlined, not filled. */
.seacha-btn.seacha-btn-prev {
	background: transparent;
	color: var(--seacha-primary, #7d3c3f);
	border: 2px solid var(--seacha-primary, #7d3c3f);
}

.seacha-btn.seacha-btn-prev:hover,
.seacha-btn.seacha-btn-prev:focus-visible {
	background: var(--seacha-primary, #7d3c3f);
	color: #ffffff;
}

/* Submit sits in the nav row and swaps in for Next on the last step. */
.seacha-js.seacha-layout-steps .seacha-nav .seacha-btn-submit {
	display: none;
}

.seacha-js.seacha-layout-steps .seacha-nav .seacha-btn-submit.is-visible {
	display: inline-flex;
}

/* When Submit replaces it, Next must give up its space entirely. */
.seacha-js.seacha-layout-steps .seacha-nav .seacha-btn-next.is-hidden {
	display: none;
}


/* Admin-only test shortcut above the form. */
.seacha-admin-testbar {
	padding: 8px 12px;
	border: 1px dashed var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	font-size: 0.85em;
}

.seacha-admin-testbar a {
	color: var(--seacha-muted, #595959);
}


/* --- Member portal ---------------------------------------------------------- */

/* Both portal states are a card: the membership card and the link-request
 * form share one box, so a Divi background/border/shadow set on the module
 * styles whichever state a visitor sees. */
.seacha-member-card,
.seacha-portal-form {
	max-width: 480px;
	padding: calc(var(--seacha-gap, 20px) * 1.4);
	border: 1px solid var(--seacha-border, #d0d0d0);
	border-radius: var(--seacha-radius, 8px);
	background: var(--seacha-bg, #ffffff);
}

.seacha-member-card .seacha-step-title {
	margin-bottom: var(--seacha-gap, 20px);
}

.seacha-member-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: calc(var(--seacha-gap, 20px) * 0.7) calc(var(--seacha-gap, 20px) * 1.2);
	margin: var(--seacha-gap, 20px) 0;
}

.seacha-member-card .seacha-help {
	margin-top: var(--seacha-gap, 20px);
}

.seacha-member-details dt {
	font-weight: 600;
	color: var(--seacha-muted, #595959);
}

.seacha-member-details dd {
	margin: 0;
}

/* "Stop auto-renewal": a quiet outlined button under the card details. */
.seacha-portal-cancel {
	margin-top: var(--seacha-gap, 20px);
}

.seacha-btn.seacha-btn-outline {
	background: transparent;
	color: var(--seacha-primary, #7d3c3f);
	border: 2px solid var(--seacha-primary, #7d3c3f);
}

.seacha-btn.seacha-btn-outline:hover,
.seacha-btn.seacha-btn-outline:focus-visible {
	background: var(--seacha-primary, #7d3c3f);
	color: #fff;
}

/* Intro → email field gap; the Divi module sets the variable per page. */
.seacha-portal-intro {
	margin: 0 0 var(--seacha-portal-intro-gap, var(--seacha-gap, 20px));
}

/* Inside a Divi module the module's own Sizing (width / max width /
 * alignment) is the only cap: lift the plugin's inner ones. Covers the
 * classic module wrapper and the Divi 5 add-on's module class. */
.seacha-portal-module .seacha-form,
.seacha-portal-module .seacha-member-card,
.seacha-portal-module .seacha-portal-form,
.seacha_d5_member_portal .seacha-form,
.seacha_d5_member_portal .seacha-member-card,
.seacha_d5_member_portal .seacha-portal-form {
	max-width: none;
}

/* Alignment: shortcode align="…" or Divi's text-orientation class. The
 * details grid re-balances so label/value pairs sit around the axis. */
.seacha-portal.seacha-align-left,
.et_pb_text_align_left .seacha-portal {
	text-align: left;
}

.seacha-portal.seacha-align-center,
.et_pb_text_align_center .seacha-portal {
	text-align: center;
}

.seacha-portal.seacha-align-center .seacha-member-card,
.seacha-portal.seacha-align-center .seacha-portal-form,
.et_pb_text_align_center .seacha-portal .seacha-member-card,
.et_pb_text_align_center .seacha-portal .seacha-portal-form {
	margin-left: auto;
	margin-right: auto;
}

.seacha-portal.seacha-align-center .seacha-member-details,
.et_pb_text_align_center .seacha-portal .seacha-member-details {
	grid-template-columns: 1fr 1fr;
}

.seacha-portal.seacha-align-center .seacha-member-details dt,
.et_pb_text_align_center .seacha-portal .seacha-member-details dt {
	text-align: right;
}

.seacha-portal.seacha-align-center .seacha-member-details dd,
.et_pb_text_align_center .seacha-portal .seacha-member-details dd {
	text-align: left;
}

.seacha-portal.seacha-align-right,
.et_pb_text_align_right .seacha-portal {
	text-align: right;
}

.seacha-portal.seacha-align-right .seacha-member-card,
.seacha-portal.seacha-align-right .seacha-portal-form,
.et_pb_text_align_right .seacha-portal .seacha-member-card,
.et_pb_text_align_right .seacha-portal .seacha-portal-form {
	margin-left: auto;
}

.seacha-portal.seacha-align-right .seacha-member-details,
.et_pb_text_align_right .seacha-portal .seacha-member-details {
	grid-template-columns: 1fr auto;
}

/* Pay view: the Confirm button belongs to a chosen method — hidden until
 * one is picked (JS adds is-visible; without JS it stays available). */
.seacha-js .seacha-pay-form .seacha-submit-row {
	display: none;
}

.seacha-js .seacha-pay-form .seacha-submit-row.is-visible {
	display: block;
}
