/* Scoped selectors override WooCommerce's cart padding and floating labels. */
.wc-block-components-sidebar .wc-block-components-totals-coupon.wc-block-components-panel.nk-voucher-panel {
	box-sizing: border-box;
	container-type: inline-size;
	background: #fffbf3;
	border: 1px solid #d9d2c5;
	border-radius: 12px;
	padding: 8px 16px;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-panel__button {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	padding: 8px 28px 8px 0;
	color: #162840;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
}

.nk-voucher-panel .wc-block-components-panel__button::before {
	content: '';
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a5739' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 9V5H4v4a3 3 0 0 1 0 6v4h16v-4a3 3 0 0 1 0-6Z'/%3E%3Cpath d='M14 5v2m0 4v2m0 4v2'/%3E%3C/svg%3E");
}

.nk-voucher-panel .wc-block-components-panel__button-icon {
	top: 50%;
	right: 0;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-panel__content {
	padding: 4px 0 10px;
}

.nk-voucher-panel .nk-voucher-hint {
	margin: 0 0 16px;
	color: #526071;
	font-size: 13px;
	line-height: 1.5;
}

.nk-voucher-panel .wc-block-components-totals-coupon__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.nk-voucher-panel .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	height: auto;
	margin: 0;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-text-input label {
	position: static;
	order: -1;
	max-width: none;
	margin: 0;
	color: #162840;
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	transform: none;
	transition: none;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-text-input input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #89939e;
	border-radius: 6px;
	color: #162840;
	font-size: 18px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	line-height: 26px;
	box-shadow: none;
}

.nk-voucher-panel .wc-block-components-totals-coupon__input input::placeholder {
	color: #697481;
	font-size: 16px;
	font-weight: 400;
	opacity: 1;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button {
	box-sizing: border-box;
	width: auto;
	min-width: 96px;
	height: 48px;
	min-height: 48px;
	margin: 24px 0 0;
	padding: 0 14px;
	background: #162840;
	border: 1px solid #162840;
	border-radius: 6px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
}

.nk-voucher-panel .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button:hover:not(:disabled) {
	background: #2e435d;
	border-color: #2e435d;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button:disabled {
	background: #e8e5de;
	border-color: #e8e5de;
	color: #65707b;
	opacity: 1;
	cursor: default;
}

.nk-voucher-panel .wc-block-components-panel__button:focus-visible,
.nk-voucher-panel .wc-block-components-totals-coupon__input input:focus,
.nk-voucher-panel .wc-block-components-totals-coupon__button:focus-visible {
	outline: 2px solid #9a5739;
	outline-offset: 3px;
}

.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-text-input input[type="text"][aria-invalid="true"] {
	border-color: #a32f2f;
}

.nk-voucher-panel .wc-block-components-validation-error {
	margin: 2px 0 0;
	color: #a32f2f;
	font-size: 13px;
	line-height: 1.5;
}

.nk-voucher-panel .wc-block-components-validation-error p {
	align-items: flex-start;
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.nk-voucher-panel .wc-block-components-validation-error svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.wc-block-components-totals-discount .wc-block-components-totals-item__label {
	font-weight: 600;
}

.wc-block-components-totals-discount .wc-block-components-totals-item__value {
	color: #385c42;
}

.wc-block-components-totals-discount__coupon-list .wc-block-components-chip {
	min-height: 36px;
	padding: 0 0 0 12px;
	background: #edf2e9;
	border: 1px solid #c4d2bc;
	border-radius: 6px;
	color: #294a32;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.wc-block-components-totals-discount__coupon-list .wc-block-components-chip__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0 0 0 4px;
	background: transparent;
	border-radius: 4px;
}

.wc-block-components-totals-discount__coupon-list .wc-block-components-chip__remove:hover {
	background: #dce6d6;
}

@container (max-width: 240px) {
	.nk-voucher-panel .wc-block-components-totals-coupon__form {
		grid-template-columns: minmax(0, 1fr);
	}

	.nk-voucher-panel.wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button {
		width: 100%;
		margin-top: 0;
	}
}
