/* ==========================================================================
   Paxrank Language Switcher
   ========================================================================== */

/* Shared base */
.paxrank-switcher {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	line-height: 1;
}

.paxrank-switcher .paxrank-flag--small {
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
	flex-shrink: 0;
}

.paxrank-switcher--no-names .paxrank-flag--small {
	margin-right: 0;
}

.paxrank-switcher__label {
	vertical-align: middle;
}

/* ==========================================================================
   Horizontal style
   ========================================================================== */

.paxrank-switcher--horizontal {
	flex-wrap: wrap;
	gap: 4px 12px;
}

.paxrank-switcher--horizontal .paxrank-switcher__item {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	padding: 4px 0;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

.paxrank-switcher--horizontal .paxrank-switcher__item:hover {
	opacity: 0.75;
}

.paxrank-switcher--horizontal .paxrank-switcher__item--current {
	font-weight: 600;
	border-bottom-color: currentColor;
}

/* ==========================================================================
   Dropdown style
   ========================================================================== */

.paxrank-switcher--dropdown {
	position: relative;
}

.paxrank-switcher__trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	cursor: pointer;
	font-size: inherit;
	color: inherit;
	line-height: 1;
	transition: opacity 0.15s ease;
}

.paxrank-switcher__trigger:hover {
	opacity: 0.75;
}

.paxrank-switcher__trigger .paxrank-flag--small {
	margin-right: 0;
}

.paxrank-switcher__chevron {
	display: inline-block;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.paxrank-switcher__trigger[aria-expanded="true"] .paxrank-switcher__chevron {
	transform: rotate(180deg);
}

/* Dropdown menu */
.paxrank-switcher__menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 9999;
	min-width: 100%;
	list-style: none;
	margin: 0;
	padding: 4px 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.paxrank-switcher__menu[hidden] {
	display: none;
}

.paxrank-switcher__option a {
	display: flex;
	align-items: center;
	padding: 8px 14px;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
	transition: background 0.1s ease;
}

.paxrank-switcher__option a:hover {
	background: #f5f5f5;
}

.paxrank-switcher__option--current a {
	font-weight: 600;
	background: #f0f0f0;
}

.paxrank-switcher__option--current a:hover {
	background: #e8e8e8;
}
