.sp-auth-language {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
}

.sp-cnav__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  color: #0f2947;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.1);
}

.sp-cnav__lang-icon {
  width: 1rem;
  height: 1rem;
}

body.sp-lang-modal-open {
  overflow: hidden;
}

.sp-lang-modal[hidden] {
  display: none;
}

.sp-lang-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: "DM Sans", sans-serif;
}

.sp-lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 37, 69, 0.45);
  backdrop-filter: blur(4px);
}

.sp-lang-modal__dialog {
  position: relative;
  width: min(100%, 34rem);
  max-height: min(90vh, 40rem);
  overflow: auto;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, 0.24);
}

.sp-lang-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.sp-lang-modal__title {
  margin: 0;
  color: #111827;
  font-size: 1.0625rem;
  font-weight: 700;
}

.sp-lang-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.sp-lang-modal__close:hover {
  background: #f1f5f9;
  color: #0f2947;
}

.sp-lang-modal__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.sp-lang-modal__body {
  padding: 1.15rem 1.35rem 1.35rem;
}

.sp-lang-modal__section-title {
  margin: 0 0 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 700;
}

.sp-lang-modal__grid {
  display: grid;
  gap: 0.25rem;
}

.sp-lang-modal__grid--all {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sp-lang-modal__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.sp-lang-modal__option:hover,
.sp-lang-modal__option.is-selected {
  background: #f3f4f6;
}

.sp-lang-modal__flag {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.sp-lang-modal__label {
  line-height: 1.3;
}

@media (max-width: 520px) {
  .sp-lang-modal__grid--all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
