/* ==========================================================================
   ACPHARM Contact Form
   Scoped to .acpc so theme / page-builder styles don't leak in or out.
   Sibling of the Script Order Form's .acprx stylesheet — same tokens,
   same components, minus the multi-step wizard machinery this form doesn't need.
   Override any token below from your theme's custom CSS.
   ========================================================================== */

.acpc {
	/* ACPHARM brand palette (Branding Guideline V.01) */
	--acpc-green: #00af3f;        /* PMS 354 — primary */
	--acpc-lime: #8fd400;         /* PMS 375 — primary */
	--acpc-brand: #00832f;        /* darkened green: meets contrast for text and buttons */
	--acpc-brand-deep: #046a2e;
	--acpc-brand-tint: #e8f7ec;
	--acpc-navy: #39275b;         /* PMS 273 — secondary */
	--acpc-violet: #7474c1;       /* PMS 272 — secondary */
	--acpc-violet-tint: #f1f0f9;
	--acpc-charcoal: #4c4c4e;     /* DS 325-2 C — secondary */

	--acpc-ink: #26222e;
	--acpc-muted: var(--acpc-charcoal);
	--acpc-line: #cfd3d8;
	--acpc-line-soft: #e6e9ec;
	--acpc-bg: #f4f7f4;
	--acpc-surface: #ffffff;
	--acpc-error: #b42318;
	--acpc-error-bg: #fdf0ee;
	--acpc-ok: var(--acpc-brand);

	--acpc-font: "Avenir Next", Avenir, "Nunito Sans", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
	--acpc-radius: 14px;
	--acpc-ease: cubic-bezier(.22, .68, .32, 1);

	font-family: var(--acpc-font);
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--acpc-ink);
	max-width: 34rem;
	margin: 0 auto;
	-webkit-text-size-adjust: 100%;
}

.acpc *,
.acpc *::before,
.acpc *::after { box-sizing: border-box; }

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

.acpc p { margin: 0 0 .75em; }
.acpc a { color: var(--acpc-brand); text-decoration: underline; text-underline-offset: 2px; }

.acpc :focus-visible { outline: 3px solid var(--acpc-brand); outline-offset: 2px; }

.acpc-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

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

.acpc-head { padding: .5rem 0 .625rem; border-bottom: 1px solid var(--acpc-line-soft); }
.acpc-brandbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem .5rem; }

/* Both higher specificity AND !important: Elementor ships `.elementor img {
   height:auto; max-width:100%; }`, which is more specific than a plain
   `.acpc-logo` class rule (class+type beats class alone) and so overrides it
   even without !important on either side. Repeating the class and qualifying
   with img.acpc-logo pushes our specificity above ".elementor img", and
   !important is the belt-and-braces on top of that. */
.acpc-brandbar img.acpc-logo,
.acpc .acpc-logo.acpc-logo {
	display: block !important;
	height: 38px !important;
	width: auto !important;
	max-width: 160px !important;
	max-height: 38px !important;
	flex: none !important;
	mix-blend-mode: multiply;
}
.acpc-brandbar__tag { margin: 0; text-align: right; font-size: .8125rem; line-height: 1.15; color: var(--acpc-navy); letter-spacing: .01em; }
.acpc-brandbar__tag em { font-style: normal; font-weight: 700; display: block; line-height: 1.1; }

/* ---------- Layout ---------- */

.acpc-form { padding: 0 1rem; }
.acpc-step { padding: 1.5rem 0 1rem; }

.acpc-title {
	font-family: var(--acpc-font);
	font-size: 1.625rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--acpc-navy);
	margin: 0 0 .5rem;
}
.acpc-title:focus { outline: none; }

.acpc-lede { color: var(--acpc-muted); margin-bottom: 1.25rem; }

