/**
 * TRP Expanded Floater — minimize control + open-state helpers.
 */

.trp-floating-switcher.trp-ls-expanded-by-default .trp-language-switcher-inner {
	position: relative;
	padding-right: 30px;
}

.trp-ls-minimize-toggle {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--text, currentColor);
	cursor: pointer;
	line-height: 1;
}

.trp-ls-minimize-toggle:hover,
.trp-ls-minimize-toggle:focus-visible {
	background: var(--bg-hover, rgba(0, 0, 0, 0.06));
	outline: none;
}

.trp-ls-minimize-toggle:focus-visible {
	outline: 2px solid var(--text, currentColor);
	outline-offset: 1px;
}

.trp-ls-minimize-toggle .trp-ls-icon {
	display: none;
	flex-shrink: 0;
	box-sizing: border-box;
}

.trp-ls-minimize-toggle .trp-ls-icon[hidden] {
	display: none !important;
}

/* Hyphen */
.trp-ls-minimize-toggle .trp-ls-icon-minimize {
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background-color: currentColor;
}

/* Hollow square */
.trp-ls-minimize-toggle .trp-ls-icon-expand {
	width: 12px;
	height: 12px;
	border: 2px solid currentColor;
	border-radius: 1px;
	background: transparent;
}

/* Fully open: hyphen only. Collapsed: square only. */
.trp-floating-switcher.trp-ls-expanded-by-default.is-open:not(.trp-ls-user-minimized)
	.trp-ls-minimize-toggle
	.trp-ls-icon-minimize:not([hidden]) {
	display: block !important;
}

.trp-floating-switcher.trp-ls-expanded-by-default.trp-ls-user-minimized
	.trp-ls-minimize-toggle
	.trp-ls-icon-expand:not([hidden]),
.trp-floating-switcher.trp-ls-expanded-by-default:not(.is-open)
	.trp-ls-minimize-toggle
	.trp-ls-icon-expand:not([hidden]) {
	display: block !important;
}

/* Ensure open list scrolls like TranslatePress’s native open state. */
.trp-floating-switcher.trp-ls-expanded-by-default.is-open .trp-switcher-dropdown-list {
	overflow-y: auto;
	max-height: min(350px, 70vh);
}

/* Active language marker — gold dot, only while persistently open. */
.trp-floating-switcher.trp-ls-expanded-by-default .trp-language-item__current {
	position: relative;
}

.trp-floating-switcher.trp-ls-expanded-by-default.is-open:not(.trp-ls-user-minimized)
	.trp-language-item__current::after {
	content: '';
	position: absolute;
	top: 50%;
	right: -20px; /* sits in the inner’s right padding, left of the toggle */
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #c9a227;
	box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.3);
	pointer-events: none;
}

.trp-floating-switcher.trp-ls-expanded-by-default.trp-ls-user-minimized
	.trp-language-item__current::after,
.trp-floating-switcher.trp-ls-expanded-by-default:not(.is-open)
	.trp-language-item__current::after {
	content: none;
	display: none;
}
