/*
Theme Name:   Lifex Theme
Theme URI:    
Description:  Tema hijo de Hello Elementor para Lifex
Author:       Refineria
Author URI:   refineria.es
Template:     hello-elementor
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  lifex-theme
Tags:         elementor, child-theme
*/

/* ============================================================
   LIFEX LANG SWITCHER — CSS Custom Properties
   Sobreescribir desde Elementor > Custom CSS del contenedor:
   selector { --lx-ls-bg: #000; --lx-ls-color: #fff; ... }
   ============================================================ */

.lifex-lang-switcher {
	--lx-ls-bg:           transparent;
	--lx-ls-color:        currentColor; /* hereda el color del contenedor Elementor */
	--lx-ls-hover-color:  #0D3F44;
	--lx-ls-dropdown-bg:  #1e1e1e;
	--lx-ls-font-size:    14px;
	--lx-ls-radius:       6px;
	--lx-ls-padding:      6px 10px;

	position: relative;
	display: inline-block;
	font-family: inherit;
}

/* Botón principal */
.lifex-lang-switcher .lifex-lang-current {
	display:        inline-flex;
	align-items:    center;
	gap:            6px;
	background:     var(--lx-ls-bg);
	color:          var(--lx-ls-color);
	font-size:      var(--lx-ls-font-size);
	border-radius:  var(--lx-ls-radius);
	padding:        var(--lx-ls-padding);
	border:         none;
	cursor:         pointer;
	font-family:    inherit;
	font-weight:    600;
	color:          var(--lx-ls-color) !important; /* rompe reset del tema padre */
	letter-spacing: 0.05em;
	transition:     color 0.2s ease;
}

.lifex-lang-switcher .lifex-lang-current:hover {
	color: var(--lx-ls-hover-color);
}

/* Icono flecha — rotación cuando abierto */
.lifex-lang-switcher .lifex-lang-arrow {
	display:    inline-flex;
	align-items: center;
	transition: transform 0.2s ease;
}

.lifex-lang-switcher.lifex-ls-open .lifex-lang-arrow {
	transform: rotate(180deg);
}

/* Dropdown */
.lifex-lang-switcher .lifex-lang-dropdown {
	display:          none;
	position:         absolute;
	top:              calc(100% + 4px);
	left:             0;
	min-width:        100%;
	background:       var(--lx-ls-dropdown-bg);
	border-radius:    var(--lx-ls-radius);
	list-style:       none;
	margin:           0;
	padding:          4px 0;
	z-index:          9999;
	box-shadow:       0 4px 12px rgba(0,0,0,0.25);
}

.lifex-lang-switcher.lifex-ls-open .lifex-lang-dropdown {
	display: block;
}

.lifex-lang-switcher .lifex-lang-dropdown li a {
	display:      block;
	padding:      var(--lx-ls-padding);
	color:        var(--lx-ls-color) !important; /* rompe colores de enlace del tema */
	font-size:    var(--lx-ls-font-size);
	font-weight:  600;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-align:   center;
	transition:   color 0.2s ease;
}

.lifex-lang-switcher .lifex-lang-dropdown li a:hover {
	color: var(--lx-ls-hover-color);
}

/* Fallback sin WPML (solo visible para editores) */
.lifex-lang-no-wpml {
	display:     inline-flex;
	align-items: center;
	gap:         8px;
	opacity:     1;
	font-size:   16px;
	font-weight: 400;
	color:       #fff;
}
