/*
 * SumatiDham Dynamic Forms - front-end styles
 *
 * Colours come from CSS custom properties on .sdf-form-wrap so a theme (or the Elementor
 * widget's style controls) can restyle everything without touching this file.
 * Fonts are inherited from the site (Elementor / theme typography); nothing is forced.
 */

.sdf-form-wrap {
	--sdf-accent: #a8145a;
	--sdf-accent-strong: #7f0f44;
	--sdf-accent-soft: #d63a7d;
	--sdf-gold: #b98a2e;
	--sdf-ink: #2a1822;
	--sdf-muted: #66545d;
	--sdf-line: #dfcfd6;
	--sdf-surface: #ffffff;
	--sdf-field-bg: #ffffff;
	--sdf-notice-bg: #fbf0e9;
	--sdf-notice-ink: #6b1240;
	--sdf-error: #b3261e;
	--sdf-error-bg: #fdeeed;
	--sdf-success: #14532d;
	--sdf-success-bg: #eaf7ee;
	--sdf-success-line: #9bd3ae;
	--sdf-radius: 10px;
	--sdf-focus-ring: rgba(168, 20, 90, 0.22);

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	color: var(--sdf-ink);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

.sdf-form-wrap *,
.sdf-form-wrap *::before,
.sdf-form-wrap *::after {
	box-sizing: border-box;
}

/* Card ------------------------------------------------------------------ */

.sdf-form-wrap .sdf-form-card {
	position: relative;
	overflow: hidden;
	max-width: 100%;
	padding: clamp(1.125rem, 3.5vw, 2.5rem);
	background: var(--sdf-surface);
	border: 1px solid var(--sdf-line);
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(42, 24, 34, 0.05), 0 14px 34px -18px rgba(96, 20, 60, 0.28);
}

.sdf-form-wrap .sdf-form-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, var(--sdf-accent-strong), var(--sdf-accent-soft) 60%, var(--sdf-gold));
}

/* Header image ---------------------------------------------------------- */

.sdf-form-wrap .sdf-header-image {
	margin: 0 0 1.5rem;
	padding: 0;
}

.sdf-form-wrap .sdf-header-img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}

/* Title & description ----------------------------------------------------- */

.sdf-form-wrap .sdf-form-head {
	margin: 0 0 1.75rem;
}

.sdf-form-wrap .sdf-form-title {
	margin: 0 0 0.5rem;
	padding: 0;
	color: var(--sdf-accent-strong);
	font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem);
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.sdf-form-wrap .sdf-form-description {
	color: var(--sdf-muted);
	font-size: 1rem;
}

.sdf-form-wrap .sdf-form-description > :first-child {
	margin-top: 0;
}

.sdf-form-wrap .sdf-form-description > :last-child {
	margin-bottom: 0;
}

/* Honeypot: off-screen instead of display:none so bots still see it ---------- */

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

/* Grid ---------------------------------------------------------------------- */

.sdf-form-wrap .sdf-fields {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1.375rem 1.5rem;
	align-items: start;
	margin: 0;
	padding: 0;
}

.sdf-form-wrap .sdf-fields > input[type="hidden"] {
	display: none;
}

.sdf-form-wrap .sdf-field {
	grid-column: span 12;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.sdf-form-wrap .sdf-w-100 { grid-column: span 12; }
.sdf-form-wrap .sdf-w-75  { grid-column: span 9; }
.sdf-form-wrap .sdf-w-66  { grid-column: span 8; }
.sdf-form-wrap .sdf-w-50  { grid-column: span 6; }
.sdf-form-wrap .sdf-w-33  { grid-column: span 4; }
.sdf-form-wrap .sdf-w-25  { grid-column: span 3; }

/* Labels -------------------------------------------------------------------- */

.sdf-form-wrap .sdf-fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sdf-form-wrap .sdf-label {
	display: block;
	width: 100%;
	margin: 0 0 0.5rem;
	padding: 0;
	color: var(--sdf-ink);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.sdf-form-wrap .sdf-required {
	color: var(--sdf-error);
	font-weight: 700;
}

.sdf-form-wrap .sdf-description,
.sdf-form-wrap .sdf-help {
	margin: 0 0 0.5rem;
	color: var(--sdf-muted);
	font-size: 0.875rem;
	line-height: 1.55;
}

.sdf-form-wrap .sdf-help {
	margin: 0.4rem 0 0;
}

.sdf-form-wrap .sdf-description > :first-child,
.sdf-form-wrap .sdf-help > :first-child {
	margin-top: 0;
}

.sdf-form-wrap .sdf-description > :last-child,
.sdf-form-wrap .sdf-help > :last-child {
	margin-bottom: 0;
}

/* Inputs -------------------------------------------------------------------- */

.sdf-form-wrap .sdf-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 3rem;
	margin: 0;
	padding: 0.7rem 0.9rem;
	color: var(--sdf-ink);
	font: inherit;
	line-height: 1.5;
	background-color: var(--sdf-field-bg);
	background-image: none;
	border: 1px solid var(--sdf-line);
	border-radius: var(--sdf-radius);
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.sdf-form-wrap textarea.sdf-input {
	min-height: 7rem;
	resize: vertical;
}

.sdf-form-wrap select.sdf-input {
	padding-right: 2.5rem;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--sdf-muted) 50%),
		linear-gradient(135deg, var(--sdf-muted) 50%, transparent 50%);
	background-position: calc(100% - 1.3rem) 50%, calc(100% - 0.95rem) 50%;
	background-size: 0.36rem 0.36rem, 0.36rem 0.36rem;
	background-repeat: no-repeat;
}

