/* PIDON Forum 1.1 – wygląd (nakładka na Asgaros Forum).
   Selektory „body #af-wrapper …” i !important są celowe: Asgaros zapisuje kolory z ustawień
   w custom.css z !important, a my musimy je nadpisać bez zmiany plików wtyczki forum. */

body #af-wrapper {
  --pf-ink: #0f172a;
  --pf-text: #334155;
  --pf-muted: #64748b;
  --pf-border: #e2e8f0;
  --pf-border-strong: #cbd5e1;
  --pf-soft: #f8fafc;
  --pf-radius: 12px;
  --pf-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --pf-ring: 0 0 0 3px rgba(var(--pf-primary-rgb, 255, 102, 0), .25);
  font-family: var(--pf-font, inherit) !important;
  font-size: var(--pf-font-size, 16px) !important;
  line-height: 1.6;
  color: var(--pf-text) !important;
  -webkit-font-smoothing: antialiased;
}

body #af-wrapper *,
body #af-wrapper *::before,
body #af-wrapper *::after {
  box-sizing: border-box;
}

body #af-wrapper small {
  font-size: .875em;
}

/* ===== Linki i fokus ===== */

body #af-wrapper a {
  color: var(--pf-accent);
  text-decoration: none;
  transition: color .15s, background-color .15s, border-color .15s;
}

body #af-wrapper a:hover {
  color: var(--pf-primary-dark);
  text-decoration: none;
}

body #af-wrapper a:focus-visible,
body #af-wrapper .button:focus-visible,
body #af-wrapper button:focus-visible,
body #af-wrapper summary:focus-visible {
  outline: none;
  box-shadow: var(--pf-ring);
  border-radius: 6px;
}

body #af-wrapper a.highlight-admin {
  color: #b91c1c !important;
}

body #af-wrapper a.highlight-moderator {
  color: #15803d !important;
}

/* ===== Nagłówek forum: menu i wyszukiwarka ===== */

body #af-wrapper #forum-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 0 0 4px;
  padding: 8px;
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  background: #fff !important;
  box-shadow: var(--pf-shadow);
}

body #af-wrapper #forum-header > .clear {
  display: none;
}

body #af-wrapper #forum-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
}

body #af-wrapper #forum-navigation a {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 0 !important;
  border-radius: 8px;
  color: var(--pf-ink) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

body #af-wrapper #forum-navigation a:hover {
  background: rgba(var(--pf-primary-rgb), .08);
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper #forum-navigation a[aria-current="page"] {
  background: rgba(var(--pf-primary-rgb), .12);
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper #forum-navigation a.logout-link {
  color: var(--pf-muted) !important;
  font-weight: 500;
}

body #af-wrapper #forum-navigation a.register-link {
  background: var(--pf-primary);
  color: #fff !important;
}

body #af-wrapper #forum-navigation a.register-link:hover {
  background: var(--pf-primary-dark);
  color: #fff !important;
}

body #af-wrapper #forum-navigation-mobile a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0 !important;
  border-radius: 8px;
  color: var(--pf-ink) !important;
  font-weight: 600;
  line-height: 1.2;
}

body #af-wrapper #forum-search {
  position: relative;
  display: flex;
  align-items: center;
  float: none;
  width: 280px;
  height: 42px;
  margin: 0 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--pf-border-strong);
  border-radius: 999px;
  background: var(--pf-soft) !important;
  line-height: 1;
  transition: border-color .15s, box-shadow .15s;
}

body #af-wrapper #forum-search:focus-within {
  border-color: var(--pf-primary);
  box-shadow: var(--pf-ring);
  background: #fff !important;
}

body #af-wrapper #forum-search .search-icon {
  width: auto;
  height: auto;
  padding: 0 8px 0 0;
  color: var(--pf-muted);
  line-height: 1;
}

body #af-wrapper #forum-search form {
  display: block;
  flex: 1;
  margin: 0;
}

body #af-wrapper #forum-search input {
  width: 100%;
  height: 40px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pf-ink);
  font-size: 15px;
  font-style: normal;
}

body #af-wrapper #forum-search input::placeholder {
  color: #94a3b8 !important;
  font-style: normal;
}

/* ===== Ścieżka i tytuł ===== */

body #af-wrapper #forum-breadcrumbs {
  padding: 10px 2px 0;
  color: var(--pf-muted) !important;
  font-size: 14px;
  line-height: 1.5;
}

