/* =============================================
   MMJ CONSULTANCY SERVICES
   widgets.css — WhatsApp bubble + Lang switcher
   ============================================= */

/* ─────────────────────────────────────────────
   GOOGLE TRANSLATE — hide default toolbar
───────────────────────────────────────────── */
#gt-hidden-container,
.goog-te-banner-frame,
.skiptranslate { display: none !important; }

body { top: 0 !important; }   /* prevent GT from pushing body down */

.goog-te-combo { display: none !important; }  /* hide the stock select */

/* ─────────────────────────────────────────────
   LANGUAGE SWITCHER BUTTON + DROPDOWN
───────────────────────────────────────────── */
.lang-switcher {
  position: relative;
  z-index: 950;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--ink-100);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease-fast);
  white-space: nowrap;
}
.lang-btn:hover {
  border-color: var(--mmj-blue);
  color: var(--mmj-blue);
  background: var(--surface-tint);
}

.lang-flag  { font-size: 1rem; line-height: 1; }
.lang-label { font-size: var(--text-xs); font-weight: 600; }

.lang-chevron {
  font-size: 0.6rem;
  color: var(--ink-300);
  transition: transform var(--ease-base);
  margin-left: 2px;
}
.lang-switcher.open .lang-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 1000;
}
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-dropdown-header {
  padding: 0.6rem 1rem;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  background: var(--surface-page);
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lang-dropdown-header i { color: var(--mmj-blue); }

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink-700);
  text-align: left;
  transition: background var(--ease-fast);
  border-bottom: 1px solid var(--ink-050);
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover    { background: var(--surface-tint); }
.lang-option.active   {
  background: var(--surface-tint);
  color: var(--mmj-blue);
  font-weight: 600;
}
.lang-option.active::after {
  content: '✓';
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--mmj-blue);
}

.lang-option .lang-flag        { font-size: 1.1rem; }
.lang-option-label             { font-weight: 500; flex: 1; }
.lang-option-native            {
  font-size: var(--text-xs);
  color: var(--ink-300);
  margin-left: auto;
  font-weight: 400;
}

/* ─────────────────────────────────────────────
   WHATSAPP "HAPPY TO HELP" FLOATING WIDGET
───────────────────────────────────────────── */
#wa-widget {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 990;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
#wa-widget.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wa-bubble {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  position: relative;
  cursor: pointer;
}

/* Icon circle */
.wa-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease;
  z-index: 2;
  position: relative;
}
.wa-bubble:hover .wa-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

.wa-icon {
  font-size: 1.8rem;
  color: white;
  line-height: 1;
}

/* Pulse ring animation */
.wa-pulse-ring {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(37,211,102,0.35);
  animation: waPulse 2s ease-out infinite;
  z-index: 1;
}
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Label pill */
.wa-label {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px 12px 12px 0;
  padding: 0.45rem 0.9rem 0.45rem 0.75rem;
  margin-left: -10px;
  padding-left: 18px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.13);
  line-height: 1.3;
  transform: translateX(0);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}

/* Show label on hover */
.wa-bubble:hover .wa-label,
#wa-widget.expanded .wa-label {
  max-width: 180px;
  opacity: 1;
  pointer-events: auto;
}

.wa-label-top {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1a1a;
  font-family: var(--font-body);
}
.wa-label-bottom {
  font-size: 0.7rem;
  color: #25D366;
  font-weight: 600;
  font-family: var(--font-body);
}

/* Auto-expand on first load, then collapse */
#wa-widget.auto-expand .wa-label {
  max-width: 180px;
  opacity: 1;
}

/* ─────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
───────────────────────────────────────────── */
@media (max-width: 768px) {
  #lang-switcher-mount {
    order: -1;  /* Move before hamburger on mobile */
  }

  .lang-btn .lang-label { display: none; }  /* show flag only on mobile */
  .lang-btn { padding: 0.4rem 0.55rem; gap: 0; }
  .lang-flag { font-size: 1.15rem; }

  .lang-dropdown {
    right: auto;
    left: 0;
    min-width: 190px;
    transform-origin: top left;
  }

  #wa-widget { bottom: 20px; right: 16px; }
  .wa-icon-wrap { width: 52px; height: 52px; }
  .wa-pulse-ring { width: 52px; height: 52px; }
  .wa-icon { font-size: 1.55rem; }

  /* Always show label on mobile (no hover) */
  .wa-label {
    max-width: 160px;
    opacity: 1;
    pointer-events: auto;
    border-radius: 10px 10px 10px 0;
  }
  .wa-pulse-ring { animation: none; }
}

