.ilfilo-pwa-prefs-trigger {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  padding: 0;
  height: 48px;
  text-transform: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99998;
  width: 48px;
  border-radius: 50%;
  border: none;
  background: #7A1F1F;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ilfilo-pwa-prefs-panel {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ilfilo-pwa-prefs-panel.ilfilo-pwa-prefs-open {
  display: flex;
}

.ilfilo-pwa-prefs-content {
  background: #fff;
  color: #222;
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.ilfilo-pwa-prefs-content h3 {
  margin: 0 0 8px;
  color: #7A1F1F;
}

.ilfilo-pwa-prefs-hint {
  font-size: 13px;
  color: #666;
  margin: 0 0 14px;
}

.ilfilo-pwa-prefs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ilfilo-pwa-prefs-group-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7A1F1F;
  margin: 0 0 6px;
}

/* Variante dell'etichetta di gruppo con le azioni "seleziona/deseleziona
   tutte" sulla stessa riga, a destra - stesso spazio verticale della riga
   "Quando" sopra, nessuna riga vuota aggiuntiva. */
.ilfilo-pwa-prefs-group-label--row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ilfilo-pwa-prefs-selectall-actions {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

/* Il tema impone padding/altezza/ombra fissi a TUTTI i <button> del sito
   tramite variabili CSS (--btn-pad, --btn-height, --btn-shadow) - la prima
   versione di questo pulsante annullava solo border/background e si
   ritrovava comunque l'ombra del tema (appariva come un riquadro indesiderato
   sullo screenshot di test del 19/08/2026): va annullato ESPLICITAMENTE ogni
   proprieta' che il tema forza, non solo quelle che sembrano rilevanti a
   colpo d'occhio. Gia' successo in piu' file di questo plugin. */
.ilfilo-pwa-prefs-selectall {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: auto;
  text-transform: none;
  background: transparent;
  color: #7A1F1F;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.ilfilo-pwa-prefs-selectall:hover,
.ilfilo-pwa-prefs-selectall:active {
  background: transparent;
  box-shadow: none;
}

.ilfilo-pwa-prefs-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.ilfilo-pwa-prefs-actions {
  display: flex;
  gap: 10px;
}

.ilfilo-pwa-prefs-save {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: auto;
  text-transform: none;
  background: #7A1F1F;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
}

.ilfilo-pwa-prefs-cancel {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: auto;
  text-transform: none;
  background: transparent;
  color: #7A1F1F;
  border: 1px solid #7A1F1F;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
}

.ilfilo-pwa-prefs-status {
  margin-top: 12px;
  font-size: 13px;
  color: #444;
  min-height: 18px;
}

/* In app installata la funzione si sposta nella voce "Notifiche" della
   pulsantiera in basso (vedi app-chrome.js), quindi il pulsante flottante
   originale va nascosto per non sovrapporsi alla pulsantiera. */
html.ilfilo-pwa-standalone .ilfilo-pwa-prefs-trigger {
  display: none;
}
