/*
 * IEM – withdrawal form.
 * Builds on the theme's .form-group / .btn--black styles; only layout and the
 * pieces the theme does not have are defined here.
 */

.iem-wd {
	--wd-ink: #000;
	--wd-muted: #6b6b6b;
	--wd-line: #e3e0dc;
	--wd-bg: #f6f4f1;
	--wd-card: #fff;
	--wd-accent: #000;
	--wd-error: #b3261e;
	--wd-error-bg: #fdecea;
	--wd-note-bg: #f6f4f1;
	--wd-ok: #2e7d32;

	margin: 24px auto 48px;
	color: var(--wd-ink);
}

/* The theme's .textblock styles lists and tables for articles; reset them here. */
.textblock .iem-wd ul,
.textblock .iem-wd ol {
	padding-left: 0;
	margin-left: 0;
}
.textblock .iem-wd li::before {
	content: none;
}

.iem-wd__card {
	max-width: 440px;
	margin: 0 auto;
	padding: 32px 24px;
	background: var(--wd-card);
	border: 1px solid var(--wd-line);
	box-sizing: border-box;
}
.iem-wd__card--wide {
	max-width: 720px;
}
@media (min-width: 768px) {
	.iem-wd__card {
		padding: 40px;
	}
}

.iem-wd__title {
	margin: 0 0 12px;
	font-size: 24px;
	line-height: 1.25;
	outline: none;
}
.iem-wd__intro {
	margin: 0 0 24px;
	color: var(--wd-muted);
}

/* Steps */
.iem-wd .iem-wd__steps {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	font-size: 13px;
	color: var(--wd-muted);
}
.iem-wd__steps li {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}
.iem-wd__steps li + li::before {
	content: "";
	display: block;
	width: 16px;
	height: 1px;
	background: var(--wd-line);
	margin-right: 2px;
}
.iem-wd__steps-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--wd-line);
	border-radius: 50%;
	font-size: 12px;
}
.iem-wd__steps .is-current {
	color: var(--wd-ink);
	font-weight: 600;
}
.iem-wd__steps .is-current .iem-wd__steps-num,
.iem-wd__steps .is-done .iem-wd__steps-num {
	background: var(--wd-accent);
	border-color: var(--wd-accent);
	color: #fff;
}
@media (max-width: 420px) {
	.iem-wd__steps-label {
		display: none;
	}
	.iem-wd__steps .is-current .iem-wd__steps-label {
		display: inline;
	}
}

/* Form */
.iem-wd__form .form-group {
	position: relative;
	margin-bottom: 20px;
}
/* The theme floats labels inside the inputs and hides them on focus; here they sit above. */
.iem-wd .form-group:not(.checkbox) > label {
	position: static !important;
	display: block;
	margin: 0 0 8px 2px;
	color: var(--wd-ink) !important;
	font-size: 14px;
	font-weight: 600;
	text-transform: none;
	white-space: normal !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}
/* The theme strips background and border from buttons in .form-group.sub. */
.iem-wd .form-group.sub {
	text-align: center;
}
.iem-wd .form-group.sub button.btn--black {
	background-color: #000;
	color: #fff;
	border: 1px solid #000;
	border-radius: 23px;
	padding: 15px 35px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s;
}
.iem-wd .form-group.sub button.btn--black:hover,
.iem-wd .form-group.sub button.btn--black:focus-visible {
	background-color: #fff;
	color: #000;
}
.iem-wd .form-group.sub button.btn--black:disabled {
	opacity: 0.6;
	cursor: wait;
}
.iem-wd__qty select {
	height: 40px;
	padding: 0 32px 0 16px;
	border: 1px solid #000;
	border-radius: 20px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center / 10px 6px;
	-webkit-appearance: none;
	appearance: none;
	color: #000;
	font-size: 15px;
	cursor: pointer;
}
.iem-wd__qty select:disabled {
	opacity: 0.4;
	cursor: default;
}
.iem-wd__form input[type="text"],
.iem-wd__form input[type="email"],
.iem-wd__form select,
.iem-wd__form textarea {
	width: 100%;
	box-sizing: border-box;
}
.iem-wd input::placeholder,
.iem-wd textarea::placeholder {
	color: #9a9a9a !important;
	opacity: 1;
}
.iem-wd__help {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: var(--wd-muted);
}
.iem-wd__row {
	display: grid;
	gap: 0 20px;
}
@media (min-width: 640px) {
	.iem-wd__row {
		grid-template-columns: 1fr 1fr;
	}
}
.iem-wd__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.iem-wd .btn--wide {
	display: block;
	width: 100%;
	cursor: pointer;
}
.iem-wd__aside {
	margin: 16px 0 0;
	font-size: 14px;
	text-align: center;
	color: var(--wd-muted);
}
.iem-wd__aside a {
	color: var(--wd-ink);
	text-decoration: underline;
}

