/* InPost Points Picker — front-end */

.ipp-wrap {
	margin: 10px 0 4px;
}

.ipp-selected {
	display: block;
	padding: 10px 12px;
	margin-bottom: 8px;
	border: 1px solid #d8dde3;
	border-left: 4px solid #ffcd00;
	border-radius: 4px;
	background: #fafbfc;
	font-size: .92em;
	line-height: 1.45;
}

.ipp-selected__label {
	display: block;
	font-size: .82em;
	text-transform: uppercase;
	letter-spacing: .04em;
	opacity: .65;
}

.ipp-selected__code {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ipp-open {
	cursor: pointer;
}

/* W Checkout Blocks przycisk przejmuje klasy przycisku zamówienia w wariancie
   outlined, więc dziedziczy styl motywu — dokładamy tylko pełną szerokość. */
.ipp-wrap .ipp-open--block {
	width: 100%;
	box-sizing: border-box;
}

/* Zapasowy wygląd, gdyby motyw nie stylował wariantu outlined.
   :where() ma zerową specyficzność, więc reguły motywu zawsze wygrywają. */
:where(.ipp-wrap .ipp-open--block) {
	background: transparent;
	border: 2px solid currentColor;
	color: inherit;
}

/* --- Modal ------------------------------------------------------------ */

.ipp-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.ipp-modal.is-open {
	display: block;
}

.ipp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.ipp-modal__box {
	position: absolute;
	inset: 3vh 3vw;
	display: flex;
	flex-direction: column;
	max-width: 1100px;
	margin: 0 auto;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.ipp-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #e6e9ec;
}

.ipp-modal__head h3 {
	margin: 0;
	font-size: 1.05rem;
}

.ipp-modal__close {
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	color: #444;
}

.ipp-modal__body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}

.ipp-modal__side {
	width: 340px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #e6e9ec;
	min-height: 0;
}

.ipp-search {
	display: flex;
	gap: 6px;
	padding: 10px;
	border-bottom: 1px solid #eef0f2;
}

.ipp-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #ccd2d8;
	border-radius: 4px;
	font-size: .95em;
}

.ipp-search__btn {
	flex: 0 0 auto;
	padding: 8px 14px;
	border: 0;
	border-radius: 4px;
	background: #1f2933;
	color: #fff;
	cursor: pointer;
}

.ipp-list {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 6px;
}

.ipp-list__msg {
	padding: 16px;
	color: #6b7681;
	font-size: .92em;
}

.ipp-item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 12px;
	margin-bottom: 4px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: #f7f8f9;
	cursor: pointer;
	font: inherit;
	line-height: 1.4;
}

.ipp-item:hover,
.ipp-item:focus {
	background: #fff7d6;
	border-color: #ffcd00;
}

.ipp-item__code {
	display: block;
	font-weight: 700;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .9em;
}

.ipp-item__addr,
.ipp-item__desc,
.ipp-item__dist {
	display: block;
	font-size: .86em;
	color: #4a5560;
}

.ipp-item__desc {
	font-style: italic;
}

.ipp-item__dist {
	margin-top: 2px;
	opacity: .7;
}

.ipp-map {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.ipp-map__canvas {
	position: absolute;
	inset: 0;
}

.ipp-map__refresh {
	position: absolute;
	z-index: 500;
	left: 50%;
	top: 12px;
	transform: translateX(-50%);
	padding: 7px 14px;
	border: 1px solid #ccd2d8;
	border-radius: 20px;
	background: #fff;
	cursor: pointer;
	font-size: .88em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.ipp-marker span {
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #ffcd00;
	border: 3px solid #1f2933;
	box-sizing: content-box;
}

.ipp-popup {
	font-size: .92em;
	line-height: 1.45;
}

.ipp-popup__btn {
	margin-top: 8px;
	padding: 7px 12px;
	border: 0;
	border-radius: 4px;
	background: #ffcd00;
	color: #1f2933;
	font-weight: 700;
	cursor: pointer;
}

body.ipp-noscroll {
	overflow: hidden;
}

@media (max-width: 782px) {
	.ipp-modal__box {
		inset: 0;
		border-radius: 0;
	}

	.ipp-modal__body {
		flex-direction: column;
	}

	.ipp-modal__side {
		width: auto;
		border-right: 0;
		border-bottom: 1px solid #e6e9ec;
		max-height: 45%;
	}

	.ipp-map {
		flex: 1 1 55%;
		min-height: 240px;
	}
}
