.eqlp {
  position: fixed;
  z-index: 999998;
  top: 10px;
  left: 50%;
  width: min(760px, calc(100vw - 28px));
  font-family: inherit;
  transform: translate(-50%, calc(-100% - 28px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 240ms ease, opacity 180ms ease, visibility 0s linear 240ms;
}

.admin-bar .eqlp {
  top: 42px;
}

.eqlp.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 280ms cubic-bezier(.2, .8, .2, 1), opacity 200ms ease;
}

.eqlp.is-closing {
  transform: translate(-50%, calc(-100% - 28px));
  opacity: 0;
  pointer-events: none;
}

.eqlp__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 42px 7px 14px;
  color: #172027;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 42, 52, 0.14);
  border-radius: 13px;
  box-shadow: 0 9px 24px rgba(12, 29, 37, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.eqlp__title {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.eqlp__languages {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.eqlp__language {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  color: #172027;
  background: #f5f8f9;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.eqlp__language:hover,
.eqlp__language:focus-visible {
  color: #172027;
  background: #eef5f4;
  border-color: #5f9f98;
  outline: none;
  transform: translateY(-1px);
  text-decoration: none;
}

.eqlp__language.is-current {
  background: #eef7f6;
  border-color: #6da9a2;
}

.eqlp__flag {
  display: inline-flex;
  flex: 0 0 auto;
  width: 21px;
  height: 15px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
  font-size: 18px;
  line-height: 1;
}

.eqlp__flag img {
  display: block;
  width: 21px;
  height: 14px;
  object-fit: cover;
}

.eqlp__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.eqlp__close {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #48575e;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: inherit;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.eqlp__close:hover,
.eqlp__close:focus-visible {
  color: #172027;
  background: #edf2f3;
  outline: none;
}

@media (max-width: 700px) {
  .eqlp {
    top: 8px;
    width: calc(100vw - 16px);
  }

  .admin-bar .eqlp {
    top: 54px;
  }

  .eqlp__inner {
    display: block;
    min-height: 0;
    padding: 9px 38px 10px 10px;
    border-radius: 12px;
  }

  .eqlp__title {
    margin: 0 0 7px;
    font-size: 14px;
    text-align: center;
  }

  .eqlp__languages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eqlp__language {
    padding: 7px 6px;
  }

  .eqlp__close {
    top: 7px;
    right: 6px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eqlp,
  .eqlp.is-visible,
  .eqlp.is-closing,
  .eqlp__language {
    transition: none;
  }
}
