/* =====================================================
   Language Bottomsheet
   bg #212121, border #fff 24%, top-rounded 16px,
   padding 20px, gap 16px (per spec)
   ===================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: sheet-fade-in 0.22s ease-out;
}

/* When the HTML `hidden` attribute is present, actually hide the sheet.
   Needed because our `display: flex` above would otherwise override it. */
.sheet-backdrop[hidden] {
  display: none;
}

@media (min-width: 520px) {
  .sheet-backdrop {
    width: min(100vw, calc(100vh * 9 / 16));
    max-width: 440px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@keyframes sheet-fade-in {
  from { background: rgba(0, 0, 0, 0); }
  to   { background: rgba(0, 0, 0, 0.6); }
}

.sheet {
  width: 100%;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: sheet-slide-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.24);
  margin: 0 auto;
}

.sheet-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-yellow);
  text-align: center;
  letter-spacing: 0.2px;
}

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.64px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease;
  color: var(--color-white);
  text-align: left;
}

.sheet-option:hover { background: rgba(255, 255, 255, 0.08); }

.sheet-option.is-selected {
  background: rgba(186, 141, 66, 0.12);
  border-color: rgba(186, 141, 66, 0.4);
}

.sheet-option-label {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.sheet-option-native {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.sheet-check {
  margin-left: 4px;
}

/* =====================================================
   Coming-soon toast
   Appears at the bottom of the screen when an
   unavailable language is selected.
   ===================================================== */
.lang-toast {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px)); /* sit above bottom nav */
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 2000;

  max-width: calc(100vw - 48px);
  width: max-content;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgb(206, 144, 0);
  border: 0.64px solid rgba(255, 162, 0, 0.463);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);

  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0.1px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.lang-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 520px) {
  .lang-toast {
    max-width: min(calc(100vw - 48px), 392px);
  }
}
