/* BSK Mobile Shell 0.9.5: the Select Language sheet, the side-menu Language line and the profile Language row.
   Loaded only while BSK Urdu is active (see bsk_mshell_enqueue). The sheet is fixed on the screen. Colours are set
   here, not taken from the theme, so the sheet reads the same in any theme. */

.bsk-m-lang[hidden] { display: none !important; }

.bsk-m-lang {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #1b1f1c;
  color-scheme: light;
  font-family: Lato, "Segoe UI", Roboto, Arial, sans-serif;
}
.bsk-m-lang *,
.bsk-m-lang *::before,
.bsk-m-lang *::after { box-sizing: border-box; }

.bsk-m-lang-back {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, .5);
}

/* A 16px gutter at each side, more where the phone has a safe-area inset. No sideways scroll. */
.bsk-m-lang-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding-top: 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(16, 24, 40, .2);
}

.bsk-m-lang .bsk-m-lang-title {
  margin: 0 0 14px;
  color: #1b1f1c;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
}

.bsk-m-lang .bsk-m-lang-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bsk-m-lang .bsk-m-lang-list li { min-width: 0; }

.bsk-m-lang .bsk-m-lang-opt,
.bsk-m-lang .bsk-m-lang-opt:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #d5dbd2;
  border-radius: 10px;
  background: #ffffff;
  color: #1b1f1c;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.bsk-m-lang .bsk-m-lang-opt[aria-current="true"] { border-color: #236f27; background: #eef6ee; }
.bsk-m-lang .bsk-m-lang-opt:active,
.bsk-m-lang .bsk-m-lang-opt:focus-visible { background: #236f27; color: #ffffff; outline: none; }
.bsk-m-lang .bsk-m-lang-opt:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #236f27; }

.bsk-m-lang .bsk-m-lang-tick { flex: 0 0 auto; width: 20px; height: 20px; color: #236f27; }
.bsk-m-lang .bsk-m-lang-opt:active .bsk-m-lang-tick,
.bsk-m-lang .bsk-m-lang-opt:focus-visible .bsk-m-lang-tick { color: #ffffff; }

.bsk-m-lang .bsk-m-lang-close {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid #236f27;
  border-radius: 10px;
  background: #ffffff;
  color: #236f27;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.bsk-m-lang .bsk-m-lang-close:focus-visible { outline: 2px solid #236f27; outline-offset: 2px; }

html.bsk-m-lang-lock,
html.bsk-m-lang-lock body { overflow: hidden; }

/* Phones: the side-menu Language line looks like the links above it. */
@media (max-width: 720px) {
  .bsk-m-group .bsk-m-lang-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bsk-m-ink, #1b1f1c);
    font-family: var(--bsk-m-font, Lato, "Segoe UI", Roboto, Arial, sans-serif);
    font-size: 16px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .bsk-m-group .bsk-m-lang-open:active,
  .bsk-m-group .bsk-m-lang-open:focus-visible { background: var(--bsk-m-green, #236f27); color: #ffffff; outline: none; }
  .bsk-m-group .bsk-m-lang-open svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--bsk-m-khaki, #8f8267); }
  .bsk-m-group .bsk-m-lang-open:active svg,
  .bsk-m-group .bsk-m-lang-open:focus-visible svg { color: #ffffff; }
  .bsk-m-lang-left { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
}