body #af-wrapper #forum-breadcrumbs a {
  color: var(--pf-muted) !important;
}

body #af-wrapper #forum-breadcrumbs a:hover {
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper #forum-breadcrumbs .breadcrumb-icon,
body #af-wrapper #forum-breadcrumbs .separator {
  color: #94a3b8;
  font-size: 11px;
}

body #af-wrapper .main-title {
  margin: 0;
  padding: 14px 0 6px;
  color: var(--pf-ink) !important;
  font-size: 1.65em;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

body #af-wrapper .main-title .main-title-icon::before {
  color: var(--pf-muted);
  font-size: .75em;
}

body #af-wrapper .main-description {
  margin: 0 0 12px;
  color: var(--pf-muted);
}

/* ===== Przyciski ===== */

body #af-wrapper .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}

body #af-wrapper .button:active {
  transform: translateY(1px);
}

body #af-wrapper .button .menu-icon {
  padding: 0;
}

body #af-wrapper .button-normal {
  background: var(--pf-primary) !important;
  color: #fff !important;
}

body #af-wrapper .button-normal:hover {
  background: var(--pf-primary-dark) !important;
  color: #fff !important;
}

body #af-wrapper .button-neutral {
  border-color: var(--pf-border-strong);
  background: #fff !important;
  color: var(--pf-ink) !important;
}

body #af-wrapper .button-neutral:hover {
  border-color: var(--pf-ink);
  background: var(--pf-soft) !important;
}

body #af-wrapper .button-red {
  border-color: #fecaca;
  background: #fff !important;
  color: #b91c1c !important;
}

body #af-wrapper .button-red:hover {
  border-color: #f87171;
  background: #fef2f2 !important;
}

body #af-wrapper .button-green {
  background: #15803d !important;
  color: #fff !important;
}

body #af-wrapper .button-green:hover {
  background: #166534 !important;
}

/* Pasek: stronicowanie + przyciski */
body #af-wrapper .pages-and-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  margin: 10px 0 14px;
}

body #af-wrapper .pages-and-menu > .clear {
  display: none;
}

body #af-wrapper .forum-menu {
  float: none;
  gap: 8px;
  margin: 0 0 0 auto;
}

/* ===== Stronicowanie ===== */

body #af-wrapper .pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  border: 0;
  background: transparent;
  line-height: 1;
}

body #af-wrapper .pages a,
body #af-wrapper .pages strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--pf-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--pf-ink) !important;
  font-size: 15px;
  font-weight: 600;
}

body #af-wrapper .pages a:hover {
  border-color: var(--pf-primary);
  background: rgba(var(--pf-primary-rgb), .06);
}

body #af-wrapper .pages strong {
  border-color: var(--pf-accent);
  background: var(--pf-accent);
  color: #fff !important;
}

body #af-wrapper .topic .pages {
  display: inline-flex;
  height: auto;
  margin-left: 6px;
  vertical-align: middle;
}

body #af-wrapper .topic .pages a,
body #af-wrapper .topic .pages strong {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
}

/* ===== Nagłówki sekcji (kategorie, „Tematy”) ===== */

body #af-wrapper .title-element {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  margin: 22px 0 0;
  padding: 13px 20px;
  border: 1px solid var(--pf-border) !important;
  border-bottom: 0 !important;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
  background: var(--pf-soft) !important;
  box-shadow: inset 4px 0 0 var(--pf-primary);
  color: var(--pf-accent) !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

body #af-wrapper .title-element:empty {
  display: none;
}

body #af-wrapper .title-element-dark {
  box-shadow: inset 4px 0 0 var(--pf-muted);
  color: var(--pf-ink) !important;
}

body #af-wrapper .last-post-headline {
  float: none;
  order: 2;
  width: 300px;
  margin: 0 -20px 0 0;
  padding-left: 18px;
  color: var(--pf-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  text-align: left;
}

/* ===== Karty z listami ===== */

body #af-wrapper .content-container {
  margin: 0 0 24px;
  border: 1px solid var(--pf-border) !important;
  border-radius: 0 0 var(--pf-radius) var(--pf-radius);
  background: #fff !important;
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

body #af-wrapper .content-container:first-child,
body #af-wrapper .pages-and-menu + .content-container,
body #af-wrapper #statistics + .content-container {
  border-radius: var(--pf-radius);
}

