.tc-language-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 12px;
}

.tc-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(19, 28, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(19, 28, 40, 0.08);
  backdrop-filter: blur(12px);
}

.tc-language-switcher a {
  min-width: 3.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: #131c28;
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  word-break: normal !important;
  word-wrap: normal !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tc-language-switcher a:hover,
.tc-language-switcher a:focus-visible {
  background: rgba(236, 17, 26, 0.1);
  color: #ec111a;
  transform: translateY(-1px);
}

.tc-language-switcher a.is-active {
  background: #ec111a;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(236, 17, 26, 0.24);
}

.tc-language-switcher a.is-active:hover,
.tc-language-switcher a.is-active:focus-visible {
  background: #ec111a;
  color: #ffffff;
  transform: none;
}

.tc-language-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(19, 28, 40, 0.58);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.tc-language-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

body.tc-language-popup-active {
  overflow: hidden;
}

body.tc-language-popup-active #cookiesdirective,
body.tc-language-popup-active #epd,
body.tc-language-popup-active .cookies-alert,
body.tc-language-popup-active .cookies-alert-overlay {
  opacity: 0 !important;
  pointer-events: none !important;
}

.tc-language-popup__dialog {
  width: min(100%, 460px);
  padding: 32px;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(19, 28, 40, 0.28);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.24s ease;
}

.tc-language-popup.is-visible .tc-language-popup__dialog {
  transform: translateY(0) scale(1);
}

.tc-language-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #fff0f1;
  color: #ec111a;
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.tc-language-popup__title {
  margin: 0 0 0.85rem;
  color: #131c28;
  font-family: "Instrument Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.tc-language-popup__text {
  margin: 0;
  color: #424a4d;
  font-family: "Instrument Sans", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

.tc-language-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.tc-language-popup__actions .btn {
  min-width: 0;
  margin: 0;
}

.tc-language-popup__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.4rem;
  border: 1px solid rgba(19, 28, 40, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #131c28;
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.tc-language-popup__dismiss:hover,
.tc-language-popup__dismiss:focus-visible {
  border-color: rgba(236, 17, 26, 0.18);
  background: #fff0f1;
  color: #ec111a;
}

@media (min-width: 992px) {
  .menu .navbar .navbar-collapse {
    align-items: center;
  }

  .tc-language-menu {
    margin-left: auto;
    margin-right: 12px;
  }
}

@media (max-width: 991px) {
  .tc-language-menu {
    width: 100%;
    margin: 0 0 1rem;
    justify-content: flex-start;
  }

  .tc-language-switcher {
    width: 100%;
    justify-content: center;
  }

  .tc-language-switcher a {
    flex: 1 1 0;
  }
}

@media (max-width: 767px) {
  .tc-language-popup {
    padding: 16px;
  }

  .tc-language-popup__dialog {
    padding: 24px;
    border-radius: 1.5rem;
  }

  .tc-language-popup__text {
    font-size: 1rem;
  }

  .tc-language-popup__actions {
    flex-direction: column;
  }

  .tc-language-popup__actions .btn,
  .tc-language-popup__dismiss {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-language-switcher a,
  .tc-language-popup,
  .tc-language-popup__dialog,
  .tc-language-popup__dismiss {
    transition: none;
  }
}
