/* MX Shipping Estimate: trigger button + popup. Colours follow the GeneratePress globals. */

.mx-se-trigger-wrap {
	margin: 1em 0;
}

.mx-se-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.6em 1em;
	border: 1px solid var(--button, #ae5530);
	border-radius: 4px;
	background: transparent;
	color: var(--button, #ae5530);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.mx-se-trigger:hover,
.mx-se-trigger:focus-visible {
	background: var(--button, #ae5530);
	color: #fff;
}

/*
 * [mx_pristatymo_skaiciuokle variant="floating"]: the pill left of the floating mini cart, in
 * the GeneratePress element "Floating mini cart" (a fixed flex row; the cart circle is 80px,
 * 60px on phones). The element places it; this only shapes it.
 */
.mx-se-trigger--floating {
	gap: 10px;
	height: 56px;
	padding: 0 22px 0 18px;
	border-width: 2px;
	border-radius: 28px;
	background: #fff;
	font-size: 16px;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.mx-se-trigger--floating svg {
	flex: none;
}

@media (max-width: 767px) {
	.mx-se-trigger--floating {
		gap: 8px;
		height: 48px;
		padding: 0 16px 0 14px;
		border-radius: 24px;
		font-size: 15px;
	}
}

/* Narrow phones: the truck alone, round like the cart. */
@media (max-width: 359px) {
	.mx-se-trigger--floating {
		justify-content: center;
		width: 48px;
		padding: 0;
	}

	.mx-se-trigger--floating span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media print {
	.mx-se-trigger--floating {
		display: none;
	}
}

.mx-se {
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	padding: 0;
	border: 0;
	border-radius: 8px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	color: var(--contrast, #222);
}

.mx-se::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

.mx-se__form {
	position: relative;
	margin: 0;
	padding: 24px;
}

.mx-se__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.mx-se__title {
	margin: 0 32px 8px 0;
	font-size: 1.3em;
}

.mx-se__intro {
	margin: 0 0 20px;
	color: #5c5550;
	line-height: 1.5;
}

.mx-se__label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-weight: 600;
}

/* The theme's fields are borderless on a light grey; the popup is white, so they need an edge. */
.mx-se .mx-se__input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #cfc6bf;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.mx-se .mx-se__input:hover {
	border-color: #a8998e;
}

.mx-se .mx-se__input:focus {
	border-color: var(--button, #ae5530);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(174, 85, 48, 0.18);
}

.mx-se .mx-se__input::placeholder {
	color: #8a8580;
}

.mx-se__combo {
	position: relative;
	margin-bottom: 16px;
}

.mx-se__suggestions {
	position: absolute;
	z-index: 2;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 240px;
	margin: 2px 0 0;
	padding: 4px 0;
	overflow-y: auto;
	list-style: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.mx-se__suggestions li {
	margin: 0;
	padding: 8px 12px;
	cursor: pointer;
}

.mx-se__suggestions li:hover,
.mx-se__suggestions li[aria-selected="true"] {
	background: #f3ece8;
}

.mx-se__qty {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

/* Cart / typed amount: a two-part switch instead of radio dots. */
.mx-se__seg {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin-bottom: 14px;
	padding: 4px;
	border-radius: 8px;
	background: #f1ece8;
}

.mx-se__qty.is-single .mx-se__seg {
	display: none;
}

/* Both halves as tall as the taller one (the cart half has a second line). */
.mx-se__seg-opt {
	position: relative;
	display: flex;
	margin: 0;
	cursor: pointer;
}

.mx-se__seg-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mx-se__seg-opt > span {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: center;
	padding: 10px 8px;
	border-radius: 6px;
	color: #5c5550;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.mx-se__seg-opt small {
	display: block;
	font-size: 0.85em;
	font-weight: 400;
}

.mx-se__seg-opt:hover span {
	color: var(--contrast, #222);
}

.mx-se__seg-opt input:checked + span {
	background: #fff;
	color: var(--button, #ae5530);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.mx-se__seg-opt input:focus-visible + span {
	outline: 2px solid var(--button, #ae5530);
	outline-offset: 2px;
}

.mx-se__m3 {
	position: relative;
	display: block;
}

.mx-se__qty.is-cart .mx-se__m3 {
	display: none;
}

.mx-se .mx-se__m3 .mx-se__input {
	padding-right: 48px;
}

.mx-se__unit {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	color: #8a8580;
	pointer-events: none;
}

.mx-se__submit {
	width: 100%;
	cursor: pointer;
}

.mx-se__submit.is-loading {
	opacity: 0.6;
	cursor: progress;
}

.mx-se__results:empty {
	display: none;
}

.mx-se__results {
	margin-top: 16px;
}

.mx-se__summary {
	margin: 0 0 8px;
}

.mx-se__rates {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.mx-se__rates li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid #e5e5e5;
}

.mx-se__price {
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.mx-se__price small {
	display: block;
	font-size: 0.8em;
	font-weight: 400;
	opacity: 0.7;
}

.mx-se__note {
	margin: 0;
	font-size: 0.9em;
	opacity: 0.8;
}

.mx-se__error {
	margin: 0 0 12px;
	color: #b32d2e;
}