body #af-wrapper .content-element:nth-child(even) {
  background: #fff !important;
}

body #af-wrapper .forum,
body #af-wrapper .topic,
body #af-wrapper .member,
body #af-wrapper .unread-topic,
body #af-wrapper .unapproved-topic {
  height: auto;
  min-height: 78px;
  border-bottom: 1px solid var(--pf-border) !important;
  line-height: 1.5;
  transition: background-color .15s;
}

body #af-wrapper .content-element:last-child {
  border-bottom: 0 !important;
}

body #af-wrapper .pf-clickable {
  cursor: pointer;
}

body #af-wrapper .pf-clickable:hover {
  background: rgba(var(--pf-primary-rgb), .035) !important;
}

/* Ikona stanu: nowe wpisy / nic nowego */
body #af-wrapper .forum-status,
body #af-wrapper .topic-status {
  width: 76px;
  padding: 14px 0 14px 18px;
}

body #af-wrapper .forum-status i,
body #af-wrapper .topic-status i {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #94a3b8 !important;
  font-size: 20px;
}

body #af-wrapper .forum-status.unread i,
body #af-wrapper .topic-status.unread i {
  background: rgba(var(--pf-primary-rgb), .12);
  color: var(--pf-primary) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--pf-primary-rgb), .25);
}

body #af-wrapper .unread-topic .topic-status,
body #af-wrapper .unapproved-topic .topic-status {
  width: 64px;
}

body #af-wrapper .unread-topic .topic-status i,
body #af-wrapper .unapproved-topic .topic-status i {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

body #af-wrapper .forum-name,
body #af-wrapper .topic-name {
  padding: 14px 18px;
}

body #af-wrapper .forum .forum-title,
body #af-wrapper .topic-name > a {
  color: var(--pf-ink) !important;
  font-size: 1.08em;
  font-weight: 650;
  line-height: 1.35;
}

body #af-wrapper .forum .forum-title:hover,
body #af-wrapper .topic-name > a:hover {
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper .forum-description {
  margin-top: 2px;
  color: var(--pf-text);
  font-size: .92em !important;
}

body #af-wrapper .forum-stats,
body #af-wrapper .topic-stats,
body #af-wrapper .topic-name small {
  margin-top: 4px;
  color: var(--pf-muted) !important;
  font-size: .85em !important;
}

body #af-wrapper .topic-name small a {
  font-weight: 600;
}

body #af-wrapper .forum-subforums {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--pf-border) !important;
}

/* Znaczniki przypięty / zamknięty / ankieta */
body #af-wrapper .topic-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 11px;
  vertical-align: 2px;
}

body #af-wrapper .topic-icon::before {
  color: var(--pf-muted) !important;
}

body #af-wrapper .topic-icon.fa-thumbtack {
  background: rgba(var(--pf-primary-rgb), .12);
}

body #af-wrapper .topic-icon.fa-thumbtack::before {
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper .topic-sticky,
body #af-wrapper .topic-sticky .topic-poster {
  background: #fffaf5 !important;
  border-color: var(--pf-border) !important;
}

/* Kolumna „Ostatni wpis” */
body #af-wrapper .forum-poster,
body #af-wrapper .topic-poster {
  width: 300px;
  padding: 14px 18px;
  border-left: 1px solid var(--pf-border) !important;
  color: var(--pf-muted);
  font-size: .88em;
  line-height: 1.45;
}

body #af-wrapper .forum-poster-avatar,
body #af-wrapper .topic-poster-avatar {
  padding-right: 12px;
}

body #af-wrapper .forum-poster-avatar img.avatar,
body #af-wrapper .topic-poster-avatar img.avatar {
  width: 38px;
  height: 38px;
}

body #af-wrapper .forum-poster-summary > a {
  color: var(--pf-ink) !important;
  font-weight: 600;
}

body #af-wrapper .forum-poster-summary small,
body #af-wrapper .forum-poster-summary small a {
  color: var(--pf-muted) !important;
}

body #af-wrapper .forum-poster .no-topics {
  color: #94a3b8;
  font-style: normal;
}

body #af-wrapper img.avatar {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--pf-border);
}

body #af-wrapper .user-online .avatar,
body #af-wrapper .user-online img.avatar {
  border-color: #fff;
  box-shadow: 0 0 0 2px #22c55e;
}

