/* League Photography Contact Forms — front-end
   Scoped under .lpcf. Override the accent to match your brand, e.g.
   .lpcf { --lpcf-accent: #0a5c36; } in your theme's Additional CSS. */

.lpcf {
	--lpcf-accent: #1a1d24;
	--lpcf-accent-soft: rgba(26, 29, 36, 0.14);
	--lpcf-border: #d7dbe2;
	--lpcf-input-text: #1a1d24;
	--lpcf-muted: #71767f;
	--lpcf-error: #cc2e2e;
	--lpcf-success: #16a34a;
	--lpcf-radius: 10px;

	font: inherit;
	max-width: 640px;
	position: relative;
}

.lpcf,
.lpcf * {
	box-sizing: border-box;
}

.lpcf [hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * Labels + fields
 * ------------------------------------------------------------------ */

.lpcf .lpcf-label {
	display: block;
	font-weight: 600;
	font-size: 0.94em;
	margin: 0 0 0.4rem;
	line-height: 1.35;
}

.lpcf .lpcf-topic-label {
	font-size: 1.15em;
	font-weight: 700;
	margin-bottom: 0.55rem;
}

.lpcf .lpcf-req {
	color: var(--lpcf-error);
	margin-left: 0.15em;
}

.lpcf .lpcf-opt {
	color: var(--lpcf-muted);
	font-weight: 400;
	font-size: 0.85em;
	margin-left: 0.3em;
}

.lpcf .lpcf-field {
	margin: 0 0 1.15rem;
}

.lpcf .lpcf-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.lpcf-file-input),
.lpcf .lpcf-form select,
.lpcf .lpcf-form textarea {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--lpcf-input-text);
	background: #ffffff;
	border: 1px solid var(--lpcf-border);
	border-radius: var(--lpcf-radius);
	padding: 0.72em 0.95em;
	margin: 0;
	box-shadow: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lpcf .lpcf-form textarea {
	min-height: 7em;
	resize: vertical;
}

.lpcf .lpcf-form input:focus,
.lpcf .lpcf-form select:focus,
.lpcf .lpcf-form textarea:focus {
	outline: none;
	border-color: var(--lpcf-accent);
	box-shadow: 0 0 0 3px var(--lpcf-accent-soft);
}

.lpcf .lpcf-form ::placeholder {
	color: #9aa0aa;
	opacity: 1;
}

/* Selects get a chevron */
.lpcf .lpcf-select-wrap {
	position: relative;
}

.lpcf .lpcf-form select {
	padding-right: 2.6em;
	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 d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1em center;
	cursor: pointer;
}

.lpcf .lpcf-topic-select {
	font-size: 1.05rem;
	padding-top: 0.8em;
	padding-bottom: 0.8em;
}

.lpcf .lpcf-topic {
	margin-bottom: 0.4rem;
}

/* Error states */
.lpcf .lpcf-error {
	color: var(--lpcf-error);
	font-size: 0.86em;
	margin: 0.4rem 0 0;
	line-height: 1.35;
}

.lpcf .lpcf-form .has-error {
	border-color: var(--lpcf-error);
	box-shadow: 0 0 0 3px rgba(204, 46, 46, 0.12);
}

.lpcf .lpcf-form-error {
	background: #fdf1f1;
	border: 1px solid #f3c6c6;
	color: #a12626;
	border-radius: var(--lpcf-radius);
	padding: 0.75em 1em;
	font-size: 0.92em;
	margin: 0 0 1.1rem;
}

/* ---------------------------------------------------------------------
 * Honeypot
 * ------------------------------------------------------------------ */

.lpcf .lpcf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * The reveal: topic chosen -> form animates open
 * ------------------------------------------------------------------ */

