/**
 * Zehuma I18n Widget — toggle butonu (Journal 3)
 * Modal stilleri: zehuma_i18n.js → #zgt-portal-styles (inline, tema çakışmasına dayanıklı)
 */
html { --zgt-z: 2147483646; }

.zehuma-google-translate,
.zehuma-google-translate-root {
  --zgt-bg: #ffffff;
  --zgt-text: #222222;
  --zgt-border: #dddddd;
  --zgt-hover: #f5f5f5;
  --zgt-active: #007bff;
  --zgt-radius: 12px;
  --zgt-font-size: 14px;
  --zgt-width: 240px;
  --zgt-z: 2147483646;
  position: relative;
  z-index: var(--zgt-z);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.zehuma-google-translate.zgt-pos-floating_right,
.zehuma-google-translate.zgt-pos-floating_left,
.zehuma-google-translate.zgt-pos-bottom_right,
.zehuma-google-translate.zgt-pos-bottom_left {
  position: fixed;
}

.zehuma-google-translate.zgt-pos-floating_right { right: 20px; bottom: 80px; left: auto; top: auto; }
.zehuma-google-translate.zgt-pos-floating_left { left: 20px; bottom: 80px; right: auto; top: auto; }
.zehuma-google-translate.zgt-pos-bottom_right { right: 16px; bottom: 16px; left: auto; top: auto; }
.zehuma-google-translate.zgt-pos-bottom_left { left: 16px; bottom: 16px; right: auto; top: auto; }

.zgt-widget {
  position: relative;
  width: var(--zgt-width);
  max-width: calc(100vw - 24px);
}

.zgt-toggle {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--zgt-bg);
  color: var(--zgt-text);
  border: 1px solid var(--zgt-border);
  border-radius: var(--zgt-radius);
  padding: 10px 14px;
  font-size: var(--zgt-font-size);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.zgt-toggle:hover,
.zgt-toggle:focus { background: var(--zgt-hover); outline: none; }

.zgt-toggle-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zgt-toggle-caret { opacity: 0.7; font-size: 12px; }

.zgt-root-dup { display: none !important; }

.zgt-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: #1e293b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 2147483647;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(90vw, 420px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.zgt-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zgt-style-floating .zgt-toggle {
  width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 50%;
  justify-content: center;
  padding: 0;
}

.zgt-style-floating .zgt-toggle-label,
.zgt-style-floating .zgt-toggle-caret { display: none; }

.zgt-style-floating .zgt-toggle::before { content: "🌐"; font-size: 22px; }

html.zgt-translating .zgt-toggle { opacity: 0.7; pointer-events: none; }

@media (max-width: 767px) {
  .zehuma-google-translate { --zgt-width: min(280px, calc(100vw - 24px)); }
}

@media (prefers-reduced-motion: reduce) {
  .zgt-toast { transition: none !important; }
}
