#google_translate_element {
  position: absolute !important;
  left: -10000px !important;
  top: 0 !important;
  width: 220px !important;
  height: 60px !important;
  overflow: visible !important;
}

.custom-translate {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
  font-family: Arial, sans-serif;
}

.custom-translate summary {
  list-style: none;
  cursor: pointer;
  min-width: 132px;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.custom-translate summary::-webkit-details-marker { display: none; }
.custom-translate summary::after { content: '▾'; float: right; margin-left: 18px; }
.custom-translate[open] summary { border-color: #174a7e; }

.custom-translate .language-options {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 4px;
  width: 188px;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.custom-translate .language-options button {
  min-height: 38px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font: 600 13px Arial, sans-serif;
  cursor: pointer;
}

.custom-translate .language-options button:hover,
.custom-translate .language-options button:focus-visible {
  border-color: #174a7e;
  background: #f0f5fa;
  outline: none;
}

@media screen and (max-width: 480px) {
  .custom-translate { justify-content: center; }
  .custom-translate .language-options { right: 50%; transform: translateX(50%); }
}