.sdf-form-wrap .sdf-input::placeholder {
	color: #75636c;
	opacity: 1;
}

.sdf-form-wrap .sdf-input:hover {
	border-color: #c6aeb9;
}

.sdf-form-wrap .sdf-input:focus,
.sdf-form-wrap .sdf-input:focus-visible {
	border-color: var(--sdf-accent);
	outline: 2px solid transparent;
	box-shadow: 0 0 0 3px var(--sdf-focus-ring);
}

/* Choices --------------------------------------------------------------------- */

.sdf-form-wrap .sdf-choices {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.sdf-form-wrap .sdf-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	min-height: 2.5rem;
	margin: 0;
	padding: 0.4rem 0.25rem;
	color: var(--sdf-ink);
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
	border-radius: 8px;
}

.sdf-form-wrap .sdf-choice:hover {
	background: rgba(168, 20, 90, 0.05);
}

.sdf-form-wrap .sdf-choice input {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--sdf-accent);
	cursor: pointer;
}

.sdf-form-wrap .sdf-choice input:focus-visible {
	outline: 3px solid var(--sdf-focus-ring);
	outline-offset: 2px;
}

.sdf-form-wrap .sdf-choice-text {
	min-width: 0;
	overflow-wrap: anywhere;
}

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

.sdf-form-wrap .sdf-error {
	margin: 0.4rem 0 0;
	color: var(--sdf-error);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.45;
}

.sdf-form-wrap .sdf-error[hidden] {
	display: none;
}

.sdf-form-wrap .sdf-field.is-invalid .sdf-input {
	border-color: var(--sdf-error);
}

.sdf-form-wrap .sdf-field.is-invalid .sdf-input:focus {
	box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.2);
}

/* Static content ------------------------------------------------------------ */

.sdf-form-wrap .sdf-heading {
	margin: 0.5rem 0 0.25rem;
	color: var(--sdf-accent-strong);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
}

.sdf-form-wrap .sdf-content {
	color: var(--sdf-ink);
}

.sdf-form-wrap .sdf-content > :first-child {
	margin-top: 0;
}

.sdf-form-wrap .sdf-content > :last-child {
	margin-bottom: 0;
}

.sdf-form-wrap .sdf-notice-box .sdf-content {
	padding: 0.85rem 1.1rem;
	color: var(--sdf-notice-ink);
	font-weight: 600;
	text-align: center;
	background: var(--sdf-notice-bg);
	border: 1px solid #efd9cc;
	border-radius: var(--sdf-radius);
}

