/* Acme CRM Support Ticket — front-end forms
   Visual spec matched to the "Get In Touch" (lead) and "Support Ticket"
   reference designs: bold black title with a short red underline rule,
   bold black field labels, thin grey-bordered inputs with sharp corners,
   and a solid red submit button. */

.acst-wrap {
	--acst-accent: #E8194B;
	--acst-accent-text: #FFFFFF;
	--acst-label: #1B1B1F;
	--acst-border: #C9C9CE;
	--acst-radius: 4px;
	--acst-gap-x: 34px;
	--acst-gap-y: 26px;
	--acst-error: #D32F2F;
	--acst-ok: #1B7F4B;

	max-width: 1180px;
	margin: 0 auto;
	color: var(--acst-label);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

.acst-wrap *,
.acst-wrap *::before,
.acst-wrap *::after {
	box-sizing: inherit;
}

/* Heading: bold black title, short red underline rule, grey intro line */

.acst-title {
	margin: 0 0 14px;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: #0E0E16;
	position: relative;
	padding-bottom: 14px;
}

.acst-title::after {
	content: "";
	position: absolute;
	left: 1px;
	bottom: 0;
	width: 76px;
	height: 3px;
	background: var(--acst-accent);
	border-radius: 2px;
}

.acst-intro {
	margin: 20px 0 30px;
	max-width: 90ch;
	font-size: 16px;
	color: #55555f;
}

/* Grid: 3 columns by default; the lead form's last row (Country / City /
   State / Pincode) needs 4, set with .acst-row-4 on that row in markup;
   acst-cols-* still controls the whole-form default for other shortcodes. */

.acst-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--acst-gap-x);
	row-gap: var(--acst-gap-y);
}

.acst-cols-2 .acst-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acst-cols-1 .acst-grid {
	grid-template-columns: minmax(0, 1fr);
}

.acst-cols-4 .acst-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.acst-wrap select[disabled] {
	background-color: #f6f6f8;
	color: #9a9aa4;
	cursor: not-allowed;
}

.acst-field-full {
	grid-column: 1 / -1;
}

/* A field row that should always lay out as 4-across regardless of the
   form's overall column count (used by the lead form's last row). */
.acst-row-4 {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--acst-gap-x);
	row-gap: var(--acst-gap-y);
}

.acst-field {
	min-width: 0;
}

.acst-field > label {
	display: block;
	margin-bottom: 9px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	color: #0E0E16;
}

.acst-req {
	color: var(--acst-accent);
	font-weight: 700;
	margin-left: 3px;
}

.acst-wrap input[type="text"],
.acst-wrap input[type="email"],
.acst-wrap input[type="tel"],
.acst-wrap select,
.acst-wrap textarea {
	width: 100%;
	padding: 11px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: #24242c;
	background-color: #fff;
	border: 1px solid var(--acst-border);
	border-radius: var(--acst-radius);
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acst-wrap textarea {
	min-height: 170px;
	resize: vertical;
}

.acst-wrap select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23222' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	padding-right: 38px;
	cursor: pointer;
}

.acst-wrap select[multiple] {
	background-image: none;
	padding-right: 14px;
	cursor: auto;
}

.acst-wrap input::placeholder,
.acst-wrap textarea::placeholder {
	color: #9a9aa4;
	opacity: 1;
}

.acst-wrap input:focus,
.acst-wrap select:focus,
.acst-wrap textarea:focus {
	outline: none;
	border-color: var(--acst-accent);
	box-shadow: 0 0 0 3px rgba(232, 25, 75, .14);
}

.acst-wrap input:focus-visible,
.acst-wrap select:focus-visible,
.acst-wrap textarea:focus-visible,
.acst-wrap button:focus-visible {
	outline: 2px solid var(--acst-accent);
	outline-offset: 2px;
}

/* Errors */

.acst-error {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--acst-error);
}

.acst-field.has-error .acst-error {
	display: block;
}

.acst-field.has-error input,
.acst-field.has-error select,
.acst-field.has-error textarea {
	border-color: var(--acst-error);
}

.acst-alert {
	margin-bottom: 24px;
	padding: 14px 16px;
	border-radius: var(--acst-radius);
	border-left: 4px solid var(--acst-accent);
	background: #fdf1f4;
	font-size: 15px;
}

.acst-alert.is-ok {
	border-left-color: var(--acst-ok);
	background: #edf7f1;
}

.acst-alert .acst-detail {
	display: block;
	margin-top: 8px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	word-break: break-word;
	color: #555;
}

.acst-notice {
	margin-bottom: 20px;
	padding: 12px 14px;
	border-radius: var(--acst-radius);
	font-size: 14px;
}

.acst-notice-warn {
	background: #fff8e1;
	border: 1px solid #f0d48a;
}

/* Attachments — matches the plain "Choose Files / No file chosen" look */

.acst-field-full > label {
	margin-bottom: 12px;
}

.acst-file-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.acst-file-row input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.acst-file-btn {
	padding: 6px 13px;
	font-family: inherit;
	font-size: 14px;
	color: #1b1b2f;
	background: #efefef;
	border: 1px solid #a9a9a9;
	border-radius: 3px;
	cursor: pointer;
}

.acst-file-btn:hover {
	background: #e4e4e4;
}

.acst-file-status {
	font-size: 14px;
	color: #55555f;
}

.acst-file-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.acst-file-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	font-size: 13px;
	background: #f4f4f6;
	border: 1px solid #e0e0e6;
	border-radius: var(--acst-radius);
}

.acst-file-list button {
	border: 0;
	background: none;
	color: var(--acst-error);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.acst-hint {
	margin: 10px 0 0;
	font-size: 13px;
	color: #7a7a86;
}

/* Submit — right-aligned on the lead/contact form, left-aligned on the
   support-ticket form (see .acst-actions-start below). */

.acst-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
	margin-top: 32px;
}

.acst-actions-start {
	justify-content: flex-start;
}

.acst-submit {
	min-width: 190px;
	padding: 16px 30px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	color: var(--acst-accent-text);
	background: var(--acst-accent);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: filter .15s ease;
}

.acst-submit:hover {
	filter: brightness(.92);
}

.acst-submit[disabled] {
	opacity: .65;
	cursor: not-allowed;
}

.acst-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0, 0, 0, .15);
	border-top-color: var(--acst-accent);
	border-radius: 50%;
	animation: acst-spin .7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.acst-spinner {
		animation-duration: 2s;
	}
}

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

.acst-form.is-done .acst-grid,
.acst-form.is-done .acst-actions,
.acst-lead-form.is-done .acst-grid,
.acst-lead-form.is-done .acst-actions {
	display: none;
}

@media (max-width: 900px) {
	.acst-grid,
	.acst-row-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.acst-cols-4 .acst-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.acst-wrap {
		--acst-gap-x: 18px;
		--acst-gap-y: 18px;
	}

	.acst-title {
		font-size: 26px;
	}

	.acst-grid,
	.acst-row-4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.acst-field > label {
		font-size: 15px;
	}

	.acst-actions,
	.acst-actions-start {
		justify-content: stretch;
	}

	.acst-submit {
		width: 100%;
		min-width: 0;
		padding: 15px 22px;
	}
}
