/*
 * xsnus Checkout: the country drop-down with flags above the Qliro payment, drawn like a field of
 * Qliro's own iframe (measured on Qliro Checkout 1.235): Inter, a box 12px in from the iframe edges,
 * 80px high, the label small inside the box, the flag in Qliro's icon column, the name where Qliro's
 * text starts. Colours and corner radius follow Qliro's appearance settings (Qliro → Checkout
 * customization), printed by Country_Field as --xco-q-bg, --xco-q-primary and --xco-q-radius; Qliro
 * derives its border and grey text from the background colour the same way as below.
 * Qliro's icon column holds a globe (IBM Carbon "earth", Apache-2.0, assets/icons/Carbon-LICENSE.txt,
 * the icon set Qliro uses), the flag sits in front of the country name.
 * The native select stays in the form (Qliro reads it) but is not shown.
 */
@font-face { font-family: "xco-inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "xco-inter"; src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.xco-country.xco-country.xco-country {
	--xco-q-bg-c: var(--xco-q-bg, #fff);
	--xco-q-border: color-mix(in srgb, var(--xco-q-bg-c) 88.7%, #000);
	--xco-q-weak: color-mix(in srgb, var(--xco-q-bg-c) 37%, #000);
	--xco-q-hover: color-mix(in srgb, var(--xco-q-bg-c) 95%, #000);
	--xco-q-globe: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2032%2032%22%3E%3Cpath%20d=%22M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm5,3.1055a12.0136,12.0136,0,0,1,2.9158,1.8994L23.5034,8H21ZM13.3784,27.7026A11.9761,11.9761,0,0,1,8.1157,6.9761L9.4648,9h3.3423l-1.5,4H7.2793L5.8967,17.1475,8.4648,21h5l1.4319,2.1475ZM16,28c-.2034,0-.4016-.02-.6025-.03l1.3967-4.19a1.9876,1.9876,0,0,0-.2334-1.7412l-1.4319-2.1475A1.9962,1.9962,0,0,0,13.4648,19h-3.93L8.1033,16.8525,8.7207,15H11v2h2V14.1812l2.9363-7.83-1.8726-.7022L13.5571,7H10.5352L9.728,5.7891A11.7941,11.7941,0,0,1,19,4.395V8a2.0025,2.0025,0,0,0,2,2h2.5857A1.9865,1.9865,0,0,0,25,9.4141l.1406-.1407.2818-.68A11.9813,11.9813,0,0,1,27.3,12H22.5986a1.9927,1.9927,0,0,0-1.9719,1.665L20.03,17.1064a1.99,1.99,0,0,0,.991,2.086l2.1647,1.4638,1.4585,3.646A11.9577,11.9577,0,0,1,16,28Zm8.8145-8.6563L22.1,17.5088l-.1-.06L22.5986,14h5.2207a11.743,11.743,0,0,1-1.7441,8.4951Z%22/%3E%3C/svg%3E");
	position: relative; box-sizing: border-box; width: 100%; max-width: 520px; margin: 0 auto 12px; padding: 0 12px;
	font-family: "xco-inter", Inter, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 16px; color: #000; text-align: left;
}

/* Label: Qliro's small label inside a filled box (13px, grey, 54px from the box edge). */
.xco-country.xco-country.xco-country > label {
	position: absolute; z-index: 1; top: 21px; left: calc(12px + 55px); right: calc(12px + 44px);
	display: block; margin: 0; padding: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
	font: inherit; font-size: 13px; line-height: 13px; font-weight: 400; color: var(--xco-q-weak); pointer-events: none;
}

.xco-country .xco-country__native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; white-space: nowrap !important; }
.xco-country__picker { position: relative; }

/* The box: Qliro's input wrapper. */
.xco-country.xco-country .xco-country__button {
	position: relative; display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; height: 80px; margin: 0;
	padding: 36px 44px 20px 54px;
	background: var(--xco-q-bg-c); color: #000;
	border: 1px solid var(--xco-q-border); border-radius: var(--xco-q-radius, 8px); box-shadow: none; outline: none;
	font: inherit; font-size: 16px; line-height: 22px; font-weight: 400; letter-spacing: normal; text-transform: none; text-align: left;
	cursor: pointer; transition: border-color .15s ease;
}
.xco-country.xco-country .xco-country__button:hover { background: var(--xco-q-bg-c); color: #000; }
.xco-country.xco-country .xco-country__button:focus-visible, .xco-country.xco-country .xco-country__picker.is-open .xco-country__button { border-color: var(--xco-q-primary, #000); }

/* Qliro's icon column: 20px icon, 15px from the box edge, in Qliro's icon grey. */
.xco-country.xco-country .xco-country__button::before {
	content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none;
	background-color: var(--xco-q-weak);
	-webkit-mask: var(--xco-q-globe) center / 20px 20px no-repeat; mask: var(--xco-q-globe) center / 20px 20px no-repeat;
}
.xco-country__flag { flex: none; width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.xco-country__name { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chevron on the right; none when there is only one country. */
.xco-country__picker:not(.is-single) .xco-country__button::after {
	content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
	border-right: 1.5px solid var(--xco-q-weak); border-bottom: 1.5px solid var(--xco-q-weak); transform: rotate(45deg); transition: transform .15s;
}
.xco-country__picker.is-open .xco-country__button::after { margin-top: -2px; transform: rotate(-135deg); }
.xco-country.xco-country .xco-country__picker.is-single .xco-country__button { cursor: default; padding-right: 15px; }

/* The list: a Qliro popout box under the field. */
.xco-country__list {
	position: absolute; z-index: 100; left: 0; right: 0; top: calc(100% + 4px);
	box-sizing: border-box; max-height: 320px; margin: 0; padding: 4px; overflow-y: auto; list-style: none;
	background: var(--xco-q-bg-c); border: 1px solid var(--xco-q-border); border-radius: var(--xco-q-radius, 8px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.xco-country__list[hidden] { display: none; }
.xco-country__list li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 10px 14px 50px; border-radius: max(0px, calc(var(--xco-q-radius, 8px) - 4px)); font-size: 16px; line-height: 22px; color: #000; cursor: pointer; }
.xco-country__list li.is-active, .xco-country__list li:hover { background: var(--xco-q-hover); }
.xco-country__list li[aria-selected="true"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--xco-q-primary, #000); }
