/* Bestlab shipping rules — cart / checkout shipping rows and the GLS picker. */

/* The order summary / cart totals: rows as flex lines instead of a two-column
   table, so the shipping row can take the full width — its choices do not fit
   in the narrow value column. */
.blf-checkout__summary .woocommerce-checkout-review-order-table,
.blf-checkout__summary .woocommerce-checkout-review-order-table :is(thead,tbody,tfoot){display:block}
.blf-checkout__summary .woocommerce-checkout-review-order-table tr{display:flex;align-items:stretch}
.blf-checkout__summary .woocommerce-checkout-review-order-table tr > :first-child{flex:1 1 auto;min-width:0}
.blf-checkout__summary .woocommerce-checkout-review-order-table tr > :last-child:not(:first-child){flex:0 0 auto;max-width:60%}
.blf-checkout__summary table.woocommerce-checkout-review-order-table td.product-name{width:auto}
/* The cart's totals table turns responsive (th hidden, td stacked) on phones — leave that alone */
@media (min-width:769px){
	.woocommerce-cart .cart_totals table.shop_table,
	.woocommerce-cart .cart_totals table.shop_table tbody{display:block}
	.woocommerce-cart .cart_totals table.shop_table tr{display:flex;align-items:stretch}
	.woocommerce-cart .cart_totals table.shop_table tr > :first-child{flex:1 1 auto;min-width:0}
	.woocommerce-cart .cart_totals table.shop_table tr > :last-child:not(:first-child){flex:0 0 auto;max-width:60%}
}

/* …and the shipping row itself: heading on top, choices under it, full width */
.blf-checkout__summary .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals{flex-direction:column;align-items:stretch}
.blf-checkout__summary .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > *{flex:none!important;max-width:none!important;width:auto}
.blf-checkout__summary .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td{text-align:left;border-top:0;padding-top:0}
@media (min-width:769px){
	.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals{flex-direction:column;align-items:stretch}
	.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals > *{flex:none!important;max-width:none!important;width:auto}
	.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals > td{text-align:left;border-top:0;padding-top:0}
}

/* Shipping choices — one card each, the whole card clickable */
tr.woocommerce-shipping-totals ul#shipping_method{list-style:none;margin:2px 0 0;padding:0;display:grid;gap:10px;text-align:left}
tr.woocommerce-shipping-totals ul#shipping_method li{
	position:relative;display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:center;
	margin:0;padding:14px 16px;text-indent:0;border:1.5px solid #dde3ec;border-radius:12px;background:#fff;
	line-height:1.35;color:#0B2C5A;cursor:pointer;
	transition:border-color .15s,box-shadow .15s,background-color .15s;
}
tr.woocommerce-shipping-totals ul#shipping_method li:hover{border-color:#a9bbd3}
tr.woocommerce-shipping-totals ul#shipping_method li:has(input:checked){
	border-color:#1858A8;background:#f4f8fd;box-shadow:0 0 0 3px rgba(24,88,168,.12);
}
tr.woocommerce-shipping-totals ul#shipping_method li:has(input:focus-visible){outline:2px solid #1858A8;outline-offset:2px}

/* Radio, drawn by hand */
tr.woocommerce-shipping-totals ul#shipping_method li input.shipping_method{
	-webkit-appearance:none;appearance:none;grid-column:1;margin:0;
	width:20px;height:20px;border:2px solid #b9c6d8;border-radius:50%;background:#fff;
	cursor:pointer;transition:border-color .15s,box-shadow .15s;
}
tr.woocommerce-shipping-totals ul#shipping_method li input.shipping_method:checked{
	border-color:#1858A8;background:#1858A8;box-shadow:inset 0 0 0 4px #fff;
}
/* A lone method has a hidden input instead of a radio */
tr.woocommerce-shipping-totals ul#shipping_method li input[type="hidden"] + label{grid-column:1 / -1}