.acpc-group { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.acpc-group legend { font-size: 1.125rem; font-weight: 700; line-height: 1.3; padding: 0; margin-bottom: .75rem; color: var(--acpc-navy); }

.acpc-row { display: grid; gap: 0 .75rem; }
@media (min-width: 30em) { .acpc-row { grid-template-columns: 1fr 1fr; } }

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

.acpc-field { margin-bottom: 1rem; }

.acpc-field label,
.acpc-upload__label { display: block; font-weight: 700; font-size: 1rem; margin-bottom: .375rem; }

.acpc-opt { font-weight: 400; color: var(--acpc-muted); font-size: .9375rem; }

.acpc input[type="text"],
.acpc input[type="email"],
.acpc input[type="tel"],
.acpc input[type="url"],
.acpc select,
.acpc textarea {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: .75rem .875rem;
	font: inherit;
	font-size: 1.0625rem;
	color: var(--acpc-ink);
	background: var(--acpc-surface);
	border: 1.5px solid var(--acpc-line);
	border-radius: 8px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.acpc textarea { min-height: 96px; resize: vertical; }

.acpc input:focus,
.acpc select:focus,
.acpc textarea:focus {
	border-color: var(--acpc-brand);
	outline: 3px solid rgba(0, 175, 63, .22);
	outline-offset: 0;
}

.acpc ::placeholder { color: #87938f; opacity: 1; }

.acpc-hint { font-size: .9375rem; color: var(--acpc-muted); margin: .375rem 0 0; }

/* Errors */
.acpc :is(input, select, textarea).is-invalid,
.acpc :is(input, select, textarea).is-invalid:focus { border-color: var(--acpc-error); }

.acpc-field-error { display: flex; gap: .375rem; color: var(--acpc-error); font-size: .9375rem; font-weight: 700; margin: .375rem 0 0; }
.acpc-field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--acpc-error); color: #fff; font-size: .75rem; margin-top: .1rem; }

.acpc-errors { background: var(--acpc-error-bg); border-left: 4px solid var(--acpc-error); border-radius: 0 8px 8px 0; padding: .75rem 1rem; margin-bottom: 1.25rem; color: var(--acpc-ink); }
.acpc-errors p { margin: 0 0 .25rem; font-weight: 700; }
.acpc-errors ul { margin: 0; padding-left: 1.1rem; }
.acpc-errors a { color: var(--acpc-error); }

/* ---------- Choice tiles ---------- */

.acpc-tiles { display: grid; gap: .625rem; }
@media (min-width: 30em) { .acpc-tiles--pair { grid-template-columns: 1fr 1fr; } }

.acpc-tile {
	position: relative;
	display: flex;
	align-items: center;
	gap: .875rem;
	min-height: 60px;
	padding: .875rem 1rem;
	background: var(--acpc-surface);
	border: 1.5px solid var(--acpc-line);
	border-radius: 10px;
	cursor: pointer;
	margin: 0;
	font-weight: 400;
	-webkit-tap-highlight-color: transparent;
	transition: border-color .15s, background-color .15s;
}

.acpc-tile input {
	flex: none;
	width: 22px; height: 22px;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	border: 2px solid var(--acpc-muted);
	border-radius: 50%;
	background: #fff;
	display: grid;
	place-items: center;
}
.acpc-tile input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acpc-green); transform: scale(0); transition: transform .22s var(--acpc-ease); }
.acpc-tile input:checked { border-color: var(--acpc-green); }
.acpc-tile input:checked::after { transform: scale(1); }
.acpc-tile input:focus-visible { outline: 3px solid var(--acpc-brand); outline-offset: 2px; }

.acpc-tile.is-checked { border-color: var(--acpc-green); background: var(--acpc-brand-tint); box-shadow: inset 0 0 0 1px var(--acpc-green); }
.acpc-tile:active { transform: scale(.99); }
.acpc-tile.is-invalid { border-color: var(--acpc-error); }

.acpc-tile__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acpc-tile__title { font-weight: 700; line-height: 1.3; }
.acpc-tile__sub { font-size: .9375rem; color: var(--acpc-muted); line-height: 1.35; margin-top: .125rem; }

/* Privacy/terms notice — a shortcode's output, rendered just above the consent tick boxes */
.acpc-privacy-notice { font-size: .9375rem; color: var(--acpc-muted); line-height: 1.5; background: var(--acpc-bg); border: 1px solid var(--acpc-line-soft); border-radius: 10px; padding: .875rem 1rem; margin: 0 0 1rem; }
/* The shortcode's own markup (a page-builder paragraph, a theme's default heading size, an
   inline style) routinely carries a bigger font-size than the form. Only the DESCENDANTS get
   the !important inherit — the wrapper itself must NOT be in this rule, or its own !important
   would beat the admin-set inline style="font-size:…" on the wrapper and the setting would
   never have any visible effect (that was the bug: this rule used to also match the wrapper). */
.acpc-privacy-notice :is(p, li, span, div, strong, em, b, i, a, h1, h2, h3, h4, h5, h6) { font-size: inherit !important; }
.acpc-privacy-notice p:first-child { margin-top: 0; }
.acpc-privacy-notice p:last-child { margin-bottom: 0; }
.acpc-privacy-notice a { color: var(--acpc-navy); font-weight: 700; }

/* Checkboxes */
.acpc-check { display: flex; gap: .75rem; align-items: flex-start; margin: 0 0 1rem; cursor: pointer; font-weight: 400; }
.acpc-check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--acpc-brand); }
.acpc-check--required { padding: .875rem 1rem; border: 1.5px solid var(--acpc-line); border-radius: 10px; background: var(--acpc-surface); }
.acpc-check.is-invalid { border-color: var(--acpc-error); }

/* ---------- Buttons ---------- */

