/* ==========================================================================
   WEGLOT-STYLE LANGUAGE SWITCHER & TRANSLATION STYLES
   Tapicería y Decoraciones Velazco — Palma de Mallorca
   Languages: Español (ES), English (EN), Deutsch (DE)
   Position: Top Right (Parte Superior Derecha)
   ========================================================================== */

/* 1. COMPLETELY REMOVE & HIDE ANY BOTTOM-LEFT FLOATING WIDGET */
.velazco-weglot-floating,
#velazcoWeglotFloating,
[id*="WeglotFloating"],
[class*="weglot-floating"],
div[style*="bottom: 24px"][style*="left: 24px"],
div[style*="bottom:24px"][style*="left:24px"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  z-index: -9999 !important;
}

/* Ensure header navigation aligns horizontally without breaking */
#menu-pulse-menu {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

#menu-item-lang-nav {
  margin-left: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* 2. TOP RIGHT WEGLOT SWITCHER (In Header Navigation) */
.velazco-nav-lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  z-index: 9999999 !important;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.velazco-weglot-container {
  position: relative;
  display: inline-block;
}

/* The Trigger Pill Button (Exact Style from Image: Dark, Gold Border, Flag, Full Name, Chevron) */
.velazco-nav-lang-btn,
.velazco-weglot-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #111215 !important;
  color: #ffffff !important;
  border: 1.5px solid #d4af37 !important;
  border-radius: 50px !important;
  padding: 8px 15px 8px 10px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.22) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  white-space: nowrap !important;
  font-family: inherit !important;
}

.velazco-nav-lang-btn:hover,
.velazco-weglot-btn:hover {
  background: #191b22 !important;
  border-color: #fff2c4 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.75), 0 0 18px rgba(212, 175, 55, 0.4) !important;
}

.velazco-nav-lang-btn:active,
.velazco-weglot-btn:active {
  transform: translateY(0) !important;
}

/* Flag Image */
.velazco-weglot-flag {
  width: 22px !important;
  height: 15px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 3px !important;
  object-fit: cover !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

/* Language Label (Full Name: Español / English / Deutsch in bold high-contrast text) */
.velazco-weglot-label,
#velazcoNavCurrentLabel,
#velazcoWeglotCurrentLabel {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #ffffff !important;
  line-height: 1 !important;
  text-transform: capitalize !important;
}

/* Rotating Gold Chevron Down Arrow */
.velazco-weglot-arrow {
  width: 10px !important;
  height: 6px !important;
  fill: none !important;
  stroke: #d4af37 !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  margin-left: 2px !important;
}

.velazco-weglot-container.is-open .velazco-weglot-arrow {
  transform: rotate(180deg) !important;
}

/* Dropdown Menu (Opens downwards from the Top-Right button) */
.velazco-weglot-dropdown {
  position: absolute !important;
  top: calc(100% + 9px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  min-width: 185px !important;
  background: rgba(14, 15, 19, 0.98) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.25) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px) scale(0.97) !important;
  transform-origin: top right !important;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s !important;
  pointer-events: none !important;
  z-index: 9999999 !important;
}

.velazco-weglot-container.is-open .velazco-weglot-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

/* Dropdown List Items */
.velazco-weglot-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.velazco-weglot-item {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.velazco-weglot-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  color: #d1d5db !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: all 0.18s ease !important;
  cursor: pointer !important;
}

.velazco-weglot-link:hover {
  background: rgba(212, 175, 55, 0.18) !important;
  color: #ffffff !important;
  transform: translateX(3px) !important;
}

.velazco-weglot-item.is-active .velazco-weglot-link {
  background: rgba(212, 175, 55, 0.24) !important;
  color: #fff2c4 !important;
  font-weight: 700 !important;
}

.velazco-weglot-check {
  margin-left: auto !important;
  font-size: 13px !important;
  color: #d4af37 !important;
  opacity: 0 !important;
  font-weight: bold !important;
  transform: scale(0.6) !important;
  transition: all 0.18s ease !important;
}

.velazco-weglot-item.is-active .velazco-weglot-check {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Weglot Brand Footer in dropdown */
.velazco-weglot-footer {
  margin-top: 5px !important;
  padding-top: 5px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  font-size: 10px !important;
  color: rgba(255, 255, 255, 0.45) !important;
}

.velazco-weglot-footer svg {
  height: 9px !important;
  width: auto !important;
  fill: rgba(212, 175, 55, 0.7) !important;
}

/* 3. FLUID TRANSITION ON LANGUAGE CHANGE */
body.velazco-translating {
  transition: opacity 0.14s ease-out;
  opacity: 0.88;
}

/* 4. RESPONSIVE / MOBILE OPTIMIZATIONS */
@media (max-width: 1024px) {
  .velazco-nav-lang-switcher {
    margin-left: 8px !important;
  }
  .velazco-nav-lang-btn {
    padding: 6px 12px 6px 8px !important;
    font-size: 12.5px !important;
  }
  .velazco-nav-lang-btn .velazco-weglot-flag {
    width: 20px !important;
    height: 14px !important;
  }
}
}
