/* 구글 자동번역 - 헤더 언어 선택 UI 및 구글 기본 UI 숨김 */

/* 구글 기본 배너/툴바 숨김 */
.skiptranslate iframe,
iframe.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
}

/* 구글 배너가 밀어내는 상단 여백 제거 (body 의 스크롤 잠금은 건드리지 않는다) */
html {
  margin-top: 0 !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

#google_translate_element {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

/* 커스텀 언어 선택 */
.gt-lang {
  position: relative;
  display: block;
  margin-right: 12px;
  flex-shrink: 0;
}

.gt-lang__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 110px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gt-lang__current:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.gt-lang__short {
  display: none;
}

.gt-lang__globe {
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.gt-lang__globe::before,
.gt-lang__globe::after {
  content: '';
  position: absolute;
  border: 1px solid currentColor;
}

.gt-lang__globe::before {
  top: 50%;
  left: -1.5px;
  right: -1.5px;
  height: 0;
  border-width: 1px 0 0 0;
  transform: translateY(-50%);
}

.gt-lang__globe::after {
  top: -1.5px;
  bottom: -1.5px;
  left: 50%;
  width: 0;
  border-width: 0 0 0 1px;
  border-radius: 50%;
  transform: translateX(-50%) scaleX(2.4);
}

.gt-lang__caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease;
}

.gt-lang.is-open .gt-lang__caret {
  transform: rotate(225deg) translateY(1px);
}

.gt-lang__list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  min-width: 140px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: rgba(17, 17, 17, 0.96);
  border: 1px solid rgba(201, 164, 76, 0.28);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.gt-lang.is-open .gt-lang__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gt-lang__list li a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(246, 241, 234, 0.92);
  font-size: 14px;
  line-height: 1.45;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gt-lang__list li a:hover,
.gt-lang__list li a.is-active {
  background: rgba(201, 164, 76, 0.16);
  color: #fff;
}

.main-header.open .gt-lang {
  display: none;
}

@media (max-width: 1170px) {
  /* 모바일 헤더는 공간이 좁아 아이콘 + 코드만 노출 */
  .gt-lang {
    margin-right: 6px;
  }

  .gt-lang__current {
    min-width: 0;
    min-height: 30px;
    gap: 5px;
    padding: 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0;
  }

  .gt-lang__label,
  .gt-lang__caret {
    display: none;
  }

  .gt-lang__short {
    display: inline-block;
    font-weight: 700;
  }

  .gt-lang__globe {
    width: 13px;
    height: 13px;
  }

  .gt-lang__list {
    min-width: 122px;
    padding: 6px;
    border-radius: 14px;
  }

  .gt-lang__list li a {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .gt-lang {
    margin-right: 4px;
  }

  .gt-lang__current {
    gap: 4px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .gt-lang__globe {
    width: 12px;
    height: 12px;
  }
}
