/**
 * Out-N-Out — Cash-on-Delivery express-checkout modal. Mirrors the live COD
 * popup: order summary + short shipping form + Complete Order button.
 */

.oon-cod[hidden] { display: none; }

.oon-cod {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}
.oon-cod__overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 18, 30, 0.55);
}
body.oon-cod-open { overflow: hidden; }

.oon-cod__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: auto;
	background: var(--oon-color-bg, #fff);
	border-radius: 6px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	animation: oon-cod-in 0.25s ease;
	/* Live modal base metrics (#_rsi-cod-form-modal): 16.8px, dark text. */
	font-size: 16.8px;
	color: #000;
}
@keyframes oon-cod-in {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
.oon-cod__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
}
/* Live header title: font-weight 600, font-size 1.15em, left-aligned, black.
   Rendered uppercase to match live's "CASH ON DELIVERY". */
.oon-cod__title {
	margin: 0;
	font-family: var(--oon-font-body);
	font-weight: 600;
	font-size: 1.15em;
	line-height: 1.2;
	text-transform: uppercase;
	color: #000;
}
.oon-cod__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: none;
	border: none;
	color: var(--oon-color-text, #111);
	cursor: pointer;
	border-radius: var(--oon-radius-full, 9999px);
	transition: background-color var(--oon-transition, 0.25s ease);
}
.oon-cod__close:hover { background: var(--oon-color-bg-secondary, #f5f5f5); }

.oon-cod__scroll {
	padding: 0 20px 24px;
}

/* ---- Summary: line items ---- */
.oon-cod__items {
	border-top: 1px solid var(--oon-color-border, #e6e6e6);
	padding-top: 16px;
}
.oon-cod__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 16px;
}
.oon-cod__item-media {
	position: relative;
	flex: 0 0 auto;
	width: 54px;
	height: 54px;
}
.oon-cod__item-media img {
	width: 54px;
	height: 54px;
	object-fit: contain;
	border: 1px solid var(--oon-color-border, #e6e6e6);
	border-radius: 6px;
	background: var(--oon-color-bg, #fff);
}
.oon-cod__item-qty {
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--oon-font-body);
	font-size: 11px;
	font-weight: 600;
	color: #fff;
	background: var(--oon-color-text-secondary, #7a7a85);
	border-radius: var(--oon-radius-full, 9999px);
}
.oon-cod__item-name {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--oon-font-body);
	font-weight: 600;
	color: var(--oon-color-heading, #332d55);
}
.oon-cod__item-price {
	flex: 0 0 auto;
	font-family: var(--oon-font-body);
	font-weight: 600;
	white-space: nowrap;
	color: var(--oon-color-heading, #332d55);
}

/* ---- Summary: totals box ---- */
.oon-cod__totals {
	background: var(--oon-color-bg-secondary, #f5f5f5);
	border-radius: 6px;
	padding: 16px 18px;
	margin: 16px 0; /* live ._rsi-build-block-totals-summary margin: 16px 0 */
}
.oon-cod__trow {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--oon-font-body);
	color: var(--oon-color-text, #222);
	margin-bottom: 8px;
}
.oon-cod__trow:last-child { margin-bottom: 0; }
.oon-cod__free { font-weight: 700; }
.oon-cod__trow--total {
	margin-top: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--oon-color-border, #e0e0e0);
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--oon-color-heading, #332d55);
}

/* ---- Form ----
   Live "Enter your shipping address": body font, weight 600, ~1.2em, centred,
   margin 12px top / 22px bottom. */
.oon-cod__form-title {
	margin: 12px 0 22px;
	text-align: center;
	font-family: var(--oon-font-body);
	font-weight: 600;
	font-size: 1.2em;
	line-height: 1.3;
	color: #000;
}
/* Live field: bordered box (1px silver, radius 6px, input height 47px) with the
   icon in a left segment separated by a divider. */
.oon-cod__field {
	display: flex;
	align-items: stretch;
	margin-bottom: 14px;
	border: 1px solid #c4c4c4;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
	transition: border-color var(--oon-transition, 0.25s ease);
}
/* Live focus state (Releasit): blue border + soft blue glow (the light-blue
   tint), input stays white. */
.oon-cod__field:focus-within {
	border-color: #6faaff;
	box-shadow: 0 0 0 2.5px rgba(12, 107, 247, 0.25);
}
/* Live field icon: dark filled glyph inside a light-grey box on the left. */
.oon-cod__field-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	background: #e8e8e8;
	color: #333;
	border-right: 1px solid #dcdcdc;
}
.oon-cod__field input {
	flex: 1 1 auto;
	width: 100%;
	height: 47px;
	padding: 0 15px;
	border: none;
	background: none;
	font-family: var(--oon-font-body);
	font-size: 0.95em;
	color: #000;
}
.oon-cod__field input:focus { outline: none; }

.oon-cod__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 8px 0 0;
	font-family: var(--oon-font-body);
	font-size: 0.9em;
	color: var(--oon-color-text, #333);
	cursor: pointer;
}
.oon-cod__check input {
	margin-top: 2px;
	width: 16px;
	height: 16px;
	accent-color: var(--oon-color-heading, #332d55);
	flex: 0 0 auto;
}

.oon-cod__error {
	margin: 0 0 16px;
	font-family: var(--oon-font-body);
	font-size: 0.9rem;
	color: var(--oon-color-price-sale, #e84e4e);
}
.oon-cod__error[hidden] { display: none; }

/* Live submit: full-width black RECTANGLE (border-radius 2px), 16px/600 text,
   ~30px top margin — not a pill. */
.oon-cod__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 30px;
	padding: 14px 20px;
	font-family: var(--oon-font-body);
	font-weight: 600;
	font-size: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	background: var(--oon-color-text, #111);
	border: none;
	border-radius: 2px;
	cursor: pointer;
	transition: opacity var(--oon-transition, 0.25s ease);
}
.oon-cod__submit:hover { opacity: 0.88; }
.oon-cod__submit.is-loading { opacity: 0.6; cursor: progress; }
.oon-cod__submit-total::before { content: "- "; }

/* Loading + messages */
.oon-cod__loading {
	height: 90px;
	border-radius: 6px;
	background: linear-gradient(90deg, #f2f2f2 25%, #ececec 37%, #f2f2f2 63%);
	background-size: 400% 100%;
	animation: oon-cod-shimmer 1.2s ease-in-out infinite;
}
@keyframes oon-cod-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: 0 0; }
}
.oon-cod__msg {
	padding: 20px 0;
	text-align: center;
	color: var(--oon-color-text-secondary, #666);
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
	.oon-cod { padding: 0; align-items: stretch; }
	.oon-cod__dialog { max-width: none; border-radius: 0; min-height: 100%; }
}
