/**
 * AG Online Doctor Appointment — front end form.
 *
 * Design notes
 * ------------
 * The default look is minimal: a clean white card with a faint blue cast, a
 * hairline border, soft rounded corners and a solid, trustworthy blue for the
 * primary action. The popup keeps only one effect — a light blur on the
 * backdrop behind it. The frosted-glass treatment and the colour aura are still
 * wired to CSS variables but start at zero, so they are available from Elementor
 * without being the default.
 *
 * Every dimension, colour and radius a site owner can change is a CSS custom
 * property. The Elementor widget writes those properties per device through the
 * official responsive controls, so this file needs no media query of its own for
 * styling — the two at the bottom only keep the raw, unstyled form usable when
 * Elementor is not involved.
 *
 * Written with logical properties throughout, so one stylesheet is correct in
 * both LTR and RTL.
 *
 * @package AG\DoctorAppointment
 */

.agdap-form-wrap {
	/* Layout */
	--agdap-row-gap: 20px;
	--agdap-col-gap: 18px;

	/* Surface — a clean card with a faint blue cast, not a heavy glass panel.
	   The blur and the colour aura are still wired up but start at zero, so a
	   site owner can dial them in from Elementor without them being the
	   default look. */
	--agdap-surface-1: #ffffff;
	--agdap-surface-2: #f7fafe;
	--agdap-glass-blur: 0px;
	--agdap-glass-border: #e4ecf7;
	--agdap-glass-radius: 20px;
	--agdap-glass-padding: 30px;
	--agdap-glass-shadow: 0 1px 2px rgba(16, 42, 74, 0.04), 0 14px 30px -22px rgba(16, 42, 74, 0.3);
	--agdap-aura-1: rgba(96, 165, 250, 0.35);
	--agdap-aura-2: rgba(37, 99, 235, 0.25);
	--agdap-aura-opacity: 0;

	/* Typography colours */
	--agdap-label-color: #0f2744;
	--agdap-label-gap: 8px;
	--agdap-desc-color: #6b7f96;
	--agdap-muted-color: #6b7f96;
	--agdap-required-color: #e11d48;

	/* Fields */
	--agdap-input-height: 52px;
	--agdap-input-padding: 0 16px;
	--agdap-input-radius: 12px;
	--agdap-input-bg: #ffffff;
	--agdap-input-bg-hover: #fbfdff;
	--agdap-input-bg-focus: #ffffff;
	--agdap-input-color: #0f2744;
	--agdap-input-border-color: #dce6f2;
	--agdap-input-border-color-hover: #bed3ec;
	--agdap-input-border-width: 1px;
	/* A no-op shadow rather than `none`: this value is composed into the focus
	   ring's shadow list, and `none` inside a list invalidates the whole
	   declaration. */
	--agdap-input-shadow: 0 0 rgba(0, 0, 0, 0);
	--agdap-placeholder-color: #9db0c4;
	--agdap-focus-color: #2563eb;
	--agdap-focus-ring: rgba(37, 99, 235, 0.14);

	--agdap-textarea-height: 128px;
	--agdap-textarea-padding: 14px 16px;

	/* Button — a solid, trustworthy blue. */
	--agdap-btn-bg: #2563eb;
	--agdap-btn-bg-hover: #1d4ed8;
	--agdap-btn-color: #ffffff;
	--agdap-btn-color-hover: #ffffff;
	--agdap-btn-radius: 12px;
	--agdap-btn-height: 54px;
	--agdap-btn-padding: 0 30px;
	--agdap-btn-width: 100%;
	--agdap-btn-gap: 10px;
	--agdap-btn-icon-size: 18px;
	--agdap-btn-justify: center;
	--agdap-btn-shadow: 0 10px 22px -14px rgba(37, 99, 235, 0.9);

	/* Messages */
	--agdap-error-color: #e11d48;
	--agdap-success-color: #2563eb;
	--agdap-success-bg: #f5f9ff;
	--agdap-success-border: #dce6f2;
	--agdap-success-radius: 16px;
	--agdap-tracking-bg: #ffffff;
	--agdap-tracking-border: #dce6f2;
	--agdap-tracking-color: #1d4ed8;
	--agdap-tracking-radius: 12px;

	position: relative;
	box-sizing: border-box;
	max-width: 100%;
	padding: var(--agdap-glass-padding);
	border-radius: var(--agdap-glass-radius);
	border: 1px solid var(--agdap-glass-border);
	background: linear-gradient(180deg, var(--agdap-surface-1) 0%, var(--agdap-surface-2) 100%);
	box-shadow: var(--agdap-glass-shadow);
	-webkit-backdrop-filter: blur(var(--agdap-glass-blur));
	backdrop-filter: blur(var(--agdap-glass-blur));
	isolation: isolate;
	color: var(--agdap-label-color);
}

