/* ── WP Google Translator — Floating Circle Widget ── */

/* Hide any remnants of old Google Translate UI */
.goog-te-gadget, .goog-logo-link, .skiptranslate { display: none !important; }
body[style] { top: 0 !important; }

/* ── Widget container (inline, placed by shortcode) ──────────────────── */
.wgt-bar {
  display: inline-block;
  position: relative;
  z-index: 99999;
  font-family: Arial, sans-serif;
}

/* ── Circle toggle button ─────────────────────────────────────────────── */
.wgt-trigger {
  width: 52px;
  height: 52px;
  border-radius: 50% !important;
  background: #1f2933;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.wgt-trigger:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.wgt-trigger-flag {
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  border: 2px solid #fff;
  background: #fff;
}

/* ── Dropdown panel ───────────────────────────────────────────────────── */
.wgt-panel {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  z-index: 100000;
  overflow: hidden;
  flex-direction: column;
}

.wgt-panel.wgt-open {
  display: flex;
  animation: wgt-fade-up 0.18s ease-out;
}

@keyframes wgt-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Search box inside panel */
.wgt-search-wrap {
  padding: 10px 10px 6px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.wgt-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  padding: 7px 10px 7px 30px;
  outline: none;
  color: #333;
  background: #f8f8f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px center;
  transition: border-color 0.2s;
}

.wgt-search:focus {
  border-color: #4a90e2;
  background-color: #fff;
}

.wgt-search::placeholder { color: #aaa; }

/* Language list */
.wgt-dropdown {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 300px;
  overflow-y: auto;
}

.wgt-dropdown::-webkit-scrollbar { width: 6px; }
.wgt-dropdown::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.wgt-dropdown li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background 0.15s ease;
}

.wgt-dropdown li:hover,
.wgt-dropdown li.wgt-active {
  background: #f2f2f2;
}

.wgt-dropdown li.wgt-active {
  font-weight: 600;
}

.wgt-dropdown li .wgt-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
  background: #f5f5f5;
}

.wgt-dropdown li .wgt-lang-name { flex: 1; }

.wgt-dropdown li.wgt-no-result {
  color: #aaa;
  font-style: italic;
  cursor: default;
  justify-content: center;
}
.wgt-dropdown li.wgt-no-result:hover { background: transparent; }

/* ── Reset link inside dropdown footer ───────────────────────────────── */
.wgt-reset-wrap {
  display: none;
  border-top: 1px solid #f0f0f0;
  padding: 6px 14px;
}

.wgt-reset {
  background: none;
  border: none;
  color: #e04444;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wgt-reset:hover { text-decoration: underline; }

/* ── Spinner overlay on trigger ──────────────────────────────────────── */
.wgt-spinner-ring {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: wgt-spin 0.7s linear infinite;
  pointer-events: none;
}

.wgt-bar.wgt-busy .wgt-spinner-ring { display: block; }
.wgt-bar.wgt-busy .wgt-trigger { pointer-events: none; }

@keyframes wgt-spin { to { transform: rotate(360deg); } }

/* ── Mobile: move up slightly so it doesn't cover nav ───────────────── */
@media (max-width: 480px) {
  .wgt-bar {
  display: inline-block; bottom: 16px; right: 16px; }
  .wgt-panel { width: calc(100vw - 40px); right: 0; }
}

/* ── Cache hit badge ─────────────────────────────────────────────────── */
.wgt-cached-badge {
  font-size: 12px;
  margin-left: auto;
  opacity: 0.5;
  flex-shrink: 0;
}

.wgt-dropdown li:hover .wgt-cached-badge {
  opacity: 0.8;
}