/**
 * Chamdon — shared components for the content pages
 * (about / contact / workshops / login).
 *
 * Loaded after layout.css so it can lean on the design tokens declared in
 * base.css.
 */

/* ---------------------------------------------------------------- OTP boxes */
.ch-otp-input {
	width: 52px;
	height: 60px;
	padding: 0;
	border: 1px solid var(--ch-line, rgba(114, 18, 36, 0.1));
	border-radius: 10px;
	background: var(--ch-cream-2, #f5efeb);
	color: var(--ch-ink, #1c1c18);
	font-family: var(--ch-font-mono, "Space Grotesk", monospace);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ch-otp-input:focus {
	border-color: var(--ch-amber, #c88a3e);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(200, 138, 62, 0.16);
	outline: none;
}

.ch-otp-input:not(:placeholder-shown) {
	border-color: rgba(200, 138, 62, 0.4);
}

@media (max-width: 420px) {
	.ch-otp-input {
		width: 46px;
		height: 54px;
		font-size: 1.3rem;
	}
}

/* ----------------------------------------------------------------- Lightbox */
.ch-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 4vw;
	background: rgba(18, 9, 11, 0.93);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.ch-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.ch-lightbox__figure {
	margin: 0;
	max-width: min(1080px, 92vw);
	text-align: center;
}

.ch-lightbox__figure img {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	margin: 0 auto;
	border-radius: 14px;
	box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.7);
}

.ch-lightbox__figure figcaption {
	margin-top: 16px;
	color: rgba(250, 246, 240, 0.72);
	font-size: 0.8125rem;
	letter-spacing: 0.01em;
}

.ch-lightbox__close {
	position: absolute;
	top: 22px;
	inset-inline-end: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #faf6f0;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ch-lightbox__close:hover {
	background: rgba(200, 138, 62, 0.9);
	border-color: transparent;
	color: #1a0d0f;
	transform: rotate(90deg);
}

/* Day pills on the roastery-visit form. */
.ch-day {
	scroll-snap-align: start;
}

.ch-day[aria-pressed="true"] span {
	color: #faf6f0;
}

/* Native summary marker cleanup (FAQ accordions). */
summary::-webkit-details-marker {
	display: none;
}

details > summary {
	list-style: none;
}

/* Inline form feedback (workshops / contact / auth). */
.ch-form-msg {
	align-items: flex-start;
	gap: 0.625rem;
	border-width: 1px;
	border-style: solid;
	border-radius: var(--ch-r-sm, 8px);
	padding: 0.75rem 1rem;
	font-size: 0.8125rem;
	line-height: 1.9;
}

.ch-form-msg.is-ok {
	border-color: rgba(47, 107, 79, 0.4);
	background: rgba(47, 107, 79, 0.1);
	color: #2f6b4f;
}

.ch-form-msg.is-error {
	border-color: rgba(186, 26, 26, 0.4);
	background: rgba(186, 26, 26, 0.1);
	color: #a11717;
}

/* Quick add to cart (product cards) ---------------------------------------- */
.ch-quick-add {
	position: relative;
}

.ch-quick-add.is-busy {
	pointer-events: none;
	opacity: 0.7;
}

.ch-quick-add.is-busy svg {
	opacity: 0;
}

.ch-quick-add.is-busy::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid rgba(250, 246, 240, 0.35);
	border-top-color: #faf6f0;
	border-radius: 50%;
	animation: ch-spin 0.7s linear infinite;
}

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

#ch-cart-count.is-bump {
	animation: ch-count-bump 0.45s var(--ch-ease);
}

@keyframes ch-count-bump {
	0%,
	100% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.28);
	}
}
