/* ── Language dropdown ───────────────────────────────────────────────── */

/* hide original Elementor buttons while JS is loading to avoid flash */
#language .elementor-widget-button { display: none; }

/* ── Dropdown wrapper ─────────────────────────────────────────────── */
.lang-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ── Toggle button ────────────────────────────────────────────────── */
.lang-dd__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 6px;
  padding: 5px 10px 5px 8px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.lang-dd__toggle:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.lang-dd__flag  { font-size: 16px; line-height: 1; }
.lang-dd__label { font-size: 12px; font-weight: 700; }

.lang-dd__chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.lang-dd__toggle[aria-expanded="true"] .lang-dd__chevron {
  transform: rotate(180deg);
}

/* ── Dropdown menu ────────────────────────────────────────────────── */
.lang-dd__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 9999;
  overflow: hidden;
}

.lang-dd__menu--open {
  display: block;
  animation: langDropIn 0.15s ease;
}

@keyframes langDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Menu items ───────────────────────────────────────────────────── */
.lang-dd__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #222;
  text-align: left;
  transition: background 0.15s;
  white-space: nowrap;
}

.lang-dd__item:hover {
  background: #f5f5f5;
}

.lang-dd__item--active {
  font-weight: 700;
  color: #8B6914;  /* olive gold */
  background: #fdf8f0;
}

.lang-dd__item--active::after {
  content: '✓';
  margin-left: auto;
  font-size: 12px;
  color: #8B6914;
}

/* ── Mobile canvas menu layout ────────────────────────────────────── */
.elementor-canvas-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* On mobile the dropdown would clip on the right – open to the left instead */
.elementor-canvas-menu-wrapper .lang-dd__menu {
  right: auto;
  left: 0;
}

/* ── WhatsApp / JoinChat mobile fixes ────────────────────────────────── */

/* 1) Move the floating button to the LEFT on mobile */
@media (max-width: 1024px) {
  .joinchat {
    right: auto !important;
    left: var(--sep, 6px) !important;
  }
  .joinchat__button {
    right: auto !important;
    left: 8px !important;
    /* Explicit background-image so the WhatsApp icon always renders,
       bypassing any CSS-variable resolution issue on mobile WebKit */
    background-color: #25d366 !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0s4.686 12.283 0 16.97a12 12 0 0 1-13.754 2.299l-5.814.735a.392.392 0 0 1-.438-.44l.748-5.788A12 12 0 0 1 3.517 3.517zm3.61 17.043.3.158a9.85 9.85 0 0 0 11.534-1.758c3.843-3.843 3.843-10.074 0-13.918s-10.075-3.843-13.918 0a9.85 9.85 0 0 0-1.747 11.554l.16.303-.51 3.942a.196.196 0 0 0 .219.22zm6.534-7.003-.933 1.164a9.84 9.84 0 0 1-3.497-3.495l1.166-.933a.79.79 0 0 0 .23-.94L9.561 6.96a.79.79 0 0 0-.924-.445l-2.023.524a.797.797 0 0 0-.588.88 11.754 11.754 0 0 0 10.005 10.005.797.797 0 0 0 .88-.587l.525-2.023a.79.79 0 0 0-.445-.923L14.6 13.327a.79.79 0 0 0-.94.23z'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-size: 60% !important;
    background-repeat: no-repeat !important;
  }
  /* Tooltip: flip to right-of-button when button is on the left */
  .joinchat__tooltip {
    right: auto !important;
    left: calc(var(--s, 60px) + 16px) !important;
  }
  .joinchat__tooltip::after {
    right: auto !important;
    left: -6px !important;
    border-width: 6px 8px 6px 0 !important;
    border-left-color: transparent !important;
    border-right-color: #fff !important;
  }
}