.agdap-form-wrap *,
.agdap-form-wrap *::before,
.agdap-form-wrap *::after {
	box-sizing: border-box;
}

/* Optional colour aura behind the panel — off by default (opacity 0), kept so
   the Elementor aura controls still have something to drive. */
.agdap-form-wrap::after {
	content: "";
	position: absolute;
	inset: -6%;
	border-radius: inherit;
	background:
		radial-gradient(32% 38% at 12% 8%, var(--agdap-aura-1) 0%, transparent 72%),
		radial-gradient(34% 40% at 90% 92%, var(--agdap-aura-2) 0%, transparent 74%);
	filter: blur(36px);
	opacity: var(--agdap-aura-opacity);
	pointer-events: none;
	z-index: -2;
	animation: agdap-aura 18s ease-in-out infinite alternate;
}

@keyframes agdap-aura {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}

	50% {
		transform: translate3d(2%, -3%, 0) scale(1.06);
	}

	100% {
		transform: translate3d(-2%, 3%, 0) scale(1.02);
	}
}

/* ------------------------------------------------------------------
 * Fields
 * ---------------------------------------------------------------- */

.agdap-fields {
	display: grid;
	grid-template-columns: repeat(var(--agdap-columns, 1), minmax(0, 1fr));
	row-gap: var(--agdap-row-gap);
	column-gap: var(--agdap-col-gap);
}

.agdap-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	animation: agdap-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Staggered entrance. */
.agdap-field:nth-child(1) { animation-delay: 0.04s; }
.agdap-field:nth-child(2) { animation-delay: 0.09s; }
.agdap-field:nth-child(3) { animation-delay: 0.14s; }
.agdap-field:nth-child(4) { animation-delay: 0.19s; }
.agdap-field:nth-child(5) { animation-delay: 0.24s; }
.agdap-field:nth-child(6) { animation-delay: 0.29s; }
.agdap-field:nth-child(7) { animation-delay: 0.34s; }
.agdap-field:nth-child(n + 8) { animation-delay: 0.38s; }

@keyframes agdap-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Long form inputs always take the full row. */
.agdap-field--type-textarea {
	grid-column: 1 / -1;
}

.agdap-label {
	display: block;
	margin: 0 0 var(--agdap-label-gap);
	color: var(--agdap-label-color);
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: -0.01em;
}

.agdap-required {
	color: var(--agdap-required-color);
	margin-inline-start: 3px;
}

