/**
 * One-click order button and modal.
 */

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

.lm-quick__open {
	display: inline-block;
	border: 1px solid var(--ink, #1a1917);
	border-radius: 999px;
	background: transparent;
	color: var(--ink, #1a1917);
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.2;
	padding: .7rem 1.25rem;
	cursor: pointer;
	transition: background-color .18s var(--ease, ease), color .18s var(--ease, ease), border-color .18s var(--ease, ease);
}

.lm-quick__open:hover,
.lm-quick__open:focus-visible {
	border-color: var(--ink, #1a1917);
	background: var(--ink, #1a1917);
	color: var(--white, #fff);
}

.lm-quick__open:focus-visible {
	outline: 2px solid var(--red, #ee3a29);
	outline-offset: 2px;
}

/* On a card the button sits under add-to-cart and must not break the grid. */
.lm-quick__open--loop {
	display: block;
	width: 100%;
	margin-top: .5rem;
	padding: .6rem 1rem;
	font-size: .85rem;
}

/* --- Modal -------------------------------------------------------------- */

.lm-quick[hidden] {
	display: none;
}

.lm-quick {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.lm-quick__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 25, 23, .55);
	backdrop-filter: blur(2px);
}

.lm-quick__dialog {
	position: relative;
	width: min(28rem, 100%);
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: clamp(1.25rem, 4vw, 2rem);
	border-radius: var(--radius, 18px);
	background: var(--white, #fff);
	box-shadow: var(--shadow-lg, 0 40px 90px -40px rgba(26, 25, 23, .55));
}

.lm-quick__close {
	position: absolute;
	top: .5rem;
	right: .5rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--muted, #8a8580);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.lm-quick__close:hover,
.lm-quick__close:focus-visible {
	background: var(--cream, #f7f2ea);
	color: var(--ink, #1a1917);
}

.lm-quick__title {
	margin: 0 0 .35rem;
	font-family: var(--font-display, Georgia, serif);
	font-size: clamp(1.3rem, 3vw, 1.6rem);
	line-height: 1.15;
}

.lm-quick__product {
	margin: 0 0 1.1rem;
	color: var(--muted, #8a8580);
	font-size: .92rem;
}

.lm-quick__label {
	display: block;
	margin-bottom: .3rem;
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: .9rem;
	font-weight: 600;
}

.lm-quick__input {
	width: 100%;
	margin-bottom: .9rem;
	padding: .8rem 1rem;
	border: 1px solid var(--line, #ece7de);
	border-radius: var(--radius-sm, 12px);
	background: var(--white, #fff);
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: 1rem;
}

.lm-quick__input:focus {
	border-color: var(--red, #ee3a29);
	box-shadow: 0 0 0 3px rgba(238, 58, 41, .15);
	outline: none;
}

.lm-quick__hint {
	margin: 0 0 1rem;
	color: var(--muted, #8a8580);
	font-size: .82rem;
	line-height: 1.4;
}

.lm-quick__error {
	margin: 0 0 .9rem;
	padding: .7rem .9rem;
	border-left: 3px solid var(--red, #ee3a29);
	border-radius: var(--radius-sm, 12px);
	background: #fdeceb;
	color: #a3271b;
	font-size: .88rem;
}

.lm-quick__done {
	margin: 0;
	padding: 1rem;
	border-radius: var(--radius-sm, 12px);
	background: #eef7ef;
	color: #1f6b34;
	font-size: .95rem;
}

.lm-quick__submit {
	width: 100%;
}

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

body.lm-quick-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.lm-quick__open {
		transition: none;
	}
}
