/* SVIL-509: righe di impostazione (Lingua, Tema) in stile Apple/Stripe: etichetta a sinistra, valore in grigio + chevron
   a destra; la scelta sta in un popover accanto alla riga (computer) o in un foglio dal basso (telefono). */
html body button.sel-riga.sel-riga{display:flex;align-items:center;gap:var(--sp-3);width:100%;min-height:48px;padding:var(--sp-2) var(--sp-4);border:0;background:transparent;color:var(--ink);font:inherit;font-size:var(--t-body);font-weight:500;text-align:left;cursor:pointer}
html body button.sel-riga[hidden]{display:none}
html body button.sel-riga:hover{background:var(--sup-2)}
html body button.sel-riga:focus-visible{outline:2px solid var(--fuoco);outline-offset:-2px}
html body button.sel-riga .sel-et{flex:1;min-width:0}
html body button.sel-riga>svg:first-child{width:18px;height:18px;flex:none;color:var(--t2)}
html body button.sel-riga .sel-val{flex:none;color:var(--t2);font-weight:400;white-space:nowrap}
html body button.sel-riga .sel-dx{width:16px;height:16px;flex:none;color:var(--t3);transition:transform var(--d-2) var(--c-std)}
html body button.sel-riga[aria-expanded="true"] .sel-dx{transform:rotate(90deg)}
/* elenco delle scelte: in cima al livello superiore, mai tagliato da overflow */
html body .sel-fg{position:fixed;inset:auto;margin:0;padding:var(--sp-2);width:220px;border:1px solid var(--linea);border-radius:var(--r-lg);background:var(--sup);color:var(--ink);box-shadow:var(--om-3);
  top:var(--sel-top,96px);left:var(--sel-left,16px)}
html body .sel-fg:not(:popover-open){display:none}
html body .sel-fg form{margin:0}
html body .sel-tit{display:none;margin:0;padding:var(--sp-2) var(--sp-4) var(--sp-3);font-size:var(--t-small);font-weight:600;color:var(--t2);text-align:center}
html body .sel-fg button.sel-op{display:flex;align-items:center;gap:var(--sp-3);width:100%;min-height:44px;padding:var(--sp-2) var(--sp-3);border:0;border-radius:var(--r-md);background:transparent;color:var(--ink);font:inherit;font-size:var(--t-body);font-weight:500;text-align:left;cursor:pointer}
html body .sel-fg button.sel-op:hover{background:var(--sup-2)}
html body .sel-fg button.sel-op:focus-visible{outline:2px solid var(--fuoco);outline-offset:-2px}
html body .sel-fg button.sel-op>span{flex:1}
html body .sel-fg button.sel-op svg{width:18px;height:18px;flex:none;opacity:0}
html body .sel-fg button.sel-op[aria-pressed="true"]{font-weight:600}
html body .sel-fg button.sel-op[aria-pressed="true"] svg{opacity:1}
@media (prefers-reduced-motion:no-preference){
  @supports (transition-behavior:allow-discrete){
    html body .sel-fg{opacity:0;transform:translateY(-4px);transition:opacity var(--d-2) var(--c-std),transform var(--d-2) var(--c-std),overlay var(--d-2) allow-discrete,display var(--d-2) allow-discrete}
    html body .sel-fg:popover-open{opacity:1;transform:none}
    @starting-style{html body .sel-fg:popover-open{opacity:0;transform:translateY(-4px)}}
  }
}
@media (max-width:639.98px){
  html body button.sel-riga.sel-riga{min-height:52px;padding:var(--sp-3) var(--sp-5)}
  html body .sel-fg{inset:auto 0 0 0;width:auto;max-height:80dvh;overflow:auto;padding:var(--sp-2) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom,0px));border-width:1px 0 0;border-radius:var(--r-xl) var(--r-xl) 0 0}
  html body .sel-tit{display:block}
  html body .sel-fg button.sel-op{min-height:52px;padding:var(--sp-3);font-size:var(--t-body)}
  html body .sel-fg::backdrop{background:rgba(7,18,38,.4)}
}
@media (max-width:639.98px) and (prefers-reduced-motion:no-preference){
  @supports (transition-behavior:allow-discrete){
    html body .sel-fg{transform:translateY(24px)}
    @starting-style{html body .sel-fg:popover-open{transform:translateY(24px)}}
  }
}

/* in linea (accordion) su computer: le scelte stanno sotto la riga e spingono giu' le altre; il chevron ruota */
@media (min-width:640px){
  html body .sel-fg.in-linea[data-aperto]:not(:popover-open){display:block;position:static;width:auto;margin:0;padding:var(--sp-1) var(--sp-3) var(--sp-2);border:0;border-radius:0;box-shadow:none;background:transparent;opacity:1;transform:none}
  html body .sel-fg.in-linea[data-aperto] button.sel-op{padding-left:var(--sp-4)}
}

/* SVIL-514: le stesse righe dentro i gruppi di «Il mio profilo» (.imp-g): glifo in quadratino colorato come le altre righe */
html body .imp-g button.sel-riga.sel-riga{min-height:48px;padding:var(--sp-2) var(--sp-4);font-weight:500;gap:var(--sp-3)}
html body .imp-g button.sel-riga>svg:first-child{width:30px;height:30px;padding:6px;border-radius:8px;box-sizing:border-box;background:var(--sup-3);color:var(--ink)}
html body .imp-g button.sel-riga[data-sel-riga^="lingua"]>svg:first-child{background:var(--info-c);color:var(--info)}
html body .imp-g button.sel-riga .sel-val{font-weight:400;overflow:hidden;text-overflow:ellipsis}