/* Komunikaty w listach („Na razie brak tematów”) */
body #af-wrapper .content-container > .notice {
  padding: 28px 16px;
  color: var(--pf-muted);
  font-size: 15px;
}

/* ===== Legenda nowe / przeczytane ===== */

body #af-wrapper #read-unread {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: -8px 0 8px;
  padding: 4px 2px;
  color: var(--pf-muted);
  font-size: 14px;
  line-height: 1.4;
}

body #af-wrapper #read-unread > span,
body #af-wrapper #read-unread .indicator-label {
  float: none;
  margin: 0;
}

body #af-wrapper #read-unread .indicator {
  width: 10px;
  height: 10px;
  margin: 0 6px 0 0;
  vertical-align: 0;
}

body #af-wrapper #read-unread .unread {
  background: var(--pf-primary) !important;
}

body #af-wrapper #read-unread .read {
  background: #cbd5e1 !important;
}

body #af-wrapper #read-unread a {
  color: var(--pf-accent);
  font-weight: 600;
}

body #af-wrapper #read-unread .clear {
  display: none;
}

/* ===== Statystyka ===== */

body #af-wrapper #statistics {
  margin: 24px 0;
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  background: #fff !important;
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

body #af-wrapper #statistics .title-element {
  margin: 0;
  border: 0 !important;
  border-bottom: 1px solid var(--pf-border) !important;
  border-radius: 0;
}

body #af-wrapper #statistics-body {
  display: flex;
  flex-wrap: wrap;
  float: none;
  border: 0 !important;
  font-size: 14px;
}

body #af-wrapper .statistics-element {
  flex: 1 1 120px;
  width: auto;
  margin: 0;
  padding: 16px 8px;
  border-right: 1px solid var(--pf-border) !important;
  color: var(--pf-muted);
}

body #af-wrapper .statistics-element .element-number {
  display: block;
  color: var(--pf-ink);
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.3;
}

body #af-wrapper .statistics-element-icon {
  color: var(--pf-primary);
}

body #af-wrapper #statistics-online-users {
  padding: 10px 20px;
  border-top: 1px solid var(--pf-border) !important;
  background: var(--pf-soft) !important;
  color: var(--pf-muted);
  font-size: 14px;
}

/* ===== Posty ===== */

body #af-wrapper .post-element {
  margin: 0 0 20px;
  border: 1px solid var(--pf-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--pf-shadow) !important;
}

body #af-wrapper .forum-post-header-container {
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--pf-border) !important;
  background: var(--pf-soft) !important;
}

body #af-wrapper .post-author {
  gap: 14px;
}

body #af-wrapper .post-author img.avatar {
  width: 52px;
  height: 52px;
}

body #af-wrapper .post-author .post-author-block-name {
  flex-wrap: wrap;
  font-size: 1.02em;
}

body #af-wrapper .post-author .post-author-block-name a {
  color: var(--pf-ink);
}

body #af-wrapper .post-author .mention-nice-name {
  color: var(--pf-muted) !important;
  font-size: .85em;
  font-weight: 400;
}

body #af-wrapper .post-author .post-author-block-meta {
  color: var(--pf-muted);
  font-size: 13px;
}

body #af-wrapper .af-usergroup-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

body #af-wrapper .post-author .topic-author {
  background: rgba(var(--pf-primary-rgb), .12) !important;
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper .post-wrapper {
  padding: 0 22px;
  background: #fff !important;
}

body #af-wrapper .forum-post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 14px;
  padding: 10px 0;
  border-color: var(--pf-border) !important;
  font-size: 14px;
  line-height: 1.4;
}

body #af-wrapper .forum-post-date,
body #af-wrapper .forum-post-date a {
  float: none;
  padding: 0;
  color: var(--pf-muted) !important;
  font-size: 14px;
  font-style: normal;
}

body #af-wrapper .forum-post-date a {
  font-weight: 700;
}

body #af-wrapper .forum-post-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  float: none;
}

body #af-wrapper .forum-post-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--pf-muted) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

body #af-wrapper .forum-post-menu a:hover {
  background: var(--pf-soft);
  color: var(--pf-ink) !important;
}

body #af-wrapper .forum-post-menu a.delete-forum-post {
  color: #b91c1c !important;
}

body #af-wrapper .forum-post-menu a.delete-forum-post:hover {
  background: #fef2f2;
}

