.language-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;   /* centers the whole block */
}

.language-label {
  font-weight: bold;
}

.language-picker {
  position: relative;
  z-index: 9999;
}

#lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0px solid #fff; 
  background: #fff;
  cursor: pointer;
  width: 180px;   /* gleiche Breite wie das Menü */ 
  height: 26px;
  justify-content: flex-start;
}


#lang-btn img {
  margin-right: 8px;
  margin-left: 2px;
  width: 20px;
  height: auto;
}

/*
.lang-icon-btn svg {
  color: #1e5fa8; 
}

.lang-icon-btn:hover svg {
  color: #3a7bd5;
}
*/

#lang-menu {
  position: absolute;
  top: 100%;
  left: -5px;  /* relative position of menu towards **** thingy picker  */
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ccc;
  background: #fff;
  width: 190px;  /*180ox*/

  /* animation base state */
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.45s ease, transform 0.25s ease;
  pointer-events: none; /* no clicks when hidden */
}

/* visible state: when .hidden is removed */
#lang-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* no display: none anywhere */



#lang-menu li {
  padding: 5px 22px;           /* erster Wert ist höhe des Menüs, 2ter Wert ist einzug links */
}

#lang-menu li img {
  width: 22px;               /* grösse der Falggen im Deskotp Menu */
  margin-left: 10px;
  vertical-align: middle;

  /*width: 16px; */                 
  margin-right: 13px;   /* nähe der Flaggen zum Text im Menü */
}

#lang-menu li:hover {
  background: #f0f0f0;
}


#lang-menu li,
#lang-menu li a {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* svg  css */

.lang-icon-btn {
  width: 180px;
  height: 26px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  justify-content: flex-start;
}

.lang-icon-btn svg {
  flex-shrink: 0;
}

.lang-icon-btn img {
  width: 16px;
  height: auto;
}

/* svg no centering */

.lang-icon-btn,
.lang-icon-btn * {
  text-align: left !important;
  justify-content: flex-start !important;
}




/* Override any global `.hidden { display:none; }` for the language menu */
#lang-menu.hidden {
  display: block !important;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

/* Visible state */
#lang-menu:not(.hidden) {
  display: block; /* keep it explicit */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}



/* Hover opens the menu */
.language-picker:hover #lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* But only if it's not manually hidden */
#lang-menu.hidden {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}


.lang-icon-btn #current-flag {
  width: 23px;   /* your choice */
  height: auto;
}




@media (max-width: 767px) {
   #lang-btn,
  .lang-icon-btn {
    width: 190px !important;   /* or 100% if you prefer full width */
    min-width: 190px;
    box-sizing: border-box;
  }

  .lang-icon-btn #current-flag {
  width: 21px;   /* your choice */
  height: auto;
}

  #lang-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
  }

  #lang-btn img {
  /*margin-right: 8px;*/
  margin-left: 8px;
  }

#lang-menu {
  width: 190px;
  left: 0px;
}

  #lang-menu li {
    padding: 10px 20px;  /* erster Wert ist höhe des Menüs, 2ter Wert ist einzug links */
    font-size: 14px;   /* font-size menu mobile */
  }

  #lang-menu li img {
    width: 25px;   /* mobile size of flags in menu*/
     margin-right: 13px;   /* nähe der Flaggen zum Text im Menü */
  }
}

.lang-center { 
  width: 100%; 
  display: flex; 
  justify-content: center; 
}


.lang-icon-btn .lang-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.arrow-down {
  margin-left: auto;   /* pushes arrow to the far right */
  flex-shrink: 0;
  color: #444;         /* adjust arrow color here */
}



#lang-btn {
  justify-content: space-between;
}
#lang-btn span {
  flex-grow: 1;
}


