/* V507 — словарь запрещённых слов: ручной лимит, импорт TXT и безопасная встроенная заготовка. */
#shieldy-settings-form .badwords-dictionary-field{
  display:grid!important;
  gap:10px!important;
  padding:14px!important;
  border:1px solid color-mix(in srgb,var(--shieldy-accent,#2da44e) 24%,var(--account-border,#cbdced))!important;
  border-radius:14px!important;
  background:var(--account-surface,#fff)!important;
}
#shieldy-settings-form .badwords-dictionary-heading{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
#shieldy-settings-form .badwords-dictionary-heading>label{
  margin:0!important;
}
#shieldy-settings-form .badwords-word-counter{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:72px!important;
  min-height:28px!important;
  padding:4px 10px!important;
  border:1px solid var(--account-border,#cbdced)!important;
  border-radius:999px!important;
  background:var(--account-surface-soft,#eef6fc)!important;
  color:var(--account-muted,#607890)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#shieldy-settings-form .badwords-word-counter.is-file{
  border-color:color-mix(in srgb,var(--shieldy-accent,#2da44e) 40%,var(--account-border,#cbdced))!important;
  background:color-mix(in srgb,var(--shieldy-accent,#2da44e) 10%,var(--account-surface,#fff))!important;
  color:var(--shieldy-accent,#218b43)!important;
}
#shieldy-settings-form .badwords-word-counter.is-error{
  border-color:#e35d6a!important;
  background:#fff1f2!important;
  color:#c62838!important;
}
#shieldy-settings-form #shieldy-badwords{
  width:100%!important;
  min-height:132px!important;
  resize:vertical!important;
  margin:0!important;
}
#shieldy-settings-form #shieldy-badwords[aria-invalid="true"]{
  border-color:#df4759!important;
  box-shadow:0 0 0 3px rgba(223,71,89,.12)!important;
}
#shieldy-settings-form .badwords-dictionary-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:14px!important;
}
#shieldy-settings-form .badwords-dictionary-copy{
  display:grid!important;
  gap:3px!important;
  min-width:0!important;
}
#shieldy-settings-form .badwords-dictionary-copy small{
  margin:0!important;
  color:var(--account-muted,#607890)!important;
  font-size:11px!important;
  line-height:1.45!important;
}
#shieldy-settings-form .badwords-dictionary-buttons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
#shieldy-settings-form .badwords-dictionary-buttons .compact-button{
  min-height:38px!important;
  margin:0!important;
  white-space:nowrap!important;
}
#shieldy-settings-form .badwords-dictionary-status{
  display:flex!important;
  align-items:center!important;
  min-height:34px!important;
  padding:8px 11px!important;
  border:1px dashed var(--account-border,#cbdced)!important;
  border-radius:10px!important;
  background:var(--account-surface-soft,#eef6fc)!important;
  color:var(--account-muted,#607890)!important;
  font-size:12px!important;
  line-height:1.4!important;
}
#shieldy-settings-form .badwords-dictionary-status.is-success{
  border-color:color-mix(in srgb,var(--shieldy-accent,#2da44e) 45%,var(--account-border,#cbdced))!important;
  background:color-mix(in srgb,var(--shieldy-accent,#2da44e) 9%,var(--account-surface,#fff))!important;
  color:var(--shieldy-accent,#218b43)!important;
}
#shieldy-settings-form .badwords-dictionary-status.is-error{
  border-color:#e35d6a!important;
  background:#fff1f2!important;
  color:#c62838!important;
}
html[data-theme="dark"] #shieldy-settings-form .badwords-word-counter.is-error,
body.dark-theme #shieldy-settings-form .badwords-word-counter.is-error,
html[data-theme="dark"] #shieldy-settings-form .badwords-dictionary-status.is-error,
body.dark-theme #shieldy-settings-form .badwords-dictionary-status.is-error{
  background:#321a20!important;
  color:#ff9daa!important;
}
@media(max-width:760px){
  #shieldy-settings-form .badwords-dictionary-actions{
    grid-template-columns:1fr!important;
  }
  #shieldy-settings-form .badwords-dictionary-buttons{
    justify-content:flex-start!important;
  }
}
@media(max-width:480px){
  #shieldy-settings-form .badwords-dictionary-heading{
    align-items:flex-start!important;
  }
  #shieldy-settings-form .badwords-dictionary-buttons{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  #shieldy-settings-form .badwords-dictionary-buttons .compact-button{
    width:100%!important;
  }
}


/* V507: isolated built-in template action. */
#shieldy-settings-form .badwords-template-button{
  border-color:color-mix(in srgb,var(--shieldy-accent,#2da44e) 55%,var(--account-border,#cbdced))!important;
  background:color-mix(in srgb,var(--shieldy-accent,#2da44e) 9%,var(--account-surface,#fff))!important;
  color:var(--shieldy-accent,#218b43)!important;
}
#shieldy-settings-form .badwords-template-button:hover:not(:disabled){
  border-color:var(--shieldy-accent,#2da44e)!important;
  background:color-mix(in srgb,var(--shieldy-accent,#2da44e) 15%,var(--account-surface,#fff))!important;
}
#shieldy-settings-form .badwords-template-button[aria-busy="true"],
#shieldy-settings-form .badwords-template-button:disabled{
  cursor:wait!important;
  opacity:.68!important;
  transform:none!important;
}
