/**
 * Aproxian Quick Order — front end.
 * Deliberately low-specificity so themes stay in charge of button styling.
 */

.aqo-button {
	display: inline-block;
	margin-top: 8px;
}

.aqo-button--single {
	margin-left: 8px;
}

@media (max-width: 600px) {
	.aqo-button--single {
		display: block;
		width: 100%;
		margin-left: 0;
	}
}

.aqo-modal[hidden] {
	display: none;
}

.aqo-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.aqo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	animation: aqo-fade 0.18s ease-out;
}

.aqo-modal__dialog {
	position: relative;
	background: #fff;
	color: #1f1f1f;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 8px;
	padding: 28px 24px 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: aqo-rise 0.2s ease-out;
}

.aqo-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: #888;
	cursor: pointer;
	padding: 4px 8px;
}

.aqo-modal__close:hover {
	color: #1f1f1f;
}

.aqo-modal__title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.aqo-modal__intro {
	margin: 0 0 16px;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
}

.aqo-modal__product {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 12px;
	margin-bottom: 16px;
	background: #f6f6f6;
	border-radius: 5px;
	font-size: 14px;
}

.aqo-modal__meta {
	white-space: nowrap;
	color: #444;
}

.aqo-modal__error {
	background: #fdecea;
	border-left: 3px solid #c0392b;
	color: #8e2b21;
	padding: 10px 12px;
	margin-bottom: 14px;
	font-size: 14px;
	border-radius: 3px;
}

.aqo-modal__error[hidden] {
	display: none;
}

.aqo-field {
	margin: 0 0 12px;
}

.aqo-field label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
}

.aqo-field input[type="text"],
.aqo-field input[type="tel"],
.aqo-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px; /* Stops iOS zooming on focus. */
	font-family: inherit;
	background: #fff;
	color: inherit;
}

.aqo-field input:focus,
.aqo-field textarea:focus {
	outline: 2px solid #2e7d32;
	outline-offset: 1px;
	border-color: #2e7d32;
}

.aqo-field .aqo-invalid {
	border-color: #c0392b;
	background: #fffafa;
}

.aqo-req {
	color: #c0392b;
}

.aqo-field--consent label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 12.5px;
	line-height: 1.45;
	color: #555;
}

.aqo-field--consent input {
	margin-top: 2px;
	flex: 0 0 auto;
}

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

.aqo-modal__submit {
	width: 100%;
	margin-top: 6px;
	padding: 13px 16px;
	font-size: 16px;
	cursor: pointer;
}

.aqo-modal__submit[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.aqo-modal__success {
	text-align: center;
	padding: 12px 0 4px;
}

.aqo-modal__success[hidden] {
	display: none;
}

.aqo-modal__tick {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 28px;
	line-height: 52px;
}

.aqo-modal__ref {
	font-size: 13px;
	color: #777;
	margin: 4px 0 18px;
}

body.aqo-open {
	overflow: hidden;
}

@keyframes aqo-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes aqo-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.aqo-modal__backdrop,
	.aqo-modal__dialog {
		animation: none;
	}
}