.agdap-input {
	width: 100%;
	max-width: 100%;
	height: var(--agdap-input-height);
	padding: var(--agdap-input-padding);
	background: var(--agdap-input-bg);
	color: var(--agdap-input-color);
	border: var(--agdap-input-border-width) solid var(--agdap-input-border-color);
	border-radius: var(--agdap-input-radius);
	box-shadow: var(--agdap-input-shadow);
	font: inherit;
	line-height: 1.6;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

textarea.agdap-input {
	height: var(--agdap-textarea-height);
	min-height: 90px;
	padding: var(--agdap-textarea-padding);
	resize: vertical;
}

/* Native select needs its own arrow once appearance is stripped. */
select.agdap-input {
	cursor: pointer;
	padding-inline-end: 42px;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: left 18px top 55%, left 13px top 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

[dir="rtl"] select.agdap-input,
.agdap-form-wrap[dir="rtl"] select.agdap-input {
	background-position: left 18px top 55%, left 13px top 55%;
}

.agdap-input::placeholder {
	color: var(--agdap-placeholder-color);
	opacity: 1;
}

.agdap-input:hover:not(:focus) {
	background: var(--agdap-input-bg-hover);
	border-color: var(--agdap-input-border-color-hover);
}

.agdap-input:focus,
.agdap-input:focus-visible {
	outline: none;
	background: var(--agdap-input-bg-focus);
	border-color: var(--agdap-focus-color);
	box-shadow: 0 0 0 4px var(--agdap-focus-ring), var(--agdap-input-shadow);
}

.agdap-field.is-invalid .agdap-input {
	border-color: var(--agdap-error-color);
	box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
	animation: agdap-shake 0.34s ease;
}

@keyframes agdap-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	60% { transform: translateX(3px); }
}

.agdap-description {
	margin: 7px 0 0;
	color: var(--agdap-desc-color);
	font-size: 0.85em;
	line-height: 1.8;
}

.agdap-error {
	margin: 0;
	max-height: 0;
	overflow: hidden;
	color: var(--agdap-error-color);
	font-size: 0.85em;
	line-height: 1.8;
	opacity: 0;
	transition: max-height 0.22s ease, margin 0.22s ease, opacity 0.22s ease;
}

.agdap-field.is-invalid .agdap-error {
	margin-top: 6px;
	max-height: 6em;
	opacity: 1;
}

/* Honeypot: out of sight and out of the accessibility tree, still in the DOM
   for bots to fill in. */
.agdap-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

/* ------------------------------------------------------------------
 * Submit button
 * ---------------------------------------------------------------- */

.agdap-actions {
	display: flex;
	justify-content: var(--agdap-btn-justify);
	margin-top: calc(var(--agdap-row-gap) + 4px);
}

.agdap-submit {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--agdap-btn-gap);
	width: var(--agdap-btn-width);
	max-width: 100%;
	min-height: var(--agdap-btn-height);
	padding: var(--agdap-btn-padding);
	background: var(--agdap-btn-bg);
	color: var(--agdap-btn-color);
	border: none;
	border-radius: var(--agdap-btn-radius);
	box-shadow: var(--agdap-btn-shadow);
	font: inherit;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background 0.25s ease, color 0.2s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, opacity 0.2s ease;
	text-align: center;
}

/* Light sweep across the button on hover. */
.agdap-submit::after {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: -60%;
	width: 45%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
	transform: skewX(-18deg);
	transition: inset-inline-start 0.55s ease;
	pointer-events: none;
}

.agdap-submit:hover::after,
.agdap-submit:focus-visible::after {
	inset-inline-start: 120%;
}

.agdap-submit:hover,
.agdap-submit:focus-visible {
	background: var(--agdap-btn-bg-hover);
	color: var(--agdap-btn-color-hover);
	transform: translateY(-2px);
	box-shadow: 0 16px 28px -16px rgba(37, 99, 235, 0.95);
}

.agdap-submit:focus-visible {
	outline: 2px solid var(--agdap-focus-color);
	outline-offset: 3px;
}

.agdap-submit:active {
	transform: translateY(0) scale(0.99);
}

.agdap-submit[disabled] {
	opacity: 0.72;
	cursor: not-allowed;
	transform: none;
}

.agdap-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--agdap-btn-icon-size);
	line-height: 1;
}

.agdap-btn-icon svg {
	width: var(--agdap-btn-icon-size);
	height: var(--agdap-btn-icon-size);
	fill: currentColor;
}

.agdap-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: agdap-spin 0.7s linear infinite;
}

.agdap-form.is-loading .agdap-spinner {
	display: inline-block;
}

@keyframes agdap-spin {
	to {
		transform: rotate(360deg);
	}
}

.agdap-form-message {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(225, 29, 72, 0.08);
	color: var(--agdap-error-color);
	font-size: 0.9em;
	line-height: 1.9;
	animation: agdap-rise 0.35s ease both;
}

.agdap-form-message:empty {
	display: none;
}

/* ------------------------------------------------------------------
 * Success panel
 * ---------------------------------------------------------------- */

