/**
 * Slide-in cart shown after a product is added.
 */

.nn-drawer[hidden] {
	display: none !important;
}

.nn-drawer {
	position: fixed;
	inset: 0;
	z-index: 100100;
}

.nn-drawer__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	background: rgba(22, 28, 26, 0.46);
	cursor: pointer;
}

.nn-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, calc(100% - 28px));
	height: 100%;
	height: 100dvh;
	background: #fff;
	box-shadow: -16px 0 40px rgba(17, 24, 22, 0.16);
	animation: nn-drawer-in 0.28s ease;
}

.nn-drawer__inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

.nn-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 20px 10px;
}

.nn-drawer__title {
	margin: 0;
	color: #1c2430;
	font-family: "Beautique Display", "Playfair Display", Georgia, serif;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.15;
}

.nn-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #1c2430;
	cursor: pointer;
}

.nn-drawer__close:hover {
	background: #f3f4f6;
}

.nn-drawer__list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 8px 16px 12px;
}

.nn-drawer__empty {
	margin: 28px 8px;
	color: #5c6560;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.nn-drawer__item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 12px;
	margin: 0 0 12px;
	padding: 12px;
	border: 1px solid #e6e8ee;
	border-radius: 16px;
	background: #fff;
}

.nn-drawer__media {
	width: 76px;
	height: 76px;
	overflow: hidden;
	border-radius: 12px;
	background: #f4f6f8;
}

.nn-drawer__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nn-drawer__info {
	min-width: 0;
}

.nn-drawer__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.nn-drawer__name {
	display: -webkit-box;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	margin: 0;
	color: #1c2430;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.nn-drawer__remove {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-top: -2px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #8b909a;
	cursor: pointer;
}

.nn-drawer__remove:hover {
	background: #fdeceb;
	color: #b63726;
}

.nn-drawer__status {
	display: none;
	margin: 4px 0 0;
	color: #b63726;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

.nn-drawer__item {
	transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.nn-drawer__item.is-removing {
	pointer-events: none;
	opacity: 0.55;
	transform: translateX(10px);
	background: #fdf6f5;
	border-color: #e7c8c3;
}

.nn-drawer__item.is-removing .nn-drawer__status {
	display: block;
}

.nn-drawer__item.is-removing .nn-drawer__remove {
	color: transparent;
	background: transparent;
}

.nn-drawer__item.is-removing .nn-drawer__remove svg {
	visibility: hidden;
}

.nn-drawer__item.is-removing .nn-drawer__remove::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(182, 55, 38, 0.25);
	border-top-color: #b63726;
	border-radius: 50%;
	animation: nn-drawer-spin 0.6s linear infinite;
}

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

.nn-drawer__name:hover {
	color: #1d5c4b;
}

.nn-drawer__unit {
	margin: 2px 0 0;
	color: #8b909a;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 13px;
	line-height: 1.3;
}

.nn-drawer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 8px;
}

.nn-drawer__price {
	margin: 0;
	color: #1d5c4b;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
}

.nn-drawer__qty {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 4px;
	border: 1px solid #d7dce3;
	border-radius: 999px;
	background: #fff;
}

.nn-drawer__qty button {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #1c2430;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.nn-drawer__qty button:disabled {
	color: #c5c9d0;
	cursor: default;
}

.nn-drawer__qty span {
	min-width: 18px;
	color: #1c2430;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.nn-drawer__foot {
	flex: 0 0 auto;
	padding: 14px 18px 18px;
	border-top: 1px solid #eef0f3;
	background: #fff;
}

.nn-drawer__sub {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	color: #1c2430;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 16px;
}

.nn-drawer__sub strong {
	font-size: 18px;
	font-weight: 700;
}

.nn-drawer__pay {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	border-radius: 12px;
	background: #1d5c4b;
	color: #fff;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.nn-drawer__pay:hover {
	background: #16483d;
	color: #fff;
}

.nn-drawer__note {
	margin: 10px 0 0;
	color: #8b909a;
	font-family: "Be Vietnam Pro", sans-serif;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

body.nn-drawer-open {
	overflow: hidden;
}

@keyframes nn-drawer-in {
	from {
		transform: translateX(100%);
	}
	to {
		transform: translateX(0);
	}
}

@media (max-width: 760px) {
	.nn-drawer__panel {
		width: min(440px, calc(100% - 18px));
	}

	.nn-drawer__title {
		font-size: 26px;
	}

	.nn-drawer__head {
		padding: 18px 16px 8px;
	}
}
