/* DPD parcelshop checkout picker. */

/*
 * 110: the picker sits on its own line under the chosen rate. It is rendered inside the rate's <li>
 * (`woocommerce_after_shipping_rate`), and themes such as Flatsome lay that <li> out as a flex row,
 * which put the picker beside the label and squeezed "dpd Paket shop: 4,00 €" onto three lines.
 */
li:has( > .wpdpd-pudo-picker ) {
	flex-wrap: wrap;
}

.wpdpd-pudo-picker {
	flex: 0 0 100%;
	width: 100%;
	margin: 4px 0 8px;
	text-align: left;
}

.woocommerce-shipping-methods .wpdpd-pudo-picker {
	padding-left: 1.75em;
	box-sizing: border-box;
}

/*
 * 110: a compact outline button in the theme's colour instead of the theme's full `.button` (on Flatsome:
 * uppercase, bold, 35 px high, a solid primary block that outshouted "Place order"). Doubled class for weight
 * over theme rules such as `.button` / `button.button`; the colour follows Flatsome's primary, else the text.
 * A shop can set its own with `--wpdpd-pudo-accent`.
 */
.wpdpd-pudo-picker .wpdpd-pudo-open.wpdpd-pudo-open {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	width: auto;
	max-width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0.5em 0.85em;
	border: 1px solid currentColor;
	background: transparent;
	box-shadow: none;
	text-shadow: none;
	color: var( --wpdpd-pudo-accent, var( --fs-color-primary, currentColor ) );
	font-family: inherit;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}

.wpdpd-pudo-picker .wpdpd-pudo-open.wpdpd-pudo-open:hover,
.wpdpd-pudo-picker .wpdpd-pudo-open.wpdpd-pudo-open:focus-visible {
	background: rgba( 127, 127, 127, 0.1 );
	color: var( --wpdpd-pudo-accent, var( --fs-color-primary, currentColor ) );
}

/* Flatsome gives `.button span` its own line-height (1.6); the button's own wins here. */
.wpdpd-pudo-picker .wpdpd-pudo-open .wpdpd-pudo-open-text {
	display: inline;
	line-height: inherit;
}

.wpdpd-pudo-pin {
	flex: 0 0 auto;
	width: 1.1em;
	height: 1.1em;
}

/* 110: the chosen point above the button, name on its own line (GLS order). */
.wpdpd-pudo-selected {
	margin: 0 0 6px;
	font-size: 0.875em;
	line-height: 1.35;
}

.wpdpd-pudo-selected .wpdpd-pudo-name {
	display: block;
}

.wpdpd-pudo-selected .wpdpd-pudo-address {
	display: block;
}

/* The "Selected pickup point:" lead-in is for screen readers; the point itself says enough on screen. */
.wpdpd-pudo-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

/* 097: why lockers are left out / why the pickup rate is missing. */
.wpdpd-pudo-notice {
	margin: 6px 0 0;
	font-size: 0.92em;
	line-height: 1.4;
	opacity: 0.85;
}

.wpdpd-pickup-excluded td {
	font-size: 0.92em;
	line-height: 1.4;
}

/* Widget modal */
.wpdpd-widget-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.55 );
	padding: 16px;
}

.wpdpd-widget-modal {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 920px;
	height: 80vh;
	max-height: 720px;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.35 );
}

.wpdpd-widget-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid #e2e2e2;
}

.wpdpd-widget-title {
	font-weight: 600;
}

.wpdpd-widget-close {
	border: 0;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 0 4px;
}

.wpdpd-widget-close:hover {
	color: #000;
}

/* 092: "DPD Paketomat" refuses a parcelshop picked on DPD's map (it has no lockers-only mode). */
.wpdpd-widget-refusal {
	margin: 0;
	padding: 8px 14px;
	background: #fcf0f1;
	border-bottom: 1px solid #f0c2c6;
	color: #8a1f2b;
	font-size: 14px;
}

.wpdpd-widget-refusal[hidden] {
	display: none;
}

.wpdpd-widget-iframe {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
}