body #af-wrapper .forum-post-menu .menu-icon {
  padding: 0;
}

body #af-wrapper .post-message {
  min-height: 0;
  padding-bottom: 6px;
  color: var(--pf-text);
  font-size: 1em;
  line-height: 1.7;
}

body #af-wrapper .post-message p {
  margin: 0 0 1em;
}

body #af-wrapper .post-message ul,
body #af-wrapper .post-message ol {
  margin: 0 0 1em;
  padding: 0 0 0 1.4em !important;
}

body #af-wrapper .post-message li {
  margin-bottom: .3em;
}

body #af-wrapper .post-message a {
  color: var(--pf-accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--pf-accent-rgb), .3);
  text-underline-offset: 3px;
}

body #af-wrapper .post-message a:hover {
  color: var(--pf-primary-dark);
  text-decoration-color: currentColor;
}

body #af-wrapper .post-message img {
  border-radius: 8px;
}

body #af-wrapper .post-message pre,
body #af-wrapper .post-message code {
  border-radius: 6px;
  background: #f1f5f9;
  font-size: .9em;
}

body #af-wrapper .post-message pre {
  padding: 12px 14px;
}

body #af-wrapper blockquote {
  margin: 0 0 1em;
  padding: 12px 16px 2px;
  border: 1px solid var(--pf-border);
  border-left: 4px solid var(--pf-primary);
  border-radius: 10px;
  background: var(--pf-soft);
  color: var(--pf-text);
  font-style: normal;
}

body #af-wrapper .post-message > blockquote::after {
  background: linear-gradient(rgba(248, 250, 252, 0), rgba(248, 250, 252, 1));
}

body #af-wrapper .quotetitle {
  margin-bottom: 6px;
  color: var(--pf-muted);
  font-size: 13.5px;
  font-style: normal;
  font-weight: 700;
}

body #af-wrapper .post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0 14px;
  color: var(--pf-muted) !important;
  font-size: 13px;
  font-style: normal;
}

body #af-wrapper .post-footer > .clear {
  display: none;
}

body #af-wrapper .post-meta {
  float: none;
  margin-left: auto;
}

/* Reakcje */
body #af-wrapper .post-reactions {
  display: flex;
  gap: 6px;
}

body #af-wrapper .post-reactions .reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--pf-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pf-muted) !important;
  font-style: normal;
}

body #af-wrapper .post-reactions a.reaction:hover,
body #af-wrapper .post-reactions .reaction a:hover {
  border-color: var(--pf-primary);
  text-decoration: none;
}

body #af-wrapper .post-reactions .reaction-number {
  margin: 0;
  font-style: normal;
  font-weight: 600;
}

body #af-wrapper .signature {
  padding: 10px 0 14px;
  border-top: 1px dashed var(--pf-border) !important;
  color: var(--pf-muted) !important;
  font-size: 13.5px;
  font-style: normal;
  text-align: left;
}

body #af-wrapper .highlight-post {
  outline: 3px solid rgba(var(--pf-primary-rgb), .6);
  outline-offset: 2px;
}

/* ===== Edytor (nowy temat, odpowiedź) ===== */

body #af-wrapper .editor-element {
  margin: 0 0 24px;
  border: 1px solid var(--pf-border) !important;
  border-radius: var(--pf-radius);
  background: #fff !important;
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

body #af-wrapper .editor-row,
body #af-wrapper .editor-row-subject {
  padding: 16px 20px;
  border-color: var(--pf-border) !important;
}

body #af-wrapper .editor-row.no-padding {
  padding: 0;
}

body #af-wrapper .editor-row-subject {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

body #af-wrapper .editor-row-subject label,
body #af-wrapper .editor-row .row-title {
  float: none;
  height: auto;
  margin: 0;
  color: var(--pf-ink);
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.4;
}

body #af-wrapper .editor-row .row-title {
  display: block;
  margin-bottom: 10px;
}

body #af-wrapper .editor-row-subject span {
  flex: 1 1 260px;
  padding: 0;
}

body #af-wrapper input[type="text"],
body #af-wrapper input[type="email"],
body #af-wrapper input[type="url"],
body #af-wrapper input[type="number"],
body #af-wrapper input[type="password"],
body #af-wrapper select,
body #af-wrapper textarea {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--pf-border-strong) !important;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: var(--pf-ink);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}