.acpc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 52px;
	padding: .75rem 1.25rem;
	font: inherit;
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.2;
	border-radius: 10px;
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s, border-color .15s;
}
.acpc-btn--primary { background: var(--acpc-brand); color: #fff; }
.acpc-btn--primary:hover { background: var(--acpc-brand-deep); }
.acpc-btn--primary::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: 0;
	height: 3px; border-radius: 0 0 10px 10px;
	background: linear-gradient(90deg, var(--acpc-green), var(--acpc-lime));
}
.acpc-btn:active { transform: translateY(1px); }
.acpc-btn[disabled], .acpc-btn[aria-busy="true"] { opacity: .65; cursor: progress; }

.acpc-btn--upload {
	position: relative;
	flex: 1;
	background: var(--acpc-surface);
	color: var(--acpc-brand);
	border: 1.5px dashed var(--acpc-brand);
	margin: 0;
	padding: .75rem .5rem;
	white-space: nowrap;
	font-size: 1rem;
}
.acpc-btn--upload:focus-within { outline: 3px solid var(--acpc-green); outline-offset: 2px; }
.acpc-btn--upload:hover { background: var(--acpc-brand-tint); }

/* Sticky action bar — sits in the thumb zone on phones */
.acpc-bar {
	position: sticky;
	bottom: 0;
	z-index: 4;
	display: flex;
	gap: .625rem;
	margin: 0 -1rem;
	padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
	background: var(--acpc-surface);
	border-top: 1px solid var(--acpc-line-soft);
}
.acpc-bar #acpc-send { flex: 1; }

/* ---------- Uploads ---------- */

.acpc-upload { margin-bottom: 1.25rem; }
.acpc-upload__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.acpc-files { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; }

.acpc-file {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	align-items: center;
	gap: .75rem;
	padding: .5rem;
	border: 1px solid var(--acpc-line-soft);
	border-radius: 10px;
	background: var(--acpc-bg);
	margin: 0;
}
.acpc-file__thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--acpc-line-soft); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--acpc-muted); }
.acpc-file__meta { min-width: 0; }
.acpc-file__name { display: block; font-size: .9375rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acpc-file__status { display: block; font-size: .875rem; color: var(--acpc-muted); }
.acpc-file.is-error .acpc-file__status { color: var(--acpc-error); font-weight: 700; }
.acpc-file.is-done .acpc-file__status { color: var(--acpc-ok); }
.acpc-file__bar { height: 4px; border-radius: 2px; background: var(--acpc-line-soft); margin-top: .375rem; overflow: hidden; }
.acpc-file__bar span { display: block; height: 100%; width: 0; background: var(--acpc-brand); transition: width .15s linear; }
.acpc-file.is-done .acpc-file__bar { display: none; }
.acpc-file__x { width: 44px; height: 44px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--acpc-muted); font-size: 1.5rem; line-height: 1; }
.acpc-file__x:hover { color: var(--acpc-error); background: var(--acpc-error-bg); }
.acpc-file__x:active { transform: scale(.92); }

/* ---------- Notices / banner ---------- */

.acpc-notice { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem; margin-bottom: 1.25rem; background: var(--acpc-violet-tint); border-left: 4px solid var(--acpc-violet); border-radius: 0 10px 10px 0; color: var(--acpc-ink); }
.acpc-notice svg { flex: none; color: var(--acpc-navy); margin-top: .1rem; }
.acpc-notice p { margin: 0; }
.acpc-notice__title { font-weight: 700; color: var(--acpc-navy); margin-bottom: .125rem !important; }

.acpc-banner { margin: 1rem; padding: .875rem 1rem; background: var(--acpc-error-bg); border-left: 4px solid var(--acpc-error); border-radius: 0 8px 8px 0; font-weight: 700; }

.acpc-turnstile { margin: 0 0 1rem; min-height: 0; }

/* Honeypot */
.acpc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

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

