/* Settings (settings.js): the panel, as a dialog on the map and on the Settings page (settings.html). Grouped rows
   like the iOS Settings app. The switch and buttons come from friends.css; colours from design/tokens.css. */

.set-group { margin: 0 0 var(--space-4); }
.set-group-title {
  margin: 0 0 6px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.set-card { border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--separator); overflow: hidden; }
.set-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; cursor: pointer;
}
.set-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-text strong { font-size: 15px; font-weight: 600; }
.set-text small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.set-icon {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
}
.set-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.set-icon.offpiste { background: var(--poi-offpiste); color: var(--poi-offpiste-ink); }
.set-row input[role="switch"]:disabled { opacity: .5; cursor: default; }
.set-note { margin: 6px 4px 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.set-foot { margin: var(--space-4) 4px 0; font-size: 12px; color: var(--muted); }

/* Asked before off-piste routes are switched on */
.set-confirm {
  margin: 0 14px 14px; padding: 12px;
  border-radius: var(--radius-sm);
  background: rgb(238 125 26 / .1); box-shadow: inset 0 0 0 1px rgb(238 125 26 / .35);
  font-size: 13.5px; line-height: 1.45;
}
.set-confirm-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; color: var(--poi-offpiste-text); }
.set-sign {   /* the diamond sign from the map, with an upright "!" */
  position: relative; isolation: isolate; flex: none; width: 20px; height: 20px;
  display: grid; place-items: center;
  font: 800 12px/1 var(--font); color: var(--poi-offpiste-ink);
}
.set-sign::before {
  content: ""; position: absolute; inset: 3px; z-index: -1;
  transform: rotate(45deg); border-radius: 2px;
  background: var(--poi-offpiste); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.2px rgb(22 32 44 / .35);
}
.set-confirm ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.set-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* As a dialog on the map */
.settings-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; }
.settings-dialog[open] { display: flex; flex-direction: column; }
.settings-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 10px 22px;
}
.settings-head h2 { flex: 1; margin: 0; font-size: var(--text-title); letter-spacing: var(--tracking-title); }
.settings-body { padding: 4px 18px 20px; overflow-y: auto; }
.settings-body .set-card { background: rgba(255, 255, 255, .85); }

/* The Settings page */
body.settings-doc {
  margin: 0;
  font-family: var(--font); font-size: var(--text-base); line-height: 1.5;
  color: var(--text); background: var(--page);
  -webkit-font-smoothing: antialiased;
}
body.settings-doc * { box-sizing: border-box; }
.settings-page { max-width: 640px; margin: 0 auto; padding: var(--space-6) var(--gutter) 48px; font-family: var(--font); color: var(--text); }
.settings-page h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 28px; letter-spacing: var(--tracking-title); }
.settings-page > p { margin: 0 0 var(--space-5); color: var(--muted); }
