/* Opener — sit in the Porto header icon row like my-account / mini-cart */

.piglet-cs-opener {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin: 0;
	padding: 0;
	line-height: 1;
	position: relative;
	z-index: 5;
	pointer-events: auto;
	color: inherit;
}

#header .elementor-widget-shortcode,
#header .elementor-widget-text-editor {
	display: inline-flex;
	align-items: center;
	align-self: center;
}

.elementor-shortcode .piglet-cs-opener,
.elementor-widget-shortcode .piglet-cs-opener,
.elementor-widget-text-editor .piglet-cs-opener,
.elementor-widget-shortcode .elementor-shortcode {
	margin: 0;
	padding: 0;
	line-height: 1;
}

#header .piglet-cs-opener .switcher-opener,
.piglet-cs-opener .switcher-opener {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	/* Match Porto header icon widgets (search / account / cart). */
	min-height: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #fff;
	font-family: var(--porto-body-ff, Poppins, sans-serif);
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 32px;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	white-space: nowrap;
	pointer-events: auto;
	appearance: none;
	-webkit-appearance: none;
}

#header .piglet-cs-opener .switcher-opener:hover,
.piglet-cs-opener .switcher-opener:hover,
#header .piglet-cs-opener .switcher-opener:focus,
.piglet-cs-opener .switcher-opener:focus {
	color: inherit;
	opacity: 0.8;
	outline: none;
	background: transparent;
}

#header .piglet-cs-opener .switcher-opener:hover,
#header .piglet-cs-opener .switcher-opener:focus {
	color: #fff;
}

.piglet-cs-opener .switcher-opener__label {
	display: inline;
	pointer-events: none;
}

/* Same caret family as Porto menus / show-arrow */
.piglet-cs-opener .switcher-opener .porto-icon-angle-down {
	display: inline-block;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1;
	speak: never;
	pointer-events: none;
	position: relative;
	top: 1px;
}

/* Modal */

.country-selector {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.country-selector[hidden] {
	display: none !important;
}

.country-selector__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.45);
	backdrop-filter: blur(2px);
}

.country-selector__inner {
	position: relative;
	z-index: 1;
	width: min(1120px, 100%);
	max-height: min(90vh, 860px);
	overflow: auto;
	background: #fff;
	color: #1a1a1a;
	border-radius: 4px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
	padding: 2.5rem 2.75rem 2.75rem;
	-webkit-overflow-scrolling: touch;
}

.country-selector__inner > .close {
	position: absolute;
	top: 1.1rem;
	right: 1.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #000;
	cursor: pointer;
}

.country-selector__inner > .close:hover {
	opacity: 0.65;
}

.country-selector__inner > h2 {
	margin: 0 0 2rem;
	padding: 0 1.5rem 0 0;
	text-align: center;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
	font-weight: 500;
	letter-spacing: 0.01em;
	color: #2a2a2a;
}

.country-lists {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.25rem 2rem;
}

.country-lists .title {
	margin: 0 0 0.85rem;
	font-family: var(--porto-body-ff, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	color: #111;
}

.country-lists ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.country-lists li {
	margin: 0 0 0.45rem;
	padding: 0;
}

.country-lists a.country-link {
	color: #333;
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.35;
}

.country-lists a.country-link:hover,
.country-lists a.country-link.is-active {
	text-decoration: underline;
	color: #000;
}

.country-lists ul.columns {
	column-count: 2;
	column-gap: 1.75rem;
}

.country-lists .piglet-cs-desktop {
	display: none;
}

.country-lists .piglet-cs-mobile {
	display: block;
}

.country-lists details {
	border-bottom: 1px solid #e8e8e8;
	padding: 0.35rem 0;
}

.country-lists details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	list-style: none;
	cursor: pointer;
	padding: 0.85rem 0;
	margin: 0;
}

.country-lists details summary::-webkit-details-marker {
	display: none;
}

.country-lists details summary .arrow {
	display: inline-flex;
	width: 1.1rem;
	height: 1.1rem;
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.country-lists details[open] summary .arrow {
	transform: rotate(180deg);
}

.country-lists details ul {
	padding: 0 0 1rem;
}

@media (min-width: 992px) {
	.country-lists {
		grid-template-columns: 0.9fr 1.5fr 1fr 0.85fr;
		align-items: start;
		gap: 0 2.5rem;
	}

	.country-lists .piglet-cs-desktop {
		display: block;
	}

	.country-lists .piglet-cs-mobile {
		display: none;
	}

	.country-selector__inner {
		padding: 2.75rem 3rem 3rem;
	}
}

body.piglet-cs-modal-open {
	overflow: hidden;
}
