.ftm-cod {
	position: fixed;
	inset: 0;
	z-index: 80;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0.6rem;
}

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

.ftm-cod__sheet {
	position: relative;
	width: min(100%, 28rem);
	max-height: min(92vh, 46rem);
	overflow: auto;
	background: #fff;
	border-radius: 0.9rem 0.9rem 0 0;
	padding: 1rem 1rem 1.2rem;
	color: var(--ftm-text);
}

.ftm-cod__close {
	position: absolute;
	top: 0.45rem;
	right: 0.55rem;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.ftm-cod__notice {
	margin: 0.4rem 1.4rem 0.9rem 0;
	font-size: 0.92rem;
	line-height: 1.55;
	text-align: right;
	direction: rtl;
}

.ftm-cod__product {
	display: grid;
	grid-template-columns: 4.2rem 1fr auto;
	gap: 0.7rem;
	align-items: center;
	padding: 0.7rem 0;
	border-top: 1px solid var(--ftm-border);
}

.ftm-cod__image {
	width: 4.2rem;
	height: 4.2rem;
	object-fit: cover;
	border-radius: 0.35rem;
}

.ftm-cod__name {
	margin: 0;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ftm-cod__price {
	margin: 0;
	font-size: 0.95rem;
	white-space: nowrap;
}

.ftm-cod__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.4rem 0 0.8rem;
}

.ftm-cod__sizes button {
	min-width: 2.6rem;
	height: 2.4rem;
	border: 1px solid var(--ftm-border);
	background: #fff;
	cursor: pointer;
}

.ftm-cod__sizes button.is-selected {
	border-color: var(--ftm-primary);
	box-shadow: inset 0 0 0 1px var(--ftm-primary);
}

.ftm-cod__qty {
	display: inline-flex;
	border: 1px solid var(--ftm-border);
	margin-bottom: 0.8rem;
}

.ftm-cod__qty button,
.ftm-cod__qty input {
	width: 2.4rem;
	height: 2.4rem;
	border: 0;
	background: #fff;
	text-align: center;
}

.ftm-cod__totals {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.9rem;
}

.ftm-cod__totals th,
.ftm-cod__totals td {
	padding: 0.55rem 0.2rem;
	border-bottom: 1px solid var(--ftm-border);
	font-weight: 400;
}

.ftm-cod__totals td {
	text-align: right;
}

.ftm-cod__form label {
	display: block;
	margin: 0.75rem 0 0.3rem;
	font-size: 0.95rem;
}

.ftm-cod__form label span {
	color: var(--ftm-sale);
}

.ftm-cod__form input,
.ftm-cod__form select {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	border: 1px solid var(--ftm-border);
	border-radius: 0.45rem;
	padding: 0.75rem 0.8rem;
	background: #fff;
}

.ftm-cod__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	margin-top: 1rem;
	border: 0;
	background: #111;
	color: #fff;
	padding: 0.95rem 1rem;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.ftm-cod__submit svg {
	width: 1.15rem;
	height: 1.15rem;
}

.ftm-cod__submit:disabled {
	opacity: 0.55;
	cursor: progress;
}

.ftm-cod__error {
	color: var(--ftm-sale);
	font-size: 0.85rem;
}

.ftm-cod__success {
	font-size: 0.95rem;
}

@media (min-width: 768px) {
	.ftm-cod {
		align-items: center;
	}

	.ftm-cod__sheet {
		border-radius: 0.9rem;
	}
}
