/* Hide Google Translate UI chrome */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.skiptranslate.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
div#goog-gt- {
  display: none !important;
}

body {
  top: 0 !important;
  position: static !important;
}

/* Keep widget in DOM (display:none breaks translation in some browsers) */
#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.goog-te-gadget {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}

.goog-te-gadget-simple {
  background: transparent !important;
  border: 0 !important;
}

.goog-logo-link,
.goog-te-gadget-icon {
  display: none !important;
}

.goog-te-combo {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 1px !important;
  opacity: 0 !important;
}

/* LEDA auto-translate notice */
.leda-translate-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(17, 17, 17, 0.97);
  border-bottom: 0.5px solid rgba(201, 168, 76, 0.35);
  backdrop-filter: blur(10px);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #ccc;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: leda-translate-in 0.35s ease both;
}

@keyframes leda-translate-in {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leda-translate-notice {
    animation: none;
  }
}

.leda-translate-notice[hidden] {
  display: none !important;
}

.leda-translate-notice-icon {
  flex-shrink: 0;
  color: #c9a84c;
  font-size: 14px;
  line-height: 1;
}

.leda-translate-notice-text {
  text-align: center;
  max-width: 520px;
}

.leda-translate-notice-text strong {
  color: #f0f0f0;
  font-weight: 600;
}

.leda-translate-notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.leda-translate-notice-en {
  background: none;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #aaa;
  font-size: 11px;
  font-family: inherit;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.leda-translate-notice-en:hover {
  border-color: rgba(201, 168, 76, 0.4);
  color: #c9a84c;
}

.leda-translate-notice-close {
  background: none;
  border: 0;
  color: #666;
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.leda-translate-notice-close:hover {
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.1);
}

body.leda-translate-banner-open nav {
  top: 0;
}

body.leda-translate-banner-open {
  padding-top: 0;
}

body.light-mode .leda-translate-notice {
  background: rgba(245, 245, 245, 0.98);
  border-bottom-color: rgba(201, 168, 76, 0.4);
  color: #555;
}

body.light-mode .leda-translate-notice-text strong {
  color: #222;
}

body.light-mode .leda-translate-notice-en {
  border-color: rgba(0, 0, 0, 0.12);
  color: #666;
}

body.light-mode .leda-translate-notice-close {
  color: #999;
}

@media (max-width: 520px) {
  .leda-translate-notice {
    font-size: 11px;
    gap: 8px;
  }

  .leda-translate-notice-actions {
    width: 100%;
    justify-content: center;
  }
}
