/**
 * Offer-claim modal.
 *
 * Styles the dialog only. The button that opens it keeps whatever class its
 * host card gave it, because this control sits in four differently-skinned
 * cards and the host page should keep owning how its own button looks.
 *
 * Tokens follow the form/auth page pattern in CLAUDE.md: 48px inputs on an
 * #EEF4FB wash, 0.5px #d0dce8 borders, 12px radii, DM Sans body, Poppins
 * headings. The primary action is orange because every claim button on the
 * site is orange.
 */

.culoc {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.culoc[hidden] {
	display: none;
}

.culoc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 32, 48, 0.55);
}

.culoc__box {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	background: #fff;
	border: 0.5px solid #d0dce8;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(27, 58, 92, 0.22);
	padding: 32px 28px 26px;
	font-family: 'DM Sans', system-ui, sans-serif;
	color: #1B3A5C;
}

.culoc__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	color: #7a9ab8;
	cursor: pointer;
}

.culoc__close:hover {
	color: #1B3A5C;
	background: #EEF4FB;
}

.culoc__title {
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
	font-size: 25px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #1B3A5C;
	margin: 0 0 6px;
}

.culoc__sub {
	font-size: 16px;
	line-height: 1.5;
	color: #4a6380;
	margin: 0 0 20px;
}

.culoc__offer:empty {
	display: none;
}

.culoc__label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #1B3A5C;
	margin: 0 0 7px;
}

.culoc__opt {
	font-size: 11px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #7a9ab8;
}

.culoc__input {
	display: block;
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	padding: 0 14px;
	margin: 0 0 16px;
	background: #EEF4FB;
	border: 0.5px solid #d0dce8;
	border-radius: 12px;
	font-family: 'DM Sans', system-ui, sans-serif;
	/* 16px minimum, or iOS Safari zooms the page on focus. */
	font-size: 16px;
	color: #1B3A5C;
}

.culoc__input::placeholder {
	color: #7a9ab8;
}

.culoc__input:focus {
	outline: none;
	background: #fff;
	border-color: #1B3A5C;
	box-shadow: 0 0 0 3px rgba(28, 58, 92, 0.08);
}

.culoc__input--code {
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 9px;
	text-align: center;
	padding-right: 0;
	text-indent: 9px;
}

.culoc__row {
	display: flex;
	gap: 12px;
}

.culoc__col {
	flex: 1 1 0;
	min-width: 0;
}

.culoc__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.culoc__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	box-sizing: border-box;
	padding: 0 20px;
	background: #E87722;
	color: #fff;
	border: 0;
	border-radius: 12px;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.culoc__btn:hover,
.culoc__btn:focus,
.culoc__btn:visited {
	color: #fff;
	text-decoration: none;
}

.culoc__btn:hover:not(:disabled) {
	background: #d16a1a;
	transform: translateY(-1px);
}

.culoc__btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
}

.culoc__btn--go {
	background: #1B3A5C;
}

.culoc__btn--go:hover {
	background: #152d47;
}

.culoc__note {
	font-size: 13px;
	line-height: 1.5;
	color: #7a9ab8;
	text-align: center;
	margin: 12px 0 0;
}

/* Kept out of the flow until it says something, so the button does not shift
   down the moment an error appears. */
.culoc__status {
	font-size: 14px;
	line-height: 1.4;
	color: #b45309;
	text-align: center;
	margin: 12px 0 0;
}

.culoc__status:empty {
	display: none;
}

.culoc__resend {
	display: block;
	width: 100%;
	margin: 14px 0 0;
	padding: 6px;
	background: none;
	border: 0;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 14px;
	color: #4a6380;
	text-decoration: underline;
	cursor: pointer;
}

.culoc__resend:disabled {
	color: #a9b7c4;
	text-decoration: none;
	cursor: default;
}

.culoc__step--done {
	text-align: center;
}

.culoc__tick {
	width: 58px;
	height: 58px;
	margin: 2px auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #e8f5e9;
	color: #4caf50;
}

.culoc__tick svg {
	width: 30px;
	height: 30px;
}

.culoc__step--done .culoc__sub {
	margin-bottom: 22px;
}

@media (max-width: 480px) {
	.culoc {
		padding: 12px;
		/* Bottom-sheet on a phone: the dialog sits under the thumb rather than
		   floating in the middle of the screen. */
		align-items: flex-end;
	}

	.culoc__box {
		max-width: none;
		max-height: calc(100vh - 24px);
		padding: 28px 20px 22px;
	}

	.culoc__title {
		font-size: 23px;
	}

	.culoc__row {
		display: block;
	}
}
