/* =========================
   Chat Toggle Button (matches theme-toggle & translate-btn)
   ========================= */
.eg-chat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}

@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(73, 181, 69, 0);
    border-color: rgba(255, 255, 255, 0.2);
  }
  25% {
    box-shadow: 0 0 0 6px rgba(73, 181, 69, 0.3);
    border-color: rgba(73, 181, 69, 0.6);
  }
  50% {
    box-shadow: 0 0 0 0 rgba(73, 181, 69, 0);
    border-color: rgba(73, 181, 69, 0.3);
  }
  75% {
    box-shadow: 0 0 0 4px rgba(73, 181, 69, 0.2);
    border-color: rgba(73, 181, 69, 0.5);
  }
}

.eg-chat-toggle:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-chat-toggle--active {
  background: rgba(73, 181, 69, 0.25) !important;
  border-color: #49b545 !important;
  color: #49b545 !important;
  animation: none;
}

.eg-chat-toggle__icon {
  display: block;
  width: 18px;
  height: 18px;
}

.eg-chat-toggle__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #23242a;
  font-size: 0;
  line-height: 0;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(239,68,68,.5);
  z-index: 2;
  animation: badgePulse 1.5s ease-in-out infinite;
}

.eg-chat-toggle__badge.eg-chat-badge--hidden {
  display: none !important;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 4px rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 10px rgba(239,68,68,.7); }
}

/* =========================
   Theme Toggle Button (base styles, dark states in dark-theme.css)
   ========================= */
.eg-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.eg-theme-toggle:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.eg-theme-toggle:active svg { transform: rotate(30deg); }
/* theme icons managed by JS (theme-toggle.js) */
.eg-theme-toggle__sun, .eg-theme-toggle__moon { /* display controlled by JS */ }

/* =========================
   Translate Button & Dropdown
   ========================= */
.eg-translate {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.eg-translate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.eg-translate__btn:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-translate__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #1e1f24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-header) + 5000);
}

.eg-translate__dropdown.is-open {
  display: block;
}

.eg-translate__label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* Hide default Google Translate widget - loaded off-screen for API access */
.eg-translate__dropdown #google_translate_element {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.eg-translate__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

/* Russian reset link - full width at top */
.eg-translate__lang--reset {
  grid-column: 1 / -1;
  background: rgba(73, 181, 69, 0.15);
  border: 1px solid rgba(73, 181, 69, 0.25);
  font-weight: 700 !important;
  margin-bottom: 4px;
  justify-content: center;
}

.eg-translate__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #e5e7eb !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.eg-translate__lang:hover {
  background: rgba(73, 181, 69, 0.2);
  text-decoration: none !important;
}

/* Hide old gtranslate-wrap if still present */
.gtranslate-wrap:not(.eg-translate) { display: none; }

/* =========================
   Profile & Category buttons
   ========================= */
.nav_profile,
.nav_cats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: calc(var(--z-header) + 4);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.nav_profile:hover,
.nav_cats:hover {
  background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.4);
  transform: translateY(-2px);
}

.nav_main {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-only {
  display: none;
}
