/**
 * ELGO public styles — mobile-first.
 *
 * Sized for one-handed phone use: every interactive target clears 44px, and the
 * layout is single-column until there is room for more.
 */

.elgo-panel {
	margin: 1.5em 0;
	padding: 1.25em;
	border: 1px solid #e3e3e3;
	border-radius: 12px;
	background: #fff;
	font-size: 16px; /* Prevents iOS zooming on focus. */
	line-height: 1.6;
}

.elgo-panel__title {
	margin: 0 0 0.75em;
	font-size: 1.15em;
	font-weight: 600;
}

/* "Not paid yet" banner ---------------------------------------------------- */

/*
 * Deliberately loud. The single biggest failure was customers reading "ORDER
 * COMPLETE" at the top of the page and believing they were finished.
 */
.elgo-alert {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 1em;
	padding: 0.85em 1em;
	border-radius: 8px;
	background: #fdecea;
	color: #a12622;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.45;
}

.elgo-alert__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #a12622;
	color: #fff;
	font-size: 0.95em;
	font-weight: 700;
}

/* Numbered steps ----------------------------------------------------------- */

.elgo-step {
	margin-top: 1.25em;
	padding-top: 1.25em;
	border-top: 1px solid #e3e3e3;
}

.elgo-step__title {
	display: flex;
	align-items: center;
	gap: 0.55em;
	margin: 0 0 0.85em;
	font-size: 1.15em;
	font-weight: 700;
	color: #111;
}

.elgo-step__num {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1;
}

/* PromptPay QR ------------------------------------------------------------- */

.elgo-qr {
	margin-bottom: 1em;
	text-align: center;
}

.elgo-qr__code {
	display: inline-block;
	width: 100%;
	/*
	 * Large enough that a phone camera locks on from a comfortable arm's
	 * length, capped so it never dominates a desktop viewport.
	 */
	max-width: 260px;
	padding: 10px;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	background: #fff;
}

.elgo-qr__code svg {
	display: block;
	width: 100%;
	height: auto;
}

.elgo-qr__hint {
	margin: 0.7em 0 0;
	color: #444;
	font-size: 0.95em;
	line-height: 1.5;
}

.elgo-or {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 1.1em 0 0.9em;
	color: #888;
	font-size: 0.9em;
}

.elgo-or::before,
.elgo-or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3e3e3;
}

/* Amount ------------------------------------------------------------------ */

.elgo-amount {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 1em;
	padding-bottom: 0.85em;
	border-bottom: 1px dashed #e3e3e3;
}

.elgo-amount__label {
	color: #666;
	font-size: 0.9em;
}

.elgo-amount__value {
	font-size: 1.5em;
	font-weight: 700;
	color: #111;
}

/* Bank details ------------------------------------------------------------ */

.elgo-bank__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em 1em;
	justify-content: space-between;
	padding: 0.35em 0;
}

.elgo-bank__label {
	color: #666;
	font-size: 0.9em;
}

.elgo-bank__value {
	font-weight: 500;
	text-align: right;
}

.elgo-bank__number {
	font-size: 1.2em;
	font-weight: 700;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	/* Lets a customer long-press to select on mobile if the button fails. */
	user-select: all;
	-webkit-user-select: all;
}

