/*
 Theme Name:   Belicia Child Theme
 Theme URI:    http://belicia.ancorathemes.com/
 Description:  Belicia Child Theme
 Author:       AncoraThemes
 Author URI:   http://ancorathemes.com/
 Template:     belicia
 Version:      1.0.0
 Tags: hotel, resort, luxury, hotel resort, luxury resort, private resort, private island, vip transfer, tourism, private tour, tours, travel, tourism, booking, accommodation
 Text Domain:  belicia
*/


/* =Theme customization starts here
------------------------------------------------------------ */
/* Force transparency for ALL switcher elements */
#jpod_lang_switch nav.cpel-switcher__nav,
#jpod_lang_switch nav.cpel-switcher__nav * {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Base container */
#jpod_lang_switch .cpel-switcher__nav {
  position: relative;
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Toggle button */
#jpod_lang_switch .cpel-switcher__toggle {
  padding: 0.3em 0.5em;
  display: flex;
  align-items: center;
  gap: 0.3em;
  cursor: pointer;
}

/* Flag */
#jpod_lang_switch .cpel-switcher__flag img {
  width: 1em !important; /* smaller flag */
  height: auto !important;
  border-radius: 2px !important;
  display: block !important;
}

/* Language code */
#jpod_lang_switch .cpel-switcher__code {
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1;
}

/* Caret icon */
#jpod_lang_switch .cpel-switcher__icon {
  font-size: 0.65em;
  transition: transform 0.3s ease;
}

#jpod_lang_switch .cpel-switcher__toggle--on .cpel-switcher__icon {
  transform: rotate(180deg);
}

/* Dropdown list - enhanced compact animation */
#jpod_lang_switch .cpel-switcher__list {
  position: absolute;
  top: calc(100% + 0.25em);
  left: 0;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 100%;
  max-width: 100vw;

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;

  transform: translateY(-4px) scaleY(0.96);
  transform-origin: top;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease,
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 9999;
}

#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list {
  max-height: 150px; /* smaller for compact dropdown */
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scaleY(1);
}

/* Dropdown items */
#jpod_lang_switch .cpel-switcher__list li a {
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.3em 0.5em !important; /* tighter padding */
  text-decoration: none !important;
  color: inherit !important;
  font-size: 0.85em !important;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Staggered item animation when open */
#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list li a {
  opacity: 1;
  transform: translateY(0);
}

#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list li:nth-child(1) a { transition-delay: 0.03s; }
#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list li:nth-child(2) a { transition-delay: 0.06s; }
#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list li:nth-child(3) a { transition-delay: 0.09s; }
#jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list li:nth-child(4) a { transition-delay: 0.12s; }

/* Responsive adjustments */
@media (max-width: 600px) {
  #jpod_lang_switch .cpel-switcher__nav {
    width: 100%;
  }

  #jpod_lang_switch .cpel-switcher__toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.5em 0.6em;
    touch-action: manipulation; /* better tap response */
  }

  #jpod_lang_switch .cpel-switcher__list {
    position: absolute;
    top: calc(100% + 0.25em);
    left: 0;
    right: auto;
    min-width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  #jpod_lang_switch .cpel-switcher__toggle--on + .cpel-switcher__list {
    max-height: 180px; /* slightly more for mobile */
  }
}