.acpc-done { padding: 2.5rem 1rem 2rem; }
.acpc-done:focus { outline: none; }
.acpc-done__mark { color: var(--acpc-green); margin-bottom: .5rem; }
.acpc-done__wave { display: block; width: 190px; max-width: 60%; height: auto; margin: .25rem 0 1.25rem; }
.acpc-ref { font-size: 1.125rem; }
.acpc-ref strong { font-size: 1.375rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* Loading state before the session token arrives */
.acpc[data-state="loading"] #acpc-send { opacity: .65; pointer-events: none; }

/* ---------- Larger screens ---------- */

@media (min-width: 48em) {
	.acpc-form { padding: 0 1.5rem; }
	.acpc-bar { position: static; margin: 0; padding: 1rem 0 0; border-top: 0; }
	.acpc-bar #acpc-send { flex: 0 1 16rem; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.acpc *, .acpc *::before, .acpc *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Contact form additions
   ========================================================================== */

/* Topic tiles: lighter and shorter than the quote form's two big tiles, since there are six. */
.acpc-tiles--compact .acpc-tile { min-height: 52px; padding: .625rem .875rem; }

/* Shortcuts to the Quote and Order Script pages */
.acpc-shortcuts { margin: 0 0 1.5rem; }
.acpc-shortcuts__intro { font-size: .9375rem; font-weight: 700; color: var(--acpc-muted); margin: 0 0 .5rem !important; }
.acpc-shortcuts__row { display: grid; gap: .5rem; }
@media (min-width: 30em) { .acpc-shortcuts__row { grid-template-columns: 1fr 1fr; } }
.acpc a.acpc-shortcut {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 0 .5rem;
	padding: .75rem 1rem;
	border-radius: 10px;
	background: var(--acpc-violet-tint);
	border: 1.5px solid transparent;
	color: var(--acpc-navy);
	text-decoration: none;
	transition: border-color .15s, background-color .15s;
}
.acpc a.acpc-shortcut:hover { border-color: var(--acpc-violet); }
.acpc-shortcut__title { font-weight: 700; line-height: 1.3; }
.acpc-shortcut__sub { grid-column: 1; font-size: .875rem; color: var(--acpc-muted); line-height: 1.35; }
.acpc-shortcut__arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--acpc-violet); }

/* Optional attachment — collapsed by default so the form stays short */
.acpc details.acpc-upload { border: 1.5px dashed var(--acpc-line); border-radius: 10px; padding: .75rem 1rem; }
.acpc details.acpc-upload[open] { border-style: solid; }
.acpc details.acpc-upload > summary { cursor: pointer; margin: 0; list-style: none; display: flex; align-items: center; gap: .5rem; }
.acpc details.acpc-upload > summary::-webkit-details-marker { display: none; }
.acpc details.acpc-upload > summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--acpc-brand-tint); color: var(--acpc-brand); font-weight: 700; flex: none; }
.acpc details.acpc-upload[open] > summary::before { content: "–"; }
.acpc details.acpc-upload[open] > summary { margin-bottom: .5rem; }
.acpc details.acpc-upload .acpc-upload__actions { margin-top: .75rem; }

/* ---------- [acpharm_contact_details] ---------- */

.acpc.acpc-dt { max-width: 26rem; margin: 0; }
.acpc-dt__note { color: var(--acpc-muted); margin-bottom: 1rem !important; }
.acpc-dt__row {
	display: flex;
	gap: .875rem;
	align-items: flex-start;
	padding: .75rem 0;
	border-bottom: 1px solid var(--acpc-line-soft);
	line-height: 1.45;
	color: var(--acpc-ink);
}
.acpc a.acpc-dt__row--link { text-decoration: none; color: var(--acpc-ink); }
.acpc a.acpc-dt__row--link:hover strong,
.acpc a.acpc-dt__row--link:hover span span:last-child { color: var(--acpc-brand); }
.acpc-dt__row > span { display: flex; flex-direction: column; }
.acpc-dt__row strong { font-size: 1.25rem; color: var(--acpc-navy); }
.acpc-dt__icon { flex: none; color: var(--acpc-green); margin-top: .125rem; }
.acpc-dt__label { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--acpc-violet); }
.acpc a.acpc-dt__map { display: inline-flex; margin: 1rem 0 0; min-height: 44px; padding: .5rem 1.125rem; background: var(--acpc-navy); color: #fff; text-decoration: none; border-radius: 999px; font-weight: 700; font-size: .9375rem; width: auto; }
.acpc a.acpc-dt__map:hover { background: #2a1c45; }
.acpc-dt__hours { margin-top: 1.5rem; }
.acpc-dt .acpc-dt__h { font-family: var(--acpc-font); font-size: 1.125rem; font-weight: 700; color: var(--acpc-navy); margin: 0 0 .5rem; padding: 0; }
.acpc-dt__hours table { width: 100%; border-collapse: collapse; border: 0; margin: 0; font-size: 1rem; }
.acpc-dt__hours th,
.acpc-dt__hours td { padding: .375rem .5rem; border: 0; border-bottom: 1px solid var(--acpc-line-soft); text-align: left; font-weight: 400; background: none; }
.acpc-dt__hours td { text-align: right; white-space: nowrap; color: var(--acpc-muted); }
.acpc-dt__hours tr.is-today th,
.acpc-dt__hours tr.is-today td { background: var(--acpc-brand-tint); font-weight: 700; color: var(--acpc-ink); }
.acpc-dt__today { display: inline-block; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--acpc-brand); color: #fff; border-radius: 4px; padding: .05rem .375rem; margin-left: .375rem; vertical-align: .1em; }
.acpc-dt__social { display: flex; gap: 1rem; margin-top: 1.25rem !important; }
.acpc-dt__social a { font-weight: 700; color: var(--acpc-navy); }