.elgo-copy {
	display: block;
	width: 100%;
	min-height: 46px;
	margin-top: 0.75em;
	padding: 0.7em 1em;
	border: 1px solid #111;
	border-radius: 8px;
	background: #fff;
	color: #111;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.elgo-copy:hover,
.elgo-copy:focus-visible {
	background: #111;
	color: #fff;
}

.elgo-copy.is-copied {
	border-color: #1a7f37;
	background: #1a7f37;
	color: #fff;
}

/* Bank badge -------------------------------------------------------------- */

.elgo-bank__value--brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.elgo-bank__logo {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 24px;
	padding: 0 0.4em;
	border-radius: 5px;
	font-size: 0.72em;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
	/* Latin abbreviations sit oddly in the Thai body face. */
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.elgo-bank__logo--img {
	min-width: 0;
	padding: 0;
	background: none;
}

.elgo-bank__logo--img img {
	display: block;
	width: auto;
	height: 24px;
	max-width: 90px;
	object-fit: contain;
}

/* LINE add-friend --------------------------------------------------------- */

.elgo-line-cta {
	margin-top: 1.25em;
	padding-top: 1.25em;
	border-top: 1px solid #e3e3e3;
	text-align: center;
}

.elgo-line-cta__note {
	margin: 0 0 0.7em;
	color: #444;
	font-size: 0.95em;
}

.elgo-line-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	min-height: 48px;
	padding: 0.7em 1.4em;
	border-radius: 8px;
	background: #06c755;
	color: #fff;
	font-size: 1em;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.elgo-line-add:hover,
.elgo-line-add:focus-visible {
	filter: brightness( 0.94 );
	color: #fff;
	text-decoration: none;
}

.elgo-line-add svg {
	width: 22px;
	height: 22px;
}

/* Order-history pointer --------------------------------------------------- */

.elgo-orders-link {
	margin: 1em 0 0;
	padding-top: 1em;
	border-top: 1px solid #e3e3e3;
	color: #444;
	font-size: 0.92em;
	line-height: 1.6;
	text-align: center;
}

.elgo-orders-link a {
	font-weight: 600;
}

.elgo-instructions {
	margin: 1em 0 0;
	padding: 0.75em;
	border-radius: 8px;
	background: #f7f7f7;
	font-size: 0.92em;
	color: #444;
}

/* Upload ------------------------------------------------------------------ */

.elgo-upload__hint {
	margin: 0 0 0.85em;
	color: #444;
	font-size: 0.95em;
}

/*
 * The input is hidden but must stay focusable and in the layout, so screen
 * readers and keyboard users can still reach it. `display: none` would remove
 * it from the accessibility tree entirely.
 */
.elgo-upload__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

.elgo-upload__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	width: 100%;
	min-height: 60px;
	padding: 1em;
	border: 2px dashed #111;
	border-radius: 12px;
	background: #fafafa;
	color: #111;
	font-size: 1.05em;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.elgo-upload__button:hover {
	background: #f0f0f0;
}

/* Keyboard focus lands on the hidden input; move the ring onto the label. */
.elgo-upload__input:focus-visible + .elgo-upload__button,
.elgo-upload__button:focus-visible {
	outline: 3px solid #005fcc;
	outline-offset: 2px;
}

.elgo-upload__button.is-busy {
	opacity: 0.55;
	cursor: progress;
}

.elgo-upload__icon {
	font-size: 1.3em;
	line-height: 1;
}

/* Status ------------------------------------------------------------------ */

.elgo-status {
	margin-top: 0.9em;
	font-size: 0.95em;
}

.elgo-status:empty {
	margin-top: 0;
}

.elgo-status--working {
	color: #444;
}

.elgo-status--working::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 0.5em;
	vertical-align: -2px;
	border: 2px solid #ccc;
	border-top-color: #111;
	border-radius: 50%;
	animation: elgo-spin 0.8s linear infinite;
}

.elgo-status--success {
	padding: 0.75em;
	border-radius: 8px;
	background: #e8f5ec;
	color: #12652b;
	font-weight: 600;
}

.elgo-status--error {
	padding: 0.75em;
	border-radius: 8px;
	background: #fdecea;
	color: #a12622;
	font-weight: 500;
}

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

@media ( prefers-reduced-motion: reduce ) {
	.elgo-status--working::before {
		animation: none;
	}
}

.elgo-preview {
	margin-top: 0.9em;
}

.elgo-preview img {
	display: block;
	max-width: 100%;
	max-height: 260px;
	margin: 0 auto;
	border-radius: 8px;
	border: 1px solid #e3e3e3;
}

.elgo-retry {
	display: block;
	width: 100%;
	min-height: 46px;
	margin-top: 0.85em;
	padding: 0.7em 1em;
	border: 1px solid #a12622;
	border-radius: 8px;
	background: #fff;
	color: #a12622;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
}

/* Verified confirmation --------------------------------------------------- */

.elgo-panel--verified {
	border-color: #1a7f37;
	background: #f4fbf6;
}

.elgo-verified-title {
	margin: 0 0 0.35em;
	font-size: 1.1em;
	font-weight: 700;
	color: #12652b;
}

.elgo-verified-ref {
	margin: 0;
	font-size: 0.9em;
	color: #444;
}

/* Social auth buttons ----------------------------------------------------- */

.elgo-social {
	margin: 0 0 1.5em;
}

.elgo-social__heading {
	margin: 0 0 0.75em;
	font-size: 0.95em;
	color: #444;
}

.elgo-social__buttons {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}

.elgo-social__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	width: 100%;
	min-height: 48px;
	padding: 0.75em 1em;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 600;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.elgo-social__button:hover {
	filter: brightness( 0.94 );
	text-decoration: none;
}

.elgo-social__button:focus-visible {
	outline: 3px solid #005fcc;
	outline-offset: 2px;
}

.elgo-social__button svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

/* Google brand guidelines: white surface, grey border, #3c4043 label. */
.elgo-social__button--google {
	border: 1px solid #dadce0;
	background: #fff;
	color: #3c4043;
}

/* LINE brand green. */
.elgo-social__button--line {
	border: 1px solid #06c755;
	background: #06c755;
	color: #fff;
}

.elgo-social__divider {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 1.25em 0;
	color: #888;
	font-size: 0.85em;
}

.elgo-social__divider::before,
.elgo-social__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3e3e3;
}

/* Wider screens ----------------------------------------------------------- */

@media ( min-width: 600px ) {
	.elgo-social__buttons {
		flex-direction: row;
	}

	.elgo-copy,
	.elgo-retry {
		width: auto;
		min-width: 220px;
	}
}

/* Thai address autocomplete ----------------------------------------------- */

.elgo-ac {
	position: absolute;
	z-index: 9999;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 17em;
	overflow-y: auto;
	margin-top: 2px;
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, 0.16 );
	-webkit-overflow-scrolling: touch;
}

.elgo-ac__item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15em 0.6em;

	/* 44px minimum tap target: the customers who need this most are on phones
	   and are not steady with small controls. */
	min-height: 44px;
	padding: 0.6em 0.85em;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1.35;
}

.elgo-ac__item:last-child {
	border-bottom: 0;
}

.elgo-ac__item.is-active,
.elgo-ac__item:hover {
	background: #f2f4fb;
}

.elgo-ac__item strong {
	font-weight: 600;
}

.elgo-ac__item span {
	color: #666;
	font-size: 0.9em;
}

.elgo-ac__item em {
	margin-left: auto;
	color: #888;
	font-size: 0.85em;
	font-style: normal;
	font-variant-numeric: tabular-nums;
}

/*
 * Flatsome hard-codes `#billing_address_2_field > label { opacity: 0; width: 0 }`
 * because it assumes address_2 is the optional "apartment, suite" field. Here it
 * carries a required ตำบล, so the label has to come back -- and no server-side
 * filter can do it, the rule is in the theme's stylesheet. Prefixed with `body`
 * to outrank it whichever order the two stylesheets happen to load in.
 */
body #billing_address_2_field > label,
body #shipping_address_2_field > label {
	width: auto;
	overflow: visible;
	white-space: normal;
	opacity: 1;
}
