/*
Theme Name: One-Cosmetics
Author: Keydev
Description: One Cosmetics theme based on popular Kadence
Version: 1.0
Template: kadence

This is the child theme for Kadence theme, generated with Generate Child Theme plugin by catchthemes.

(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/

/* --------------------------------------------------------------------------
   Przełączniki języka i waluty w nagłówku
   --------------------------------------------------------------------------
   Oba mają wyglądać identycznie i jak pozycja menu: flaga/kod, tekst, strzałka
   w jednej linii, bez ramki i bez tła.

   Trzy rzeczy wymagają nadpisania, bo WPML i WCML dokładają własne arkusze
   o wyższej specyficzności niż ustawienia widgetów w Elementorze:
   • WPML renderuje pełną nazwę języka i nie ma opcji skrótu — nazwę ukrywamy,
     a dwuliterowy kod wstawiamy jako ::before kotwicy (kolejność robi flexbox);
   • obie wtyczki pozycjonują strzałkę absolutnie w prawym rogu, przez co
     nachodziła na tekst — przywracamy ją do toku linii;
   • WCML rysuje ramkę wokół aktywnej waluty, a obie dokładają szare tła.
   -------------------------------------------------------------------------- */
.wpml-elementor-ls,
.wpml-elementor-ls .wpml-ls,
.wpml-elementor-ls .wpml-ls-sub-menu,
.elementor-widget-wp-widget-currency_sel_widget,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-active-currency,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu {
	width: auto;
	min-width: 0;
	border: 0;
	background: transparent;
	flex-shrink: 0;
	white-space: nowrap;
}

/* Rząd mobilny nagłówka ma align-items: normal (desktopowy ma center),
   więc niższe od ikon przełączniki nie trafiały w ich oś pionową.
   Centrujemy zawartość kontenera, który je zawiera — bez wiązania się
   z generowanymi identyfikatorami Elementora i bez ruszania innych rzędów. */
.e-con:has(> .elementor-widget-wpml-language-switcher),
.e-con:has(> .elementor-widget-wp-widget-currency_sel_widget),
.elementor-element:has(> .elementor-widget-wpml-language-switcher),
.elementor-element:has(> .elementor-widget-wp-widget-currency_sel_widget) {
	align-items: center;
}

.elementor-widget-wpml-language-switcher > .elementor-widget-container,
.elementor-widget-wp-widget-currency_sel_widget > .elementor-widget-container {
	display: flex;
	align-items: center;
}

.wpml-elementor-ls .wpml-ls > ul,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher > ul {
	display: flex;
	flex-wrap: nowrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Wspólna typografia obu przełączników — jak w menu nagłówka. */
.wpml-elementor-ls .wpml-ls-legacy-dropdown-click a,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher a {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
	padding: 4px 2px;
	border: 0;
	background: transparent;
	font-family: "Semplicita Pro", sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	color: #000;
}

.wpml-elementor-ls .wpml-ls-flag {
	display: block;
	order: 1;
	width: 18px;
	height: auto;
	margin: 0;
}

/* Pełna nazwa języka ustępuje miejsca dwuliterowemu kodowi. */
.wpml-elementor-ls .wpml-ls-native,
.wpml-elementor-ls .wpml-ls-display {
	display: none;
}

.wpml-elementor-ls .wpml-ls-legacy-dropdown-click a::before {
	order: 2;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .04em;
}

.wpml-elementor-ls .wpml-ls-item-en > a::before { content: "EN"; }
.wpml-elementor-ls .wpml-ls-item-pl > a::before { content: "PL"; }
.wpml-elementor-ls .wpml-ls-item-de > a::before { content: "DE"; }
.wpml-elementor-ls .wpml-ls-item-es > a::before { content: "ES"; }

/* Strzałki obu przełączników wracają do toku linii.
   Selektory celowo rozbudowane — wtyczki pozycjonują je absolutnie. */
.wpml-elementor-ls .wpml-ls-legacy-dropdown-click a.wpml-ls-item-toggle::after,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher a.wcml-cs-item-toggle::after {
	order: 3;
	position: static;
	top: auto;
	right: auto;
	margin: 0 0 0 1px;
	align-self: center;
	border-top-color: #000;
}

/* Rozwinięte listy: jedna ramka wokół całości, białe tło.
   WCML i WPML rysują ramkę na KAŻDEJ pozycji listy — nałożona na zewnętrzną
   dawała drabinkę pudełek, więc wewnętrzne kasujemy. */
.wpml-elementor-ls .wpml-ls-sub-menu,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu {
	border: 1px solid #e8e8e8;
	background: #fff;
	padding: 0;
	margin: 0;
	list-style: none;
}

.wpml-elementor-ls .wpml-ls-sub-menu li,
.wpml-elementor-ls .wpml-ls-sub-menu li a,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu li,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu li a {
	border: 0;
	margin: 0;
	background: #fff;
}

/* Cienka kreska tylko między pozycjami, zamiast ramki dookoła każdej. */
.wpml-elementor-ls .wpml-ls-sub-menu li + li,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu li + li {
	border-top: 1px solid #f0f0f0;
}

.wpml-elementor-ls .wpml-ls-legacy-dropdown-click .wpml-ls-sub-menu a,
.elementor-widget-wp-widget-currency_sel_widget .wcml-cs-submenu a {
	padding: 8px 12px;
	color: #000;
	background: transparent;
}

/* Bez szarych teł na najechaniu — sam kolor tekstu wystarczy za sygnał. */
.wpml-elementor-ls .wpml-ls-legacy-dropdown-click a:hover,
.wpml-elementor-ls .wpml-ls-legacy-dropdown-click a:focus,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher a:hover,
.elementor-widget-wp-widget-currency_sel_widget .wcml_currency_switcher a:focus {
	color: #000;
	background: transparent;
	opacity: .6;
}