.sdf-form-wrap .sdf-content a {
	color: var(--sdf-accent-strong);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sdf-form-wrap .sdf-content a:hover,
.sdf-form-wrap .sdf-content a:focus-visible {
	color: var(--sdf-accent);
}

/* Messages ------------------------------------------------------------------- */

.sdf-form-wrap .sdf-messages {
	margin: 0;
}

.sdf-form-wrap .sdf-messages:empty {
	display: none;
}

.sdf-form-wrap .sdf-messages:focus {
	outline: none;
}

.sdf-form-wrap .sdf-message {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid transparent;
	border-radius: var(--sdf-radius);
	font-weight: 500;
	line-height: 1.55;
}

.sdf-form-wrap .sdf-message--success {
	color: var(--sdf-success);
	background: var(--sdf-success-bg);
	border-color: var(--sdf-success-line);
}

.sdf-form-wrap .sdf-message--error {
	color: var(--sdf-error);
	background: var(--sdf-error-bg);
	border-color: #f0b9b5;
}

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

.sdf-form-wrap .sdf-actions {
	display: flex;
	justify-content: center;
	margin-top: 1.75rem;
}

.sdf-form-wrap .sdf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	min-height: 3.25rem;
	max-width: 100%;
	margin: 0;
	padding: 0.75rem 2.75rem;
	color: #ffffff;
	font: inherit;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	background: linear-gradient(100deg, var(--sdf-accent-strong), var(--sdf-accent) 55%, var(--sdf-accent-soft));
	border: 1px solid transparent;
	border-radius: 999px;
	box-shadow: 0 10px 22px -12px rgba(127, 15, 68, 0.75);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sdf-form-wrap .sdf-submit:hover {
	color: #ffffff;
	filter: brightness(1.08);
	box-shadow: 0 14px 26px -12px rgba(127, 15, 68, 0.85);
	transform: translateY(-1px);
}

.sdf-form-wrap .sdf-submit:focus-visible {
	color: #ffffff;
	outline: 3px solid var(--sdf-focus-ring);
	outline-offset: 3px;
}

.sdf-form-wrap .sdf-submit:disabled,
.sdf-form-wrap .sdf-submit[aria-disabled="true"] {
	cursor: progress;
	filter: none;
	opacity: 0.8;
	transform: none;
}

.sdf-form-wrap .sdf-spinner {
	display: none;
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: sdf-spin 0.7s linear infinite;
}

.sdf-form-wrap .is-loading .sdf-spinner,
.sdf-form-wrap .sdf-form.is-loading .sdf-spinner {
	display: inline-block;
}

@keyframes sdf-spin {
	to {
		transform: rotate(360deg);
	}
}

.sdf-form-wrap .sdf-footer-note {
	margin: 1.1rem 0 0;
	color: var(--sdf-muted);
	font-size: 0.85rem;
	text-align: center;
}

/* Notice (form missing / closed / editor hint) -------------------------------- */

.sdf-form-wrap .sdf-notice {
	margin: 0;
	padding: 1rem 1.25rem;
	color: var(--sdf-notice-ink);
	background: var(--sdf-notice-bg);
	border: 1px solid #efd9cc;
	border-radius: var(--sdf-radius);
}

/* "Fill a new form" prompt shown under the success message. */

.sdf-form-wrap .sdf-new-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	margin: 1.5rem 0 0.25rem;
	text-align: center;
}

.sdf-form-wrap .sdf-new-form-text {
	margin: 0;
	color: var(--sdf-muted);
	font-size: 1rem;
}

.sdf-form-wrap .sdf-new-form-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	max-width: 100%;
	margin: 0;
	padding: 0.65rem 2.25rem;
	color: var(--sdf-accent-strong);
	font: inherit;
	font-weight: 700;
	line-height: 1.3;
	background: transparent;
	border: 2px solid var(--sdf-accent);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.sdf-form-wrap .sdf-new-form-btn:hover {
	color: #ffffff;
	background: var(--sdf-accent);
}

.sdf-form-wrap .sdf-new-form-btn:focus-visible {
	outline: 3px solid var(--sdf-focus-ring);
	outline-offset: 3px;
}

/* After a successful submission the fields are hidden, only the message stays. */

.sdf-form-wrap .sdf-form.is-complete .sdf-fields,
.sdf-form-wrap .sdf-form.is-complete .sdf-actions {
	display: none;
}

/* Responsive ---------------------------------------------------------------- */

/* Default: everything is full width on mobile. */
@media (max-width: 767px) {
	.sdf-form-wrap .sdf-fields > .sdf-field {
		grid-column: span 12;
	}

	.sdf-form-wrap .sdf-form-card {
		border-radius: 16px;
	}

	.sdf-form-wrap .sdf-submit {
		width: 100%;
		padding-right: 1.5rem;
		padding-left: 1.5rem;
	}
}

/* Elementor option: also stack on tablet. */
@media (max-width: 1024px) {
	.sdf-stack-tablet .sdf-form-wrap .sdf-fields > .sdf-field {
		grid-column: span 12;
	}
}

/* Elementor option: never stack. */
@media (max-width: 767px) {
	.sdf-stack-none .sdf-form-wrap .sdf-fields > .sdf-w-75 { grid-column: span 9; }
	.sdf-stack-none .sdf-form-wrap .sdf-fields > .sdf-w-66 { grid-column: span 8; }
	.sdf-stack-none .sdf-form-wrap .sdf-fields > .sdf-w-50 { grid-column: span 6; }
	.sdf-stack-none .sdf-form-wrap .sdf-fields > .sdf-w-33 { grid-column: span 4; }
	.sdf-stack-none .sdf-form-wrap .sdf-fields > .sdf-w-25 { grid-column: span 3; }
}

@media (prefers-reduced-motion: reduce) {
	.sdf-form-wrap .sdf-input,
	.sdf-form-wrap .sdf-submit {
		transition: none;
	}

	.sdf-form-wrap .sdf-spinner {
		animation-duration: 2s;
	}

	.sdf-form-wrap .sdf-submit:hover {
		transform: none;
	}
}

@media (forced-colors: active) {
	.sdf-form-wrap .sdf-input:focus,
	.sdf-form-wrap .sdf-input:focus-visible,
	.sdf-form-wrap .sdf-submit:focus-visible {
		outline: 2px solid Highlight;
	}

	.sdf-form-wrap .sdf-submit {
		border-color: ButtonText;
	}
}