tr.woocommerce-shipping-totals ul#shipping_method li label{
	grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:12px;
	margin:0;font-weight:700;font-size:.95rem;cursor:pointer;
}
/* Stretch the label over the card, so a click anywhere picks it */
tr.woocommerce-shipping-totals ul#shipping_method li label::after{content:"";position:absolute;inset:0;border-radius:inherit}
.blf-ship-name{min-width:0}
.blf-ship-price{flex:none;white-space:nowrap;font-weight:700;color:#0B2C5A}
tr.woocommerce-shipping-totals ul#shipping_method li .amount{white-space:nowrap;font-weight:700}

.blf-ship-free{
	display:inline-block;padding:3px 10px;border-radius:999px;
	background:#e7f6ec;color:#1b7a3d;font-size:.76rem;font-weight:700;letter-spacing:.01em;line-height:1.3;
}
.blf-ship-desc{grid-column:2;margin:4px 0 0;font-size:.84rem;font-weight:400;line-height:1.45;color:#5b6b80}

.blf-pp{grid-column:2;position:relative;z-index:1;cursor:auto;margin:10px 0 0;padding:10px 12px;border:1px dashed #b9c6d8;border-radius:8px;background:#f6f8fb;font-weight:400}
.blf-pp__chosen{font-size:.88rem;line-height:1.45;color:#33445a;margin-bottom:8px}
.blf-pp__chosen strong{color:#0B2C5A}
.blf-pp.is-missing{border-color:#E8550D;background:#fff6f1}
.blf-pp__btn{
	display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid #E8550D;border-radius:7px;
	background:#fff;color:#E8550D;font-weight:700;font-size:.86rem;cursor:pointer;line-height:1.2;
}
.blf-pp__btn:hover{background:#E8550D;color:#fff}
.blf-pp__btn[disabled]{opacity:.6;cursor:wait}

.blf-pp-order{margin:24px 0}

/* „Csomagpontba nem fér” — under the shipping choices */
tr.blf-ship-note td{display:block;width:100%;padding:8px 12px!important;border-radius:8px;background:#fff6f1;border:1px solid #f5c8ae!important;color:#7a3208;font-size:.84rem;line-height:1.45;text-align:left}

/* Our own picker modal: Foxpost's map iframe, the MPL list */
body.blf-ppm-open{overflow:hidden}
.blf-ppm{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(11,44,90,.55)}
.blf-ppm[hidden]{display:none}
.blf-ppm__box{display:flex;flex-direction:column;width:min(720px,100%);max-height:min(760px,100%);background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.blf-ppm.is-frame .blf-ppm__box{width:min(1100px,100%);height:min(760px,100%)}
.blf-ppm__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #e3e8ef;color:#0B2C5A}
.blf-ppm__x{border:0;background:none;font-size:28px;line-height:1;color:#5b6b80;cursor:pointer;padding:0 4px}
.blf-ppm__x:hover{color:#E8550D}
.blf-ppm__body{flex:1 1 auto;min-height:0;overflow:auto}
.blf-ppm__frame{display:block;width:100%;height:100%;min-height:520px;border:0}

.blf-mpl{padding:14px 16px 16px}
.blf-mpl__bar{display:flex;gap:8px}
.blf-mpl__q{flex:1 1 auto;min-width:0;padding:10px 12px;border:1.5px solid #c9d3e0;border-radius:8px;font-size:1rem}
.blf-mpl__q:focus{outline:none;border-color:#1858A8;box-shadow:0 0 0 3px rgba(24,88,168,.15)}
.blf-mpl__near{flex:none;padding:0 14px;border:1px solid #1858A8;border-radius:8px;background:#fff;color:#1858A8;font-weight:700;cursor:pointer}
.blf-mpl__near:hover{background:#1858A8;color:#fff}
.blf-mpl__msg{margin:10px 0 6px;font-size:.88rem;color:#5b6b80}
.blf-mpl__msg:empty{display:none}
.blf-mpl__list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}
.blf-mpl__row{display:grid;grid-template-columns:1fr auto;gap:2px 12px;width:100%;padding:10px 12px;border:1.5px solid #dde3ec;border-radius:10px;background:#fff;text-align:left;cursor:pointer;color:#0B2C5A;font:inherit}
.blf-mpl__row:hover,.blf-mpl__row:focus-visible{border-color:#1858A8;background:#f4f8fd;outline:none}
.blf-mpl__name{grid-column:1;font-weight:700}
.blf-mpl__addr{grid-column:1;font-size:.88rem;color:#33445a}
.blf-mpl__meta{grid-column:1;font-size:.78rem;color:#5b6b80}
.blf-mpl__pick{grid-column:2;grid-row:1 / span 3;align-self:center;padding:6px 10px;border-radius:7px;background:#E8550D;color:#fff;font-weight:700;font-size:.82rem;white-space:nowrap}
@media (max-width:600px){
	.blf-ppm{padding:0}
	.blf-ppm__box,.blf-ppm.is-frame .blf-ppm__box{width:100%;height:100%;max-height:none;border-radius:0}
	.blf-mpl__row{grid-template-columns:1fr}
	.blf-mpl__pick{grid-column:1;grid-row:auto;justify-self:start;margin-top:6px}
}