.lpcf .lpcf-reveal {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.lpcf .lpcf-reveal-inner {
	overflow: hidden;
	min-height: 0;
	padding: 6px;
	margin: -6px;
	visibility: hidden;
	opacity: 0;
	transform: translateY(10px);
	transition:
		visibility 0s linear 0.55s,
		opacity 0.4s ease,
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.lpcf.is-open .lpcf-reveal {
	grid-template-rows: 1fr;
}

.lpcf.is-open .lpcf-reveal-inner {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition:
		visibility 0s linear 0s,
		opacity 0.45s ease 0.1s,
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}

.lpcf .lpcf-contact {
	padding-top: 1.1rem;
}

/* Swapping topics: quick fade of the per-topic parts */
.lpcf .lpcf-desc,
.lpcf .lpcf-dynamic {
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.lpcf .lpcf-reveal-inner.is-swapping .lpcf-desc,
.lpcf .lpcf-reveal-inner.is-swapping .lpcf-dynamic {
	opacity: 0;
	transform: translateY(6px);
}

/* Per-field cascade on render */
.lpcf .lpcf-anim {
	animation: lpcfFieldIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes lpcfFieldIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Topic intro text */
.lpcf .lpcf-desc {
	background: #f5f7fa;
	border-left: 3px solid var(--lpcf-accent);
	border-radius: 0 8px 8px 0;
	color: #2a2f3a;
	padding: 0.85em 1.1em;
	margin: 1.1rem 0 0.2rem;
	font-size: 0.95em;
	line-height: 1.55;
}

.lpcf .lpcf-desc p {
	margin: 0.35em 0;
}

.lpcf .lpcf-desc p:first-child {
	margin-top: 0;
}

.lpcf .lpcf-desc p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------
 * File upload field
 * ------------------------------------------------------------------ */

.lpcf .lpcf-file {
	display: flex;
	align-items: center;
	gap: 0.8em;
	flex-wrap: wrap;
}

.lpcf .lpcf-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

.lpcf .lpcf-file-btn {
	display: inline-block;
	padding: 0.55em 1.2em;
	border: 1px solid var(--lpcf-border);
	border-radius: 999px;
	background: #f4f5f7;
	color: var(--lpcf-input-text);
	font-size: 0.92em;
	font-weight: 600;
	cursor: pointer;
	margin: 0;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lpcf .lpcf-file-btn:hover {
	background: #eceef1;
}

.lpcf .lpcf-file-input:focus ~ .lpcf-file-btn,
.lpcf .lpcf-file-input:focus-visible ~ .lpcf-file-btn {
	border-color: var(--lpcf-accent);
	box-shadow: 0 0 0 3px var(--lpcf-accent-soft);
}

.lpcf .lpcf-file-input.has-error ~ .lpcf-file-btn {
	border-color: var(--lpcf-error);
	box-shadow: 0 0 0 3px rgba(204, 46, 46, 0.12);
}

.lpcf .lpcf-file-name {
	color: var(--lpcf-muted);
	font-size: 0.9em;
	min-width: 0;
	word-break: break-word;
}

/* ---------------------------------------------------------------------
 * Link-only topics: call-to-action button
 * ------------------------------------------------------------------ */

.lpcf .lpcf-cta {
	margin: 1.4rem 0 0.5rem;
}

.lpcf a.lpcf-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--lpcf-accent);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.85em 2.1em;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lpcf a.lpcf-cta-btn:hover,
.lpcf a.lpcf-cta-btn:focus {
	color: #ffffff;
	text-decoration: none;
}

.lpcf a.lpcf-cta-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px -8px var(--lpcf-accent);
}

.lpcf a.lpcf-cta-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--lpcf-accent-soft);
}

/* ---------------------------------------------------------------------
 * Submit button
 * ------------------------------------------------------------------ */

.lpcf .lpcf-actions {
	margin-top: 0.4rem;
}

.lpcf .lpcf-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	background: var(--lpcf-accent);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.85em 2.1em;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.lpcf .lpcf-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px -8px var(--lpcf-accent);
}

.lpcf .lpcf-submit:active:not(:disabled) {
	transform: translateY(0);
}

.lpcf .lpcf-submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--lpcf-accent-soft);
}

.lpcf .lpcf-submit:disabled {
	cursor: default;
	opacity: 0.85;
}

.lpcf .lpcf-submit.is-loading .lpcf-submit-label {
	opacity: 0.7;
}

.lpcf .lpcf-submit.is-loading::after {
	content: "";
	width: 1em;
	height: 1em;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: lpcfSpin 0.7s linear infinite;
}

@keyframes lpcfSpin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------------------------------------------------------------------
 * Success state
 * ------------------------------------------------------------------ */

.lpcf.is-done .lpcf-form {
	display: none;
}

.lpcf .lpcf-result {
	text-align: center;
	padding: 2.2rem 1rem;
	animation: lpcfFieldIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.lpcf .lpcf-check {
	width: 66px;
	height: 66px;
	display: block;
	margin: 0 auto 1.1rem;
}

.lpcf .lpcf-check-circle {
	stroke: var(--lpcf-success);
	stroke-width: 2.5;
	stroke-dasharray: 152;
	stroke-dashoffset: 152;
	animation: lpcfDraw 0.7s ease-out forwards;
}

.lpcf .lpcf-check-mark {
	stroke: var(--lpcf-success);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 36;
	stroke-dashoffset: 36;
	animation: lpcfDraw 0.45s ease-out 0.55s forwards;
}

@keyframes lpcfDraw {
	to {
		stroke-dashoffset: 0;
	}
}

.lpcf .lpcf-result-message {
	font-size: 1.08em;
	margin: 0 0 0.9rem;
}

.lpcf .lpcf-again {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: 0.92em;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s ease;
}

.lpcf .lpcf-again:hover,
.lpcf .lpcf-again:focus-visible {
	opacity: 1;
}

/* ---------------------------------------------------------------------
 * Reduced motion
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.lpcf .lpcf-reveal,
	.lpcf .lpcf-reveal-inner,
	.lpcf .lpcf-desc,
	.lpcf .lpcf-dynamic,
	.lpcf .lpcf-anim,
	.lpcf .lpcf-result,
	.lpcf .lpcf-check-circle,
	.lpcf .lpcf-check-mark,
	.lpcf .lpcf-submit {
		animation: none !important;
		transition: none !important;
	}

	.lpcf .lpcf-check-circle,
	.lpcf .lpcf-check-mark {
		stroke-dashoffset: 0;
	}
}