/* ═══════════════════════════════════════════════
   MMJ PRELOADER
   Full-screen branded loading screen.
   Fades out after page load + minimum display time.
   ═══════════════════════════════════════════════ */

#mmj-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #0D2B5E 0%, #071830 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

#mmj-preloader.pl-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Pulse rings ── */
.pl-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pl-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(29, 79, 145, 0.22);
  animation: plRingPulse 2.6s ease-in-out infinite;
}
.pl-ring:nth-child(1) { width: 340px; height: 340px; animation-delay: 0s;    }
.pl-ring:nth-child(2) { width: 250px; height: 250px; animation-delay: 0.45s; border-color: rgba(29,79,145,0.16); }
.pl-ring:nth-child(3) { width: 160px; height: 160px; animation-delay: 0.9s;  border-color: rgba(29,79,145,0.10); }

@keyframes plRingPulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.07); opacity: 1; }
}

/* ── Center content ── */
.pl-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* ── Logo image (replaces animated letters) ── */
.pl-logo-img-wrap {
  margin-bottom: 18px;
  opacity: 0;
  transform: scale(0.7);
  animation: plLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.2s;
}
.pl-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  /* Subtle glow on dark bg */
  filter: drop-shadow(0 0 24px rgba(200,35,42,0.35))
          drop-shadow(0 0 48px rgba(29,79,145,0.25));
}
@keyframes plLogoIn {
  to { opacity: 1; transform: scale(1); }
}

/* ── Brand name ── */
.pl-brand {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: plFadeUp 0.5s ease forwards;
  animation-delay: 0.72s;
  margin-bottom: 8px;
}

/* ── Tagline ── */
.pl-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  animation: plFadeUp 0.5s ease forwards;
  animation-delay: 0.92s;
  margin-bottom: 40px;
}

@keyframes plFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Progress bar ── */
.pl-bar-track {
  width: 130px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: plFadeUp 0.4s ease forwards;
  animation-delay: 1.22s;
}
.pl-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1D4F91, #E8353D);
  border-radius: 2px;
  animation: plBarGrow 1.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 1.28s;
}
@keyframes plBarGrow {
  0%   { width: 0%; }
  55%  { width: 70%; }
  85%  { width: 88%; }
  100% { width: 100%; }
}

/* ── Dot indicators ── */
.pl-dots {
  display: flex;
  gap: 7px;
  margin-top: 14px;
  opacity: 0;
  animation: plFadeUp 0.4s ease forwards;
  animation-delay: 1.22s;
}
.pl-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  animation: plDotPulse 1.4s ease-in-out infinite;
}
.pl-dot:nth-child(1) { animation-delay: 1.4s; }
.pl-dot:nth-child(2) { animation-delay: 1.6s; }
.pl-dot:nth-child(3) { animation-delay: 1.8s; }

@keyframes plDotPulse {
  0%, 100% { background: rgba(255,255,255,0.22); transform: scale(1);   }
  50%       { background: rgba(255,255,255,0.9);  transform: scale(1.5); }
}

/* ── Registration badge ── */
.pl-reg {
  position: absolute;
  bottom: 28px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  opacity: 0;
  animation: plFadeUp 0.5s ease forwards;
  animation-delay: 1.4s;
}

/* ── Mobile scale down ── */
@media (max-width: 480px) {
  .pl-logo-img      { width: 80px; height: 80px; }
  .pl-tagline       { font-size: 14px; margin-bottom: 32px; }
  .pl-ring:nth-child(1) { width: 260px; height: 260px; }
  .pl-ring:nth-child(2) { width: 190px; height: 190px; }
  .pl-ring:nth-child(3) { width: 120px; height: 120px; }
}