/* Notices */
.iem-wd__notice {
	max-width: 720px;
	margin: 0 auto 16px;
	padding: 12px 16px;
	background: var(--wd-note-bg);
	border-left: 3px solid var(--wd-ink);
	font-size: 14px;
	box-sizing: border-box;
}
.iem-wd__notice p {
	margin: 0;
}
.iem-wd__notice p + p {
	margin-top: 6px;
}
.iem-wd__notice--error {
	background: var(--wd-error-bg);
	border-color: var(--wd-error);
	color: var(--wd-error);
}
.iem-wd__card .iem-wd__notice {
	margin: 0 0 20px;
}

/* Items */
.iem-wd__items {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--wd-line);
}
.iem-wd__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--wd-line);
}
.iem-wd__item.is-disabled {
	opacity: 0.6;
}
.iem-wd__item-main {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 280px;
	margin: 0;
	cursor: pointer;
	font-weight: normal;
}
.iem-wd__item.is-disabled .iem-wd__item-main {
	cursor: default;
}
.iem-wd__check {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--wd-accent);
}
.iem-wd__thumb {
	position: relative;
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: var(--wd-bg);
}
.iem-wd__thumb img {
	position: static !important;
	display: block;
	width: 56px !important;
	height: 56px !important;
	max-width: none;
	margin: 0 !important;
	object-fit: cover;
}
.iem-wd__item-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.iem-wd__item-name {
	font-weight: 600;
}
.iem-wd__item-meta,
.iem-wd__item-note {
	font-size: 13px;
	color: var(--wd-muted);
}
.iem-wd__item-note {
	font-style: italic;
}
.iem-wd__qty {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	font-size: 13px;
}
.iem-wd__qty label {
	margin: 0;
	color: var(--wd-muted);
}
.iem-wd__qty select {
	width: auto;
	min-width: 64px;
}

/* Summary */
.iem-wd__statement {
	margin: 0 0 20px;
	padding: 16px;
	background: var(--wd-bg);
}
.iem-wd__summary {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
	font-size: 15px;
}
.iem-wd__summary th,
.iem-wd__summary td {
	padding: 10px 8px 10px 0;
	border-bottom: 1px solid var(--wd-line);
	text-align: left;
}
.iem-wd__summary .num {
	text-align: right;
	white-space: nowrap;
	padding-right: 0;
}
.iem-wd__summary tfoot th,
.iem-wd__summary tfoot td {
	border-bottom: 0;
}
.iem-wd__facts {
	display: grid;
	grid-template-columns: minmax(120px, max-content) 1fr;
	gap: 8px 16px;
	margin: 0 0 28px;
	font-size: 15px;
}
.iem-wd__facts dt {
	color: var(--wd-muted);
}
.iem-wd__facts dd {
	margin: 0;
	word-break: break-word;
}
@media (max-width: 480px) {
	.iem-wd__facts {
		grid-template-columns: 1fr;
		gap: 2px;
	}
	.iem-wd__facts dd {
		margin-bottom: 10px;
	}
}

/* Own orders shortcut */
.iem-wd__own {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--wd-line);
}
.iem-wd__own h3 {
	margin: 0 0 12px;
	font-size: 16px;
}
.iem-wd__own ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.iem-wd__own li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	font-size: 14px;
}

/* Done */
.iem-wd__card--done {
	max-width: 600px;
	text-align: center;
}
.iem-wd__done-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--wd-bg);
	color: var(--wd-ok);
}
.iem-wd__reference {
	display: inline-block;
	margin: 8px 0 24px;
	padding: 10px 16px;
	background: var(--wd-bg);
	font-size: 16px;
}
.iem-wd__next {
	text-align: left;
}
.iem-wd__next h3 {
	margin: 0 0 8px;
	font-size: 16px;
}
.iem-wd .iem-wd__next ol {
	margin: 0;
	padding-left: 20px;
}
.iem-wd__next li {
	margin-bottom: 8px;
}
.iem-wd__next address {
	margin-top: 4px;
	font-style: normal;
	font-weight: 600;
}

/* My Account order detail */
.iem-wd-account {
	margin: 0 0 24px;
}
.iem-wd-account__record {
	margin: 0 0 8px;
	padding: 10px 14px;
	background: #f6f4f1;
	font-size: 14px;
}

/* IEM theme: its table styles (uppercase, wide padding, min widths) overflow on phones. */
.iem-wd table.iem-wd__summary {
	display: table;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100%;
	table-layout: auto;
	font-size: 14px;
}
.iem-wd .iem-wd__summary th,
.iem-wd .iem-wd__summary td {
	min-width: 0 !important;
	padding: 10px 8px 10px 0;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
	font-size: 14px;
}
.iem-wd .iem-wd__summary .num {
	width: 1%;
	white-space: nowrap;
}