.agdap-success {
	text-align: center;
	padding: 34px 22px;
	border: 1px solid var(--agdap-success-border);
	border-radius: var(--agdap-success-radius);
	background: var(--agdap-success-bg);
	animation: agdap-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes agdap-pop {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(10px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.agdap-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--agdap-btn-bg);
	color: #ffffff;
	box-shadow: 0 12px 24px -14px rgba(37, 99, 235, 0.85);
	animation: agdap-badge-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes agdap-badge-in {
	from {
		opacity: 0;
		transform: scale(0.5) rotate(-12deg);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.agdap-success__icon svg path {
	stroke-dasharray: 30;
	stroke-dashoffset: 30;
	animation: agdap-draw 0.5s ease 0.35s forwards;
}

@keyframes agdap-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.agdap-success__title {
	margin: 0 0 8px;
	color: var(--agdap-label-color);
	font-size: 1.2em;
	letter-spacing: -0.01em;
}

.agdap-success__text {
	margin: 0 0 20px;
	color: var(--agdap-muted-color);
	line-height: 2;
}

.agdap-tracking {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding: 13px 18px;
	background: var(--agdap-tracking-bg);
	border: 1px solid var(--agdap-tracking-border);
	border-radius: var(--agdap-tracking-radius);
	max-width: 100%;
	box-shadow: none;
}

.agdap-tracking__label {
	color: var(--agdap-muted-color);
	font-size: 0.85em;
}

.agdap-tracking__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--agdap-tracking-color);
	word-break: break-all;
}

.agdap-copy {
	padding: 7px 13px;
	border: 1px solid var(--agdap-input-border-color);
	border-radius: 9px;
	background: transparent;
	color: var(--agdap-muted-color);
	font: inherit;
	font-size: 0.82em;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.agdap-copy:hover,
.agdap-copy:focus-visible {
	border-color: var(--agdap-success-color);
	color: var(--agdap-success-color);
	background: rgba(37, 99, 235, 0.06);
}

.agdap-success__deadline {
	margin: 18px 0 0;
	color: var(--agdap-muted-color);
	font-size: 0.85em;
}

.agdap-success__deadline:empty {
	display: none;
}

/* ------------------------------------------------------------------
 * Popup
 * ---------------------------------------------------------------- */

.agdap-modal {
	--agdap-modal-overlay: rgba(15, 32, 60, 0.42);
	--agdap-modal-blur: 6px;
	--agdap-modal-width: 600px;
	--agdap-modal-radius: 20px;
	--agdap-modal-bg: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
	--agdap-modal-title-color: #0f2744;

	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.agdap-modal[hidden] {
	display: none;
}

.agdap-modal__backdrop {
	position: absolute;
	inset: 0;
	background: var(--agdap-modal-overlay);
	-webkit-backdrop-filter: blur(var(--agdap-modal-blur));
	backdrop-filter: blur(var(--agdap-modal-blur));
	opacity: 0;
	transition: opacity 0.24s ease;
}

.agdap-modal.is-open .agdap-modal__backdrop {
	opacity: 1;
}

.agdap-modal__dialog {
	--agdap-drag-y: 0px;

	position: relative;
	width: var(--agdap-modal-width);
	max-width: 100%;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 28px;
	border-radius: var(--agdap-modal-radius);
	border: 1px solid #e4ecf7;
	background: var(--agdap-modal-bg);
	box-shadow: 0 30px 60px -28px rgba(15, 32, 60, 0.45);
	opacity: 0;
	transform: translateY(18px) scale(0.97);
	transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.agdap-modal.is-open .agdap-modal__dialog {
	opacity: 1;
	transform: none;
}

.agdap-modal__dialog:focus {
	outline: none;
}

/* Drag handle — the iOS-style pull bar. Hidden on the centred desktop dialog;
   shown, made sticky and made draggable only in the bottom-sheet layout
   below. Kept out of the tab order: it is a pointer-drag affordance only, and
   the dialog is still fully closable via the × button and Escape. */
.agdap-modal__handle {
	display: none;
}

.agdap-modal__close {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(15, 42, 60, 0.1);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.75);
	color: #334155;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	z-index: 2;
}

.agdap-modal__close:hover,
.agdap-modal__close:focus-visible {
	background: #ffffff;
	color: #0f172a;
	transform: rotate(90deg);
}

.agdap-modal__head {
	margin-bottom: 22px;
	padding-inline-end: 46px;
}

.agdap-modal__title {
	margin: 0;
	font-size: 1.35em;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--agdap-modal-title-color);
}

.agdap-modal__subtitle {
	margin: 8px 0 0;
	color: #64748b;
	line-height: 1.9;
	font-size: 0.92em;
}

/* Inside the popup the form drops its own glass: the dialog already is one. */
.agdap-modal .agdap-form-wrap {
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.agdap-modal .agdap-form-wrap::before,
.agdap-modal .agdap-form-wrap::after {
	display: none;
}

/* Trigger rendered by the shortcode in popup mode. */
.agdap-popup-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 0 26px;
	border-radius: 12px;
	background: #2563eb;
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 10px 22px -14px rgba(37, 99, 235, 0.9);
	transition: transform 0.18s ease, box-shadow 0.24s ease;
}

.agdap-popup-trigger:hover,
.agdap-popup-trigger:focus-visible {
	background: #1d4ed8;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 16px 28px -16px rgba(37, 99, 235, 0.95);
}

html.agdap-modal-open,
html.agdap-modal-open body {
	overflow: hidden;
}

/* ------------------------------------------------------------------
 * Dark surroundings
 *
 * Opt-in, never automatic. The form sits inside a theme's page, and the
 * operating system's colour scheme says nothing about whether that page is
 * dark — keying off it turns the form dark on a white page. The site owner
 * chooses: "روشن" (default), "تیره", or "خودکار", which is the only mode that
 * follows prefers-color-scheme.
 * ---------------------------------------------------------------- */

.agdap-form-wrap.agdap-scheme-dark {
	--agdap-surface-1: rgba(19, 32, 45, 0.78);
	--agdap-surface-2: rgba(13, 24, 35, 0.62);
	--agdap-glass-border: rgba(148, 197, 214, 0.22);
	--agdap-label-color: #e6f1f5;
	--agdap-desc-color: #94a8b8;
	--agdap-muted-color: #94a8b8;
	--agdap-input-bg: rgba(255, 255, 255, 0.06);
	--agdap-input-bg-hover: rgba(255, 255, 255, 0.1);
	--agdap-input-bg-focus: rgba(255, 255, 255, 0.12);
	--agdap-input-color: #eaf3f7;
	--agdap-input-border-color: rgba(148, 197, 214, 0.22);
	--agdap-input-border-color-hover: rgba(148, 197, 214, 0.36);
	--agdap-placeholder-color: #7d92a3;
	--agdap-input-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
	--agdap-success-bg: rgba(37, 99, 235, 0.12);
	--agdap-tracking-bg: rgba(255, 255, 255, 0.08);
	--agdap-tracking-color: #93b8ff;
	--agdap-glass-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.7);
}

.agdap-modal.agdap-scheme-dark {
	--agdap-modal-bg: linear-gradient(160deg, rgba(19, 32, 45, 0.9) 0%, rgba(11, 20, 30, 0.86) 100%);
	--agdap-modal-title-color: #e6f1f5;
	--agdap-modal-overlay: rgba(3, 10, 16, 0.68);
}

.agdap-modal.agdap-scheme-dark .agdap-modal__dialog {
	border-color: rgba(148, 197, 214, 0.2);
}

.agdap-modal.agdap-scheme-dark .agdap-modal__close {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(148, 197, 214, 0.22);
	color: #e6f1f5;
}

.agdap-modal.agdap-scheme-dark .agdap-modal__subtitle {
	color: #94a8b8;
}

@media (prefers-color-scheme: dark) {
	.agdap-form-wrap.agdap-scheme-auto {
		--agdap-surface-1: rgba(19, 32, 45, 0.78);
		--agdap-surface-2: rgba(13, 24, 35, 0.62);
		--agdap-glass-border: rgba(148, 197, 214, 0.22);
		--agdap-label-color: #e6f1f5;
		--agdap-desc-color: #94a8b8;
		--agdap-muted-color: #94a8b8;
		--agdap-input-bg: rgba(255, 255, 255, 0.06);
		--agdap-input-bg-hover: rgba(255, 255, 255, 0.1);
		--agdap-input-bg-focus: rgba(255, 255, 255, 0.12);
		--agdap-input-color: #eaf3f7;
		--agdap-input-border-color: rgba(148, 197, 214, 0.22);
		--agdap-input-border-color-hover: rgba(148, 197, 214, 0.36);
		--agdap-placeholder-color: #7d92a3;
		--agdap-input-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
		--agdap-success-bg: rgba(37, 99, 235, 0.12);
		--agdap-tracking-bg: rgba(255, 255, 255, 0.08);
		--agdap-tracking-color: #93b8ff;
		--agdap-glass-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.7);
	}

	.agdap-modal.agdap-scheme-auto {
		--agdap-modal-bg: linear-gradient(160deg, rgba(19, 32, 45, 0.9) 0%, rgba(11, 20, 30, 0.86) 100%);
		--agdap-modal-title-color: #e6f1f5;
		--agdap-modal-overlay: rgba(3, 10, 16, 0.68);
	}

	.agdap-modal.agdap-scheme-auto .agdap-modal__dialog {
		border-color: rgba(148, 197, 214, 0.2);
	}

	.agdap-modal.agdap-scheme-auto .agdap-modal__close {
		background: rgba(255, 255, 255, 0.1);
		border-color: rgba(148, 197, 214, 0.22);
		color: #e6f1f5;
	}

	.agdap-modal.agdap-scheme-auto .agdap-modal__subtitle {
		color: #94a8b8;
	}

	.agdap-modal.agdap-scheme-auto .agdap-modal__handle::before {
		background: rgba(255, 255, 255, 0.28);
	}
}

/* ------------------------------------------------------------------
 * Motion and baseline responsiveness
 * ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.agdap-form-wrap::after,
	.agdap-field,
	.agdap-success,
	.agdap-success__icon,
	.agdap-form-message {
		animation: none !important;
	}

	.agdap-success__icon svg path {
		stroke-dashoffset: 0;
		animation: none;
	}

	.agdap-input,
	.agdap-submit,
	.agdap-error,
	.agdap-modal__dialog,
	.agdap-modal__backdrop,
	.agdap-modal__close {
		transition: none;
	}

	.agdap-spinner {
		animation-duration: 2s;
	}

	.agdap-field.is-invalid .agdap-input {
		animation: none;
	}
}

/* Only for the form as it ships: Elementor's own responsive controls override
   these custom properties per device with higher specificity. */
@media (max-width: 767px) {
	.agdap-form-wrap {
		--agdap-columns: 1;
		--agdap-glass-padding: 22px;
		--agdap-glass-radius: 20px;
		--agdap-input-height: 50px;
	}

	.agdap-modal {
		padding: 0;
		align-items: flex-end;
	}

	/* On phones the dialog becomes a bottom sheet. A gentle overshoot on the
	   way in and out — as close to iOS's sheet spring as a CSS transition gets
	   — replaces the calmer desktop easing; the closing edge overshoots too,
	   which reads as a soft "settle" rather than a mechanical stop. */
	.agdap-modal__dialog {
		width: 100%;
		max-height: 92vh;
		padding: 0 18px 28px;
		border-radius: 24px 24px 0 0;
		transform: translateY(28px);
		transition: opacity 0.28s ease, transform 0.46s cubic-bezier(0.34, 1.56, 0.64, 1);
	}

	.agdap-modal.is-open .agdap-modal__dialog {
		transform: none;
	}

	/* While a pointer drag is live, the sheet must track the finger with zero
	   transition lag; admin — rather, form.js — toggles this class and writes
	   --agdap-drag-y directly on every pointermove. */
	.agdap-modal__dialog.is-dragging {
		transition: none;
		transform: translateY(var(--agdap-drag-y));
	}

	.agdap-modal__head {
		padding-top: 10px;
	}

	/* Sticky so the pull handle stays reachable even once the form below has
	   scrolled — the handle, not the whole header, is the drag target, so it
	   never fights the form's own scroll or its inputs' focus/selection. */
	.agdap-modal__handle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: sticky;
		inset-block-start: 0;
		z-index: 3;
		height: 26px;
		margin: 0 -18px;
		background: var(--agdap-modal-bg);
		border-radius: 24px 24px 0 0;
		touch-action: none;
		cursor: grab;
	}

	.agdap-modal__handle::before {
		content: "";
		width: 36px;
		height: 4px;
		border-radius: 999px;
		background: rgba(15, 42, 74, 0.18);
	}

	.agdap-modal__handle:active {
		cursor: grabbing;
	}

	.agdap-modal.agdap-scheme-dark .agdap-modal__handle::before {
		background: rgba(255, 255, 255, 0.28);
	}
}

/* Reduced motion wins regardless of source order: this pair of selectors
   matches the mobile dialog rule's own specificity, so without this the
   spring transition above would re-enable itself under a strict cascade
   reading on some engines. */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.agdap-modal__dialog {
		transition: none;
	}
}

@media (max-width: 480px) {
	.agdap-form-wrap {
		--agdap-btn-width: 100%;
		--agdap-glass-padding: 18px;
	}

	.agdap-tracking {
		width: 100%;
		justify-content: center;
	}

	.agdap-modal__title {
		font-size: 1.18em;
	}
}
