/* Google Translate Widget Styles */
.translate-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
}

/* Fixed position fallback widget */
.translate-widget-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: white;
  padding: 10px 15px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
}

.translate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.translate-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.translate-btn i {
  font-size: 14px;
}

/* For dashboard/user pages */
.dashboard-nav .translate-widget {
  margin-left: auto;
  margin-right: 12px;
}

.dashboard-nav .translate-btn {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

.dashboard-nav .translate-btn:hover {
  background: rgba(102, 126, 234, 0.2);
}

/* Google Translate dropdown styling override */
.goog-te-gadget {
  font-family: inherit !important;
}

.goog-te-gadget-simple {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 13px !important;
}

.goog-te-gadget-simple .goog-te-menu-value {
  color: inherit !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
  color: inherit !important;
}

.goog-te-gadget-icon {
  display: none !important;
}

/* Hide Google Translate top bar */
.goog-te-banner-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

/* Custom dropdown styling */
#google_translate_element select {
  padding: 8px 30px 8px 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  outline: none;
  /* Allow native dropdown behavior for scrolling */
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  min-width: 150px;
  max-width: 200px;
  transition: all 0.3s ease;
}

#google_translate_element select:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

#google_translate_element select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Hide "Powered by Google" text */
.goog-logo-link,
.goog-te-gadget span {
  display: none !important;
}

#google_translate_element .goog-te-gadget {
  font-size: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .translate-widget {
    margin: 10px 0;
    width: 100%;
  }
  
  #google_translate_element select {
    width: 100%;
  }
  
  .dashboard-nav .translate-widget {
    margin: 0;
    margin-bottom: 10px;
  }
}
