/* includes/settings/settings-menu.css
   Mobile (<900px) Settings menu + Support card + bottom-sheets (Languages,
   App Download). Spec p.194+. Dark theme; Gotham. */

:root { --sm-font: "Gotham", "Gotham Fallback", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }

/* ---------- Menu ---------- */
/* Horizontal padding comes from .app-shell (16px 14px) — same as Library/Search.
   Do NOT add extra side padding here, or Settings would inset more than they do. */
.sm-wrap { font-family: var(--sm-font); font-weight: 500; }
/* Header mirrors .lib-header / .explore-header exactly */
.sm-header { position: sticky; top: 0; z-index: 50; padding: 24px 0 0; margin-bottom: 20px; background: #181a1a; }
.sm-title-wrap { display: inline-block; width: fit-content; max-width: 100%; }
.sm-title { font-size: 24px; font-weight: 700; letter-spacing: -0.2px; color: var(--text-main, #f6f7f2); line-height: 1; }
.sm-underline { width: 100%; height: 2px; border-radius: 999px; margin-top: 6px; background: #CDE7BE; }

/* Full-width divider under the header + a divider between the two groups; no
   per-row lines (matches the v6 design). */
.sm-list { border-top: 1px solid rgba(255,255,255,0.09); }
.sm-group { padding: 8px 0; }
.sm-group + .sm-group { border-top: 1px solid rgba(255,255,255,0.09); }
.sm-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--sm-font);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sm-row:active { background: rgba(255,255,255,0.04); }
.sm-row__ico {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #242424; border-radius: 12px; color: #CDE7BE; margin-right: 14px;
}
.sm-row__ico svg,
.sm-row__ico img { width: 22px; height: 22px; object-fit: contain; display: block; }
.sm-row__label { flex: 1; }
.sm-row__chev { color: #FFFFFF; display: inline-flex; }
.sm-row__chev svg { width: 24px; height: 24px; }

/* ---------- Support card (above bottom nav) ---------- */
.sm-support {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(var(--bottom-nav-h, 64px) + 12px);
  max-width: 358px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #242424;
  border-radius: 8px;
  color: #CDE7BE;
  text-decoration: none;
  font-family: var(--sm-font);
  z-index: 5;
}
.sm-support:active { background: #2c2c2c; }
.sm-support__ico { width: 24px; height: 24px; flex-shrink: 0; color: #CDE7BE; }
.sm-support__ico svg,
.sm-support__ico img { width: 24px; height: 24px; object-fit: contain; display: block; }
.sm-support__text { font-weight: 500; font-size: 14px; color: #CDE7BE; }

/* ============================================================
   Bottom-sheet infrastructure (shared)
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 340ms ease;
  z-index: 60;   /* above the bottom-nav (z-index:50) so the sheet fully covers it */
}
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #171717;
  border-radius: 26px 26px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 -18px 50px -12px rgba(0,0,0,0.6);
  padding: 0 26px calc(34px + env(safe-area-inset-bottom));
  z-index: 61;   /* above backdrop (60) and the bottom-nav (50) */
  font-family: var(--sm-font);
  transform: translateY(101%);
  transition: transform 420ms cubic-bezier(.32,.72,0,1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.sheet[hidden] { display: none; }
.sheet.is-open { transform: translateY(0); }

.sheet__grabber {
  width: 40px; height: 4.5px; border-radius: 3px;
  background: rgba(255,255,255,0.2);
  margin: 12px auto 0; flex-shrink: 0; cursor: grab;
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; }
.sheet__title { font-weight: 600; font-size: 20px; color: #F2F2F0; }
.sheet__x {
  width: 32px; height: 32px; border-radius: 50%;
  background: #232323; border: 0; color: #C7C7C7;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sheet__x svg { width: 15px; height: 15px; }
.sheet__x:active { background: #2c2c2c; }
.sheet__x--float { position: absolute; top: 15px; right: 16px; }

/* ---------- Languages sheet ---------- */
.sheet--languages { height: 86vh; padding-left: 20px; padding-right: 20px; }
.sheet__search {
  position: relative; margin: 18px 0 6px; flex-shrink: 0;
}
.sheet__search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #8a8a8a; }
.sheet__search-input {
  width: 100%; height: 46px; border-radius: 12px;
  background: #1F1F1F; border: 1px solid rgba(255,255,255,0.06);
  padding: 0 14px 0 42px; color: #fff; font-family: var(--sm-font); font-size: 15px; outline: none;
}
.sheet__search-input::placeholder { color: #7C7C7C; }
/* List sits at 12px (sheet padding is 20px) so the selected-row highlight insets
   while the row text — with 8px inner padding — aligns at 20px with the title. */
.sheet__list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; margin: 0 -8px; }

.lang-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font-family: var(--sm-font); text-align: left;
}
.lang-row:active { background: rgba(255,255,255,0.05); }
.lang-row__texts { display: flex; flex-direction: column; gap: 2px; }
.lang-row__native { font-weight: 600; font-size: 16px; color: #F2F2F0; }
.lang-row__english { font-weight: 500; font-size: 12.5px; color: #9A9A9A; }
.lang-row__check { color: #A9CF87; display: none; }
.lang-row__check svg { width: 20px; height: 20px; }
.lang-row.is-selected { background: rgba(169,207,135,0.09); }
.lang-row.is-selected .lang-row__native { color: #A9CF87; }
.lang-row.is-selected .lang-row__check { display: inline-flex; }
.lang-row[hidden] { display: none; }
.lang-empty { text-align: center; color: #7C7C7C; font-size: 14px; padding: 24px 8px; }
.lang-empty__q { color: #B7B7B7; }
.lang-empty[hidden] { display: none; }

/* ---------- App Download sheet ---------- */
.appdl { text-align: center; padding-top: 8px; }
.appdl__title { font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; color: #F2F2F0; margin-top: 10px; }
.appdl__subtitle { font-weight: 400; font-size: 14px; line-height: 1.45; color: #9A9A9A; max-width: 260px; margin: 8px auto 0; }
.appdl__buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.store-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 56px; border-radius: 14px;
  background: #000; border: 1px solid rgba(255,255,255,0.16);
  padding: 0 18px; text-decoration: none; color: #fff;
}
.store-btn:active { background: #0b0b0b; transform: scale(0.975); }
.store-btn__ico { width: 26px; height: 26px; flex-shrink: 0; }        /* Apple 26px (spec) */
.store-btn__ico--sm { width: 24px; height: 24px; }                    /* Google 24px (spec) */
.store-btn__texts { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.store-btn__top { font-weight: 400; font-size: 10px; color: #C9C9C9; }
.store-btn__bottom { font-weight: 500; font-size: 18px; color: #fff; margin-top: 2px; }

body.sheet-open { overflow: hidden; }
