/*
 * BlueX PUDO modal — classic (shortcode) checkout.
 *
 * Native <dialog> styled for the pickup-point picker iframe and the
 * "Seleccionar / Cambiar punto" link rendered below the bluex-pudo rate.
 * The dialog is appended to document.body so it survives WC's AJAX
 * rebuilds of #order_review.
 *
 * Note on !important usage on .bluex-pudo-change-link: WC themes (Astra
 * in particular) apply heavy primary-button styles to any <button> inside
 * the order review (e.g. "Place order" treatment — dark blue fill, white
 * text, full width). Without !important on background/color/padding/border
 * /width, the theme wins on specificity and the link renders as an
 * unreadable solid-blue block.
 */

/* ---------------------------------------------------------------------------
   Dialog
   --------------------------------------------------------------------------- */

.bluex-pudo-dialog {
	border: none;
	border-radius: 12px;
	padding: 0;
	width: min(1100px, 94vw);
	max-width: 1100px;
	max-height: 92vh;
	overflow: hidden;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
	background: #fff;
}

.bluex-pudo-dialog::backdrop {
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(2px);
}

.bluex-pudo-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 22px;
	border-bottom: 1px solid #e5e7eb;
	background: #fff;
}

.bluex-pudo-dialog__title {
	font-size: 17px;
	font-weight: 600;
	margin: 0;
	color: #111827;
	line-height: 1.3;
}

.bluex-pudo-dialog__close {
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 6px 10px;
	border-radius: 6px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bluex-pudo-dialog__close:hover,
.bluex-pudo-dialog__close:focus {
	background: #f3f4f6;
	color: #111827;
	outline: none;
}

.bluex-pudo-dialog__body {
	padding: 0;
	margin: 0;
	background: #fff;
}

.bluex-pudo-dialog__body iframe {
	display: block;
	width: 100%;
	height: 720px;
	border: none;
}

/* ---------------------------------------------------------------------------
   "Seleccionar / Cambiar punto" link below the rate label
   --------------------------------------------------------------------------- */

button.bluex-pudo-change-link,
.bluex-pudo-change-link {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	margin: 10px 0 6px 28px !important;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	color: #1d4ed8 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 1px solid #93c5fd !important;
	border-radius: 6px !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer !important;
	font-family: inherit !important;
	box-shadow: none !important;
	text-shadow: none !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	text-align: left !important;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

button.bluex-pudo-change-link:hover,
button.bluex-pudo-change-link:focus,
.bluex-pudo-change-link:hover,
.bluex-pudo-change-link:focus {
	color: #ffffff !important;
	background: #1d4ed8 !important;
	background-color: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	text-decoration: none !important;
	outline: none !important;
	box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25) !important;
}

button.bluex-pudo-change-link::before,
.bluex-pudo-change-link::before {
	content: "" !important;
	display: inline-block !important;
	width: 14px !important;
	height: 14px !important;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231d4ed8'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: contain !important;
	flex-shrink: 0 !important;
	transition: background-image 0.15s ease !important;
}

button.bluex-pudo-change-link:hover::before,
button.bluex-pudo-change-link:focus::before,
.bluex-pudo-change-link:hover::before,
.bluex-pudo-change-link:focus::before {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") !important;
}

/* ---------------------------------------------------------------------------
   Mobile: dialog goes near-fullscreen so the iframe has room to breathe.
   --------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.bluex-pudo-dialog {
		width: 100vw;
		max-width: 100vw;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
		margin: 0;
	}

	.bluex-pudo-dialog__body iframe {
		height: calc(100vh - 60px);
	}

	button.bluex-pudo-change-link,
	.bluex-pudo-change-link {
		margin-left: 24px !important;
		font-size: 14px !important;
	}
}