body #af-wrapper .editor-subject-input {
  font-size: 17px;
  font-weight: 600;
}

body #af-wrapper input[type="text"]:focus,
body #af-wrapper input[type="email"]:focus,
body #af-wrapper input[type="url"]:focus,
body #af-wrapper input[type="number"]:focus,
body #af-wrapper input[type="password"]:focus,
body #af-wrapper select:focus,
body #af-wrapper textarea:focus {
  border-color: var(--pf-primary) !important;
  box-shadow: var(--pf-ring);
  outline: none;
}

body #af-wrapper input::placeholder {
  color: #94a3b8 !important;
  font-style: normal;
}

body #af-wrapper .wp-editor-wrap {
  overflow: hidden;
  border: 1px solid var(--pf-border-strong);
  border-radius: 10px;
}

body #af-wrapper .editor-row-uploads .upload-hints {
  color: var(--pf-muted) !important;
  font-size: 13px !important;
  font-style: normal;
}

body #af-wrapper .editor-row-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--pf-soft);
}

body #af-wrapper .editor-row-submit .left,
body #af-wrapper .editor-row-submit .right {
  float: none;
  width: auto;
  margin: 0;
}

body #af-wrapper .editor-row-submit .button {
  width: auto;
  min-width: 140px;
}

body #af-wrapper .editor-row-submit .right .button {
  min-width: 180px;
}

body #af-wrapper .editor-row-submit > .clear {
  display: none;
}

body #af-wrapper input[type="checkbox"],
body #af-wrapper input[type="radio"] {
  border-color: var(--pf-border-strong);
}

body #af-wrapper input[type="checkbox"]:checked {
  border-color: var(--pf-primary) !important;
}

body #af-wrapper input[type="checkbox"]:checked::before {
  color: var(--pf-primary-dark) !important;
}

/* ===== Panele akcji (przypięcie, subskrypcje) ===== */

body #af-wrapper .action-panel {
  display: flex;
  flex-wrap: wrap;
}

body #af-wrapper .action-panel-option {
  display: block;
  flex: 1 1 220px;
  padding: 18px;
  border-right: 1px solid var(--pf-border) !important;
  text-align: left;
  transition: background-color .15s;
}

body #af-wrapper .action-panel-option:hover {
  background: var(--pf-soft);
}

body #af-wrapper .action-panel-title {
  color: var(--pf-ink);
  font-weight: 700;
}

body #af-wrapper .action-panel-description {
  color: var(--pf-muted) !important;
  font-size: 14px !important;
  font-style: normal;
}

/* ===== Komunikaty ===== */

body #af-wrapper .notices-panel {
  margin: 14px 0;
  padding: 0 16px;
  border: 1px solid #fde68a;
  border-radius: var(--pf-radius);
  background: #fffbeb;
  color: #92400e;
}

body #af-wrapper .notices-panel .notice {
  padding: 12px 0;
  border-color: #fde68a;
  text-align: left;
}

body #af-wrapper .notices-panel .notice a {
  color: #92400e !important;
  font-weight: 700;
  text-decoration: underline;
}

body #af-wrapper .error {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: var(--pf-radius);
  background: #fef2f2;
  color: #991b1b;
}

/* ===== Profil ===== */

body #af-wrapper #profile-header {
  border: 1px solid var(--pf-border) !important;
  border-bottom: 0 !important;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
}

body #af-wrapper #profile-header .profile-display-name {
  color: var(--pf-ink);
  font-weight: 700;
}

body #af-wrapper #profile-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  height: auto;
  padding: 6px;
  border: 1px solid var(--pf-border);
  background: #fff !important;
}

body #af-wrapper #profile-navigation a {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 9px 16px;
  border-radius: 8px;
  background: transparent !important;
  color: var(--pf-ink) !important;
  font-weight: 600;
  line-height: 1.2;
}

body #af-wrapper #profile-navigation a:hover {
  background: var(--pf-soft) !important;
}

body #af-wrapper #profile-navigation a.active {
  background: rgba(var(--pf-primary-rgb), .12) !important;
  color: var(--pf-primary-dark) !important;
}

body #af-wrapper #profile-layer,
body #af-wrapper #profile-content {
  padding: 18px 24px;
  border: 1px solid var(--pf-border) !important;
  border-top: 0 !important;
  border-radius: 0 0 var(--pf-radius) var(--pf-radius);
  background: #fff !important;
}

