/**
 * Resha Rugs — product PIN delivery widget (scoped).
 * Warm luxury palette (charcoal, pearl, bronze/gold); not logistics teal.
 */

.resha-icarry-deliver {
	/* Brand tokens — child themes can override on .resha-icarry-deliver */
	--rr-ink: #1a1612;
	--rr-muted: #5c544a;
	--rr-card: #fffdfb;
	--rr-surface: #f7f3eb;
	--rr-line: rgba(26, 22, 18, 0.14);
	--rr-bronze: #7a5c1e;
	--rr-bronze-deep: #4a3a14;
	--rr-gold: #c9a24a;
	--rr-gold-soft: rgba(201, 162, 74, 0.18);
	--rr-shadow: 0 20px 50px rgba(26, 22, 18, 0.07), 0 2px 10px rgba(26, 22, 18, 0.04);
	--rr-radius: 14px;

	position: relative;
	margin: 1.75rem 0 2rem;
	font-family: inherit;
	color: var(--rr-ink);
}

.resha-icarry-deliver__glow {
	position: absolute;
	inset: -1px;
	border-radius: calc(var(--rr-radius) + 6px);
	background: linear-gradient(
		125deg,
		rgba(201, 162, 74, 0.22),
		rgba(26, 22, 18, 0.06),
		rgba(122, 92, 30, 0.14)
	);
	filter: blur(16px);
	opacity: 0.55;
	z-index: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.resha-icarry-deliver__glow {
		filter: none;
		opacity: 0.28;
	}
}

.resha-icarry-deliver__card {
	position: relative;
	z-index: 1;
	background: var(--rr-card);
	border: 1px solid var(--rr-line);
	border-radius: var(--rr-radius);
	box-shadow: var(--rr-shadow);
	padding: 1.25rem 1.25rem 1.1rem;
	overflow: hidden;
}

.resha-icarry-deliver__card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--rr-bronze-deep), var(--rr-gold), var(--rr-bronze));
	opacity: 1;
}

.resha-icarry-deliver__head {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	margin-bottom: 1.1rem;
}

.resha-icarry-deliver__badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(145deg, var(--rr-gold-soft), rgba(255, 253, 251, 0.95));
	color: var(--rr-bronze-deep);
	border: 1px solid rgba(201, 162, 74, 0.35);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.resha-icarry-deliver__headtext {
	min-width: 0;
}

.resha-icarry-deliver__title {
	margin: 0 0 0.25rem;
	font-size: 1.05rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.25;
	color: var(--rr-ink);
}

.resha-icarry-deliver__subtitle {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--rr-muted);
}

.resha-icarry-deliver__form {
	margin-top: 0.25rem;
}

.resha-icarry-deliver__label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--rr-muted);
	margin: 0 0 0.45rem;
}

.resha-icarry-deliver__row {
	display: flex;
	gap: 0.55rem;
	align-items: stretch;
}

