/* Bots & Beyond – Delivery & Pickup */

:root {
	--bab-dp-accent: var(--fs-color-primary, var(--primary-color, #91988a));
	--bab-dp-free: #2e7d32;
	--bab-dp-border: #dcdfd8;
	--bab-dp-tint: #f5f6f3;
}

/* ---------- Option cards (cart + checkout, incl. Flatsome's shipping__list markup) ---------- */

#shipping_method {
	margin: 0;
	padding: 0;
}

#shipping_method > li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 12px;
	margin: 0 0 10px;
	padding: 12px 14px;
	border: 1px solid var(--bab-dp-border);
	border-radius: 8px;
	background: #fff;
	text-align: left;
	list-style: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#shipping_method > li:last-child {
	margin-bottom: 0;
}

#shipping_method > li:hover {
	border-color: var(--bab-dp-accent);
}

/* Selected card – or the only option offered (WooCommerce then uses a hidden input). */
#shipping_method > li:has(input:checked),
#shipping_method > li:has(input[type="hidden"]) {
	border: 2px solid var(--bab-dp-accent);
	padding: 11px 13px;
	background: var(--bab-dp-tint);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#shipping_method > li > input[type="radio"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--bab-dp-accent);
	cursor: pointer;
}

#shipping_method > li > label {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	opacity: 1;
	font-weight: 400;
	cursor: pointer;
}

.bab-dp-opt {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.bab-dp-opt__icon {
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	background-color: var(--bab-dp-accent);
	-webkit-mask: var(--bab-dp-icon) center / contain no-repeat;
	mask: var(--bab-dp-icon) center / contain no-repeat;
}

.bab-dp-opt--delivery .bab-dp-opt__icon {
	--bab-dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h12v11H2z'/%3E%3Cpath d='M14 9h4l3.5 3.5V16H14z'/%3E%3Ccircle cx='6' cy='18' r='2' fill='white'/%3E%3Ccircle cx='17.5' cy='18' r='2' fill='white'/%3E%3C/svg%3E");
}

.bab-dp-opt--pickup .bab-dp-opt__icon {
	--bab-dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M3 9h18v2a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z'/%3E%3Cpath d='M5 13v8h14v-8'/%3E%3Cpath d='M10 21v-5h4v5'/%3E%3C/svg%3E");
}

.bab-dp-opt__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.bab-dp-opt__title {
	font-weight: 700;
	font-size: 1.05em;
	color: #222;
}

.bab-dp-opt__desc {
	margin-top: 2px;
	font-size: 0.85em;
	color: #666;
}

.bab-dp-opt__desc .amount {
	margin-left: 0 !important;
	font-weight: 600;
	color: var(--bab-dp-free);
}

.bab-dp-opt__price {
	flex: 0 0 auto;
	margin-left: auto;
	font-weight: 700;
	white-space: nowrap;
	text-align: right;
}

.bab-dp-free {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 4px;
	background: var(--bab-dp-free);
	color: #fff;
	font-weight: 700;
	font-size: 0.8em;
	letter-spacing: 0.05em;
	line-height: 1.6;
}

/* ---------- Pickup details ---------- */

/* Stand-alone (thank-you page, My Account order view). */
.bab-dp-pickup {
	margin: 0 0 24px;
	padding: 16px 18px;
	max-width: 560px;
	border: 2px solid var(--bab-dp-accent);
	border-left-width: 6px;
	border-radius: 8px;
	background: var(--bab-dp-tint);
	text-align: left;
	white-space: normal;
	line-height: 1.45;
}

/* Inside the selected Local Pickup card: full width under the option. */
#shipping_method .bab-dp-pickup {
	flex: 0 0 100%;
	max-width: none;
	margin: 12px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--bab-dp-border);
	border-radius: 6px;
	background: #fff;
}

.bab-dp-pickup p {
	margin: 0 0 6px;
}

.bab-dp-pickup__heading {
	font-weight: 700;
	font-size: 1.05em;
	color: #222;
}

.bab-dp-pickup__heading::before {
	content: "\2713";
	margin-right: 6px;
	color: var(--bab-dp-free);
}

.bab-dp-pickup__label {
	font-size: 0.85em;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.bab-dp-pickup__address {
	font-weight: 700;
	font-size: 1.05em;
	color: #222;
}

.bab-dp-pickup__note {
	font-size: 0.9em;
	font-style: italic;
	color: #555;
}

.bab-dp-pickup .bab-dp-pickup__button {
	display: inline-block;
	margin-top: 6px;
	padding: 9px 20px;
	border-radius: 4px;
	background: var(--bab-dp-accent);
	color: #fff;
	font-weight: 700;
	font-size: 0.85em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
}

.bab-dp-pickup .bab-dp-pickup__button:hover,
.bab-dp-pickup .bab-dp-pickup__button:focus {
	color: #fff;
	filter: brightness(0.9);
}

/* ---------- Spend-more message ---------- */

.bab-dp-nudge-row td {
	padding: 8px 0 !important;
	border-bottom: 0 !important;
	text-align: left !important;
}

.bab-dp-nudge {
	padding: 8px 12px;
	border-radius: 6px;
	background: #fff8e1;
	border: 1px dashed #e0a800;
	text-align: center;
	font-size: 0.9em;
}

/* ---------- Small screens ---------- */

@media (max-width: 549px) {
	#shipping_method > li {
		padding: 10px 12px;
		gap: 0 10px;
	}

	#shipping_method > li:has(input:checked),
	#shipping_method > li:has(input[type="hidden"]) {
		padding: 9px 11px;
	}

	.bab-dp-opt {
		gap: 10px;
	}

	.bab-dp-opt__icon {
		flex-basis: 24px;
		width: 24px;
		height: 24px;
	}
}