body #af-wrapper #profile-content .profile-row {
  padding: 10px 0;
  margin: 0;
  border-color: var(--pf-border) !important;
}

body #af-wrapper #profile-content .profile-row .profile-row-title {
  color: var(--pf-muted);
  font-weight: 600;
}

body #af-wrapper #profile-content .profile-row .profile-row-value {
  color: var(--pf-ink);
  font-style: normal;
}

body #af-wrapper #profile-content .profile-section-header {
  color: var(--pf-accent);
  font-size: 15px;
  font-weight: 700;
}

body #af-wrapper .history-element {
  border-color: var(--pf-border) !important;
}

/* ===== Lista członków ===== */

body #af-wrapper #memberslist-filter,
body #af-wrapper #usergroups-filter {
  border-color: var(--pf-border) !important;
  border-radius: var(--pf-radius);
}

body #af-wrapper .member-name a {
  color: var(--pf-ink);
  font-weight: 650;
}

body #af-wrapper .member-posts,
body #af-wrapper .member-last-seen {
  color: var(--pf-muted);
}

/* ===== Dolna nawigacja (subskrypcje, RSS) ===== */

body #af-wrapper #bottom-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  height: auto;
  margin: 8px 0;
  color: var(--pf-muted) !important;
  line-height: 1.4;
}

body #af-wrapper #bottom-navigation a {
  height: auto;
  padding: 0;
  color: var(--pf-accent) !important;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

/* ===== Telefon i tablet ===== */

@media screen and (max-width: 782px) {
  body #af-wrapper #forum-header {
    padding: 6px;
  }

  /* Menu schowane pod przyciskiem „Menu” (Asgaros dodaje .show-navigation po kliknięciu). */
  body #af-wrapper #forum-navigation {
    display: none;
    flex-direction: column;
    flex-basis: 100%;
  }

  body #af-wrapper #forum-navigation.show-navigation {
    display: flex !important;
  }

  body #af-wrapper #forum-navigation a {
    padding: 12px 14px;
  }

  body #af-wrapper #forum-search {
    width: 100%;
    margin: 0;
  }

  body #af-wrapper .main-title {
    font-size: 1.4em;
  }

  body #af-wrapper .pages-and-menu {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body #af-wrapper .forum-menu {
    margin: 0;
  }

  body #af-wrapper .forum-menu .button {
    flex: 1 1 auto;
  }

  body #af-wrapper .pages {
    width: auto;
    margin: 0;
  }

  body #af-wrapper .title-element {
    padding: 12px 16px;
  }

  body #af-wrapper .forum-status,
  body #af-wrapper .topic-status {
    width: 58px;
    padding: 14px 0 14px 12px;
    vertical-align: top;
  }

  body #af-wrapper .forum-status i,
  body #af-wrapper .topic-status i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
  }

  body #af-wrapper .forum-name,
  body #af-wrapper .topic-name {
    padding: 12px 14px;
  }

  body #af-wrapper .forum-lastpost-small,
  body #af-wrapper .topic-lastpost-small {
    padding: 6px 0 0 !important;
    color: var(--pf-muted);
  }

  body #af-wrapper .forum-post-header-container {
    padding: 12px 14px;
  }

  body #af-wrapper .post-author {
    gap: 12px;
  }

  body #af-wrapper .post-author img.avatar {
    width: 44px;
    height: 44px;
  }

  body #af-wrapper .post-wrapper {
    padding: 0 14px;
  }

  body #af-wrapper .forum-post-header {
    justify-content: flex-start;
  }

  body #af-wrapper .forum-post-menu {
    margin-left: -10px;
  }

  body #af-wrapper .editor-row,
  body #af-wrapper .editor-row-subject {
    padding: 14px;
  }

  body #af-wrapper .editor-row-submit {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body #af-wrapper .editor-row-submit .button {
    width: 100%;
  }

  body #af-wrapper .statistics-element {
    flex-basis: 33%;
    border-right: 0 !important;
  }

  body #af-wrapper .statistics-element .element-number,
  body #af-wrapper .statistics-element .element-name {
    display: block;
    font-size: inherit;
  }

  body #af-wrapper .statistics-element .element-number {
    font-size: 1.3em;
  }

  body #af-wrapper #profile-navigation a {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  body #af-wrapper * {
    transition: none !important;
  }
}