.resha-icarry-deliver__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid var(--rr-line);
	background: var(--rr-surface);
	border-radius: 11px;
	padding: 0.72rem 0.85rem;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.06em;
	outline: none;
	color: var(--rr-ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.resha-icarry-deliver__input::placeholder {
	color: #9a9188;
	letter-spacing: normal;
}

.resha-icarry-deliver__input:focus {
	border-color: rgba(122, 92, 30, 0.55);
	box-shadow: 0 0 0 4px var(--rr-gold-soft);
	background: #fffefb;
}

/* Button + label: theme `button { color }` often wins; force readable copy on dark fill */
.resha-icarry-deliver button.resha-icarry-deliver__submit,
.resha-icarry-deliver .resha-icarry-deliver__submit {
	flex: 0 0 auto;
	appearance: none;
	border: 1px solid rgba(201, 162, 74, 0.55);
	border-radius: 11px;
	padding: 0.72rem 1.05rem;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	background: linear-gradient(180deg, #3a3228 0%, #231f1a 55%, #1a1612 100%) !important;
	box-shadow: 0 10px 24px rgba(26, 22, 18, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

.resha-icarry-deliver .resha-icarry-deliver__submit .resha-icarry-deliver__submit-label {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.resha-icarry-deliver .resha-icarry-deliver__submit:hover,
.resha-icarry-deliver .resha-icarry-deliver__submit:hover .resha-icarry-deliver__submit-label,
.resha-icarry-deliver .resha-icarry-deliver__submit:focus,
.resha-icarry-deliver .resha-icarry-deliver__submit:focus .resha-icarry-deliver__submit-label {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff;
}

.resha-icarry-deliver .resha-icarry-deliver__submit:hover {
	filter: brightness(1.06);
	border-color: rgba(201, 162, 74, 0.85);
	box-shadow: 0 12px 28px rgba(26, 22, 18, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.resha-icarry-deliver .resha-icarry-deliver__submit:focus-visible {
	outline: 2px solid var(--rr-gold);
	outline-offset: 2px;
}

.resha-icarry-deliver .resha-icarry-deliver__submit:active {
	transform: translateY(1px);
}

.resha-icarry-deliver .resha-icarry-deliver__submit:disabled .resha-icarry-deliver__submit-label {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff;
}

.resha-icarry-deliver .resha-icarry-deliver__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
	filter: none;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff;
}

.resha-icarry-deliver__submit-label {
	display: inline;
}

.resha-icarry-deliver__spinner {
	display: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid rgba(255, 253, 248, 0.35);
	border-top-color: #ffffff;
	animation: resha-icarry-spin 0.7s linear infinite;
	vertical-align: middle;
	margin-left: 0.35rem;
}

.resha-icarry-deliver.is-loading .resha-icarry-deliver__submit-label {
	opacity: 0.92;
}

.resha-icarry-deliver.is-loading .resha-icarry-deliver__spinner {
	display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
	.resha-icarry-deliver__spinner {
		animation: none;
		border-top-color: #ffffff;
	}
}

.resha-icarry-deliver__hint {
	margin: 0.65rem 0 0;
	font-size: 0.75rem;
	color: #7a7268;
	line-height: 1.45;
}

.resha-icarry-deliver__result {
	margin-top: 1rem;
	padding: 0.95rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--rr-line);
	background: var(--rr-surface);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.resha-icarry-deliver__result[hidden] {
	display: none;
}

.resha-icarry-deliver__result--ok {
	border-color: rgba(122, 92, 30, 0.35);
	background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 235, 0.95));
}

.resha-icarry-deliver__result--warn {
	border-color: rgba(180, 83, 9, 0.35);
	background: rgba(255, 251, 235, 0.9);
}

.resha-icarry-deliver__result--bad {
	border-color: rgba(185, 28, 28, 0.28);
	background: rgba(254, 242, 242, 0.55);
}

.resha-icarry-deliver__result-title {
	margin: 0 0 0.55rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--rr-ink);
	letter-spacing: 0.01em;
	line-height: 1.35;
}

.resha-icarry-deliver__result--ok .resha-icarry-deliver__result-lead {
	color: #15803d;
	font-weight: 800;
	margin-right: 0.2em;
}

.resha-icarry-deliver__result--ok .resha-icarry-deliver__result-rest {
	color: var(--rr-ink);
	font-weight: 700;
}

.resha-icarry-deliver__pin {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-variant-numeric: tabular-nums;
	font-weight: 650;
	color: var(--rr-ink);
}

.resha-icarry-deliver__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.resha-icarry-deliver__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.65rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	border: 1px solid var(--rr-line);
	background: #fffefb;
}

.resha-icarry-deliver__chip-key {
	color: var(--rr-muted);
	font-weight: 600;
}

.resha-icarry-deliver__chip-val {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: var(--rr-bronze-deep);
}

.resha-icarry-deliver__chip--y {
	border-color: rgba(201, 162, 74, 0.45);
	background: rgba(255, 253, 248, 0.98);
}

.resha-icarry-deliver__chip--n {
	border-color: rgba(185, 28, 28, 0.22);
}

.resha-icarry-deliver__chip--n .resha-icarry-deliver__chip-val {
	color: #991b1b;
}

.resha-icarry-deliver__chip--u .resha-icarry-deliver__chip-val {
	color: var(--rr-muted);
	font-weight: 600;
}

.resha-icarry-deliver__rows {
	margin: 0.75rem 0 0;
	padding-left: 1.1rem;
	color: var(--rr-muted);
	font-size: 0.88rem;
}

.resha-icarry-deliver__rows li + li {
	margin-top: 0.35rem;
}

@media (max-width: 520px) {
	.resha-icarry-deliver__row {
		flex-direction: column;
	}

	.resha-icarry-deliver__submit {
		width: 100%;
	}
}
