Narodowe Centrum NaukiProjekt sfinansowany przez Narodowe Centrum Nauki
OPUS 2025/57/B/HS3/02198
Instytut Historii PAN

MediaWiki:Common.css: Różnice pomiędzy wersjami

Z LawRus
auto-sync z repo
auto-sync z repo
 
(Nie pokazano 5 pośrednich wersji utworzonych przez tego samego użytkownika)
Linia 99: Linia 99:
table.cargoDynamicTable td {
table.cargoDynamicTable td {
     text-align: left !important;
     text-align: left !important;
}
/* Specjalna:FormStart — akapit instrukcji (pf_formstart_docu) jest renderowany
  przez ->escaped() w jednym <p>, więc znaki nowej linii z komunikatu przeglądarka
  zwija do spacji i bloki PL + EN zlewają się w jeden. pre-line zachowuje podziały
  wierszy z komunikatu: pusta linia między PL a EN = widoczna przerwa. */
body.mw-special-FormStart #mw-content-text form p {
    white-space: pre-line;
}
/* Tabele meta wpisu — pionowy układ etykieta | wartość. Puste pola pomija
  szablon (renderują się tylko wypełnione wiersze), więc nie ma już placeholderów
  "—". Etykieta w lewej, wąskiej kolumnie; wartość zajmuje resztę szerokości. */
.wpis-meta {
    width: auto;
}
.wpis-meta th {
    text-align: left;
    white-space: nowrap;
    width: 1%;
}
/* Dwujęzyczna etykieta pola w formularzu — część angielska po "/" szara i cieńsza,
  żeby odróżnić ją od polskiej (np. „Rok AD (łac.) / Year AD (Lat.)"). */
.lawrus-label-en {
    color: #54595d;
    font-weight: normal;
}
}


Linia 104: Linia 131:
   table-layout: fixed + width: 100% pozwala CSS kontrolować szerokości kolumn.
   table-layout: fixed + width: 100% pozwala CSS kontrolować szerokości kolumn.
   autoWidth DataTables wyłączone w Common.js (preInit.dt).
   autoWidth DataTables wyłączone w Common.js (preInit.dt).
   Kolejność kolumn: Wpis | Streszczenie | Źródło nar. | Dat. ruska | Dat. łac.
   Kolejność kolumn: Wpis | Streszczenie | Źródło | Dat. ruska | Dat. łac.
                     | Dokument | Język [| Status]                             */
                     | Język [| Status]                                       */


table.cargoDynamicTable {
table.cargoDynamicTable {
Linia 121: Linia 148:
/* col 1: Wpis */
/* col 1: Wpis */
table.cargoDynamicTable thead th:nth-child(1),
table.cargoDynamicTable thead th:nth-child(1),
table.cargoDynamicTable tbody td:nth-child(1) { width: 18% !important; }
table.cargoDynamicTable tbody td:nth-child(1) { width: 20% !important; }


/* col 2: Streszczenie */
/* col 2: Streszczenie */
table.cargoDynamicTable thead th:nth-child(2),
table.cargoDynamicTable thead th:nth-child(2),
table.cargoDynamicTable tbody td:nth-child(2) { width: 22% !important; }
table.cargoDynamicTable tbody td:nth-child(2) { width: 30% !important; }


/* col 3: Źródło narracyjne */
/* col 3: Źródło */
table.cargoDynamicTable thead th:nth-child(3),
table.cargoDynamicTable thead th:nth-child(3),
table.cargoDynamicTable tbody td:nth-child(3) { width: 11% !important; }
table.cargoDynamicTable tbody td:nth-child(3) { width: 17% !important; }


/* col 4: Datacja ruska */
/* col 4: Datacja ruska */
table.cargoDynamicTable thead th:nth-child(4),
table.cargoDynamicTable thead th:nth-child(4),
table.cargoDynamicTable tbody td:nth-child(4) { width: 8% !important; }
table.cargoDynamicTable tbody td:nth-child(4) { width: 9% !important; }


/* col 5: Datacja łacińska */
/* col 5: Datacja łacińska */
table.cargoDynamicTable thead th:nth-child(5),
table.cargoDynamicTable thead th:nth-child(5),
table.cargoDynamicTable tbody td:nth-child(5) { width: 8% !important; }
table.cargoDynamicTable tbody td:nth-child(5) { width: 9% !important; }


/* col 6: Dokument */
/* col 6: Język */
table.cargoDynamicTable thead th:nth-child(6),
table.cargoDynamicTable thead th:nth-child(6),
table.cargoDynamicTable tbody td:nth-child(6) { width: 12% !important; }
table.cargoDynamicTable tbody td:nth-child(6) { width: 15% !important; }


/* col 7: Język */
/* col 7: Status (widok roboczy — 7 kolumn) */
table.cargoDynamicTable thead th:nth-child(7),
table.cargoDynamicTable thead th:nth-child(7),
table.cargoDynamicTable tbody td:nth-child(7) { width: 9% !important; }
table.cargoDynamicTable tbody td:nth-child(7) {
 
     width: 13% !important;
/* col 8: Status (widok roboczy — 8 kolumn) */
table.cargoDynamicTable thead th:nth-child(8),
table.cargoDynamicTable tbody td:nth-child(8) {
     width: 12% !important;
     word-break: break-all;
     word-break: break-all;
}
}
Linia 172: Linia 195:
.lawrus-less:hover {
.lawrus-less:hover {
     text-decoration: underline;
     text-decoration: underline;
}
/* ── Pasek akcji wpisu ───────────────────────────────────────────────────── */
.lawrus-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 0.75em;
}
.lawrus-pdf-btn {
    margin-left: auto;
    padding: 0.2em 0.8em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.875em;
    line-height: 1.6;
    color: #202122;
    border-radius: 3px;
    white-space: nowrap;
}
.lawrus-pdf-btn:hover {
    background: #eaecf0;
    border-color: #72777d;
}
}


Linia 213: Linia 263:
     flex: 1;
     flex: 1;
     min-width: 0;
     min-width: 0;
}
/* Pola formularza w kolumnach (tokens/select2, inputy, textarea, combobox) mają
  się mieścić w kolumnie i nie wychodzić poza obszar. select2 (tokens) ustawia
  sobie inline szerokość — wymuszamy 100% kolumny. */
.lawrus-bilingual .lawrus-col input,
.lawrus-bilingual .lawrus-col textarea,
.lawrus-bilingual .lawrus-col select,
.lawrus-triple .lawrus-col input,
.lawrus-triple .lawrus-col textarea,
.lawrus-triple .lawrus-col select {
    max-width: 100%;
    box-sizing: border-box;
}
.lawrus-bilingual .lawrus-col .select2-container,
.lawrus-triple .lawrus-col .select2-container {
    /* select2 (PageForms) ustawia inline min-width: <size>px (domyślnie 600px) —
      to ono rozpychało pole poza kolumnę. Zerujemy je. */
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}
/* PageForms owija pole w <span class="inputSpan"> (domyślnie inline) — przez to
  width:100% na widgecie tokens/select2 liczy się względem szerokości treści
  (PageForms wymusza inline width:600px na <select>), a nie kolumny, więc pole
  wychodzi w prawo. Blok sprawia, że 100% = szerokość kolumny. */
.lawrus-bilingual .lawrus-col .inputSpan,
.lawrus-triple .lawrus-col .inputSpan {
    display: block;
}
.lawrus-bilingual .lawrus-col select.pfTokens,
.lawrus-triple .lawrus-col select.pfTokens {
    width: 100% !important;
}
}


Linia 284: Linia 368:
}
}


/* Komunikat ApprovedRevs o zatwierdzonej wersji ukryty globalnie. */
/* Zakładka "Edytuj" ukryta dla niezalogowanych poza stronami dyskusji.
.approvedAndLatestMsg,
  .ns-subject = wszystkie strony niebędące dyskusją (NS_MAIN, Katalog:, itp.)
.approvedNotLatestMsg,
  .ns-talk    = Dyskusja:, Dyskusja_wpisu: tu zakładka pozostaje widoczna. */
.notApprovedMsg {
body:not(.lawrus-zalogowany).ns-subject #ca-edit,
body:not(.lawrus-zalogowany).ns-subject #ca-ve-edit {
     display: none;
     display: none;
}
/* Komunikat ApprovedRevs o zatwierdzonej wersji — ukryty tylko dla niezalogowanych.
  Zalogowani redaktorzy/admin widzą informację że jest nowsza wersja do zatwierdzenia.
  Klasy: stare (.approvedNotLatestMsg) i nowe (.notLatestMsg, .latestMsg) ApprovedRevs. */
body:not(.lawrus-zalogowany) .approvedAndLatestMsg,
body:not(.lawrus-zalogowany) .approvedNotLatestMsg,
body:not(.lawrus-zalogowany) .notApprovedMsg,
body:not(.lawrus-zalogowany) .notLatestMsg,
body:not(.lawrus-zalogowany) .latestMsg {
    display: none;
}
/* Puste boxy sidebar (Narzędzia wiki, Narzędzia stron) — ukryte dla wszystkich
  poza sysop. Hook SidebarBeforeOutput opróżnia TOOLBOX dla nie-sysop, ale Timeless
  dalej renderuje pusty kontener #site-tools z nagłówkiem. Druga sekcja #page-tools
  ma same emptyPortlet gdy user nie ma akcji edit/move (anon i większość redaktorów). */
body:not(.lawrus-sysop) #site-tools,
body:not(.lawrus-sysop) #page-tools {
    display: none;
}
/* Sticky footer — dla krótkich stron (Filtry, Katalogi, Database) bez tej reguły
  pod stopką prześwituje szare body background. Flexbox column rozciąga wrapper
  na pełną wysokość okna i wypycha footer na dół. */
html, body {
    height: 100%;
    margin: 0;
}
#mw-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#mw-content-container {
    flex: 1 0 auto;
}
#mw-footer-container {
    flex-shrink: 0;
}
/* ── Okienko wyboru języka (pierwsza wizyta, anonimowi) ──────────────────────
  Wstrzykiwane przez Common.js (lawrusInitLangPrompt) gdy brak cookie lawrus_lang. */
.lawrus-lang-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1em;
}
.lawrus-lang-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    padding: 1.75em 2em;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.lawrus-lang-modal-title {
    margin: 0 0 1.25em 0;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.4;
    color: #202122;
}
.lawrus-lang-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    margin-bottom: 1.25em;
}
.lawrus-lang-modal-buttons button {
    padding: 0.7em 1em;
    border: 1px solid #3366cc;
    background: #3366cc;
    color: #fff;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.lawrus-lang-modal-buttons button:hover {
    background: #2a4fa3;
    border-color: #2a4fa3;
}
.lawrus-lang-modal-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    font-size: 0.85em;
    color: #54595d;
    cursor: pointer;
}
.lawrus-lang-modal-remember input {
    cursor: pointer;
}
/* === Załączniki wpisu (grafiki + pliki) === */
.lawrus-attachments {
    margin: 0.5em 0 1em;
}
.lawrus-attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-bottom: 0.6em;
}
.lawrus-attachment-img {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    text-align: center;
}
.lawrus-attachment-img img {
    border: 1px solid #c8ccd1;
    border-radius: 3px;
    background: #fff;
}
.lawrus-attachment-caption {
    font-size: 0.8em;
    color: #54595d;
    margin-top: 0.25em;
    line-height: 1.25;
    word-break: break-word;
}
.lawrus-attachments-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35em;
}
.lawrus-attachment-file a {
    display: inline-block;
    padding: 0.4em 0.8em;
    border: 1px solid #c8ccd1;
    border-radius: 4px;
    background: #f8f9fa;
    text-decoration: none;
    color: #202122;
}
.lawrus-attachment-file a::before {
    content: "\1F4C4"; /* 📄 */
    margin-right: 0.5em;
}
.lawrus-attachment-file a:hover {
    background: #eaf3ff;
    border-color: #3366cc;
}
.lawrus-form-hint {
    font-size: 0.88em;
    color: #54595d;
    margin: 0.2em 0 0.6em;
}
/* Lightbox podglądu załącznika graficznego */
.lawrus-lightbox-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 3vmin;
    cursor: zoom-out;
}
.lawrus-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    cursor: default;
}
.lawrus-lightbox-close {
    position: absolute;
    top: 1.5vmin;
    right: 2.5vmin;
    padding: 0 0.2em;
    font-size: 2.4em;
    line-height: 1;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}
.lawrus-lightbox-close:hover {
    color: #c8ccd1;
}
}

Aktualna wersja na dzień 09:12, 22 cze 2026

/* Czcionka źródeł latopisarskich (cyrylica + łacina). */
@font-face {
    font-family: 'Litopys New Roman';
    src: url('/fonts/LitopysNewRoman.ttf') format('truetype');
    font-display: swap;
}

/* Klasa do oznaczania tekstów w czcionce Litopys.
   Użycie: <span class="litopys">текст</span>
   lub w szablonie: <div class="litopys">{{{oryginał}}}</div> */
.litopys {
    font-family: 'Litopys New Roman', 'Times New Roman', serif;
}

/* Stopka w jednej linii — domyślnie Timeless łamie ją na 3 wiersze. */
#mw-footer #footer-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.5em;
}
#mw-footer #footer-info,
#mw-footer #footer-places {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0 1em;
}
#mw-footer #footer-info li,
#mw-footer #footer-places li {
    display: inline-block;
    margin: 0;
}

/* Pasek nawigacji 3 zakładek — w stylu Material/płaskie taby z bottom-border
   indicator dla aktywnej. Używany przez Szablon:NawigacjaGłówna. */
.nav-glowna {
    display: flex;
    margin: 0 0 1.5em 0;
    border-bottom: 2px solid #eaecf0;
}
.nav-glowna-tab {
    flex: 1;
    text-align: center;
    padding: 0.75em 1em;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.nav-glowna-tab:hover {
    background-color: #f8f9fa;
}
.nav-glowna-tab.active {
    border-bottom-color: #36c;
    font-weight: bold;
}
.nav-glowna-tab.active a {
    color: #202122;
    text-decoration: none;
    pointer-events: none;
}

/* Sticky footer — domyślnie body color (#72777d) wycieka pod krótkim
   contentem, generując "duży grafitowy obszar". Layout flex z body =
   100vh wymusza że content rozciąga się do okna, a stopka siedzi na dnie. */
html, body {
    min-height: 100vh;
}
body {
    display: flex;
    flex-direction: column;
}
body > * {
    flex-shrink: 0;
}
#mw-content-container {
    flex: 1 0 auto;
}
#mw-footer-container {
    background: #2a2a2a;
}

/* Wstrzyknięte wiersze uczestników umowy — bez dodatkowych paddinów. */
.pf-participants-inject {
    padding: 0 !important;
}

/* Wyrównanie tabel: tekst do góry, dane do lewej.
   !important potrzebne bo DataTables nadpisuje przez JS inline style. */
.wikitable th,
.wikitable td,
table.cargoDynamicTable th,
table.cargoDynamicTable td {
    vertical-align: top !important;
}
.wikitable td,
table.cargoDynamicTable td {
    text-align: left !important;
}

/* Specjalna:FormStart — akapit instrukcji (pf_formstart_docu) jest renderowany
   przez ->escaped() w jednym <p>, więc znaki nowej linii z komunikatu przeglądarka
   zwija do spacji i bloki PL + EN zlewają się w jeden. pre-line zachowuje podziały
   wierszy z komunikatu: pusta linia między PL a EN = widoczna przerwa. */
body.mw-special-FormStart #mw-content-text form p {
    white-space: pre-line;
}

/* Tabele meta wpisu — pionowy układ etykieta | wartość. Puste pola pomija
   szablon (renderują się tylko wypełnione wiersze), więc nie ma już placeholderów
   "—". Etykieta w lewej, wąskiej kolumnie; wartość zajmuje resztę szerokości. */
.wpis-meta {
    width: auto;
}
.wpis-meta th {
    text-align: left;
    white-space: nowrap;
    width: 1%;
}

/* Dwujęzyczna etykieta pola w formularzu — część angielska po "/" szara i cieńsza,
   żeby odróżnić ją od polskiej (np. „Rok AD (łac.) / Year AD (Lat.)"). */
.lawrus-label-en {
    color: #54595d;
    font-weight: normal;
}

/* ── Tabela Cargo — mieści się w kontenerze bez poziomego scrolla ────────────
   table-layout: fixed + width: 100% pozwala CSS kontrolować szerokości kolumn.
   autoWidth DataTables wyłączone w Common.js (preInit.dt).
   Kolejność kolumn: Wpis | Streszczenie | Źródło | Dat. ruska | Dat. łac.
                     | Język [| Status]                                        */

table.cargoDynamicTable {
    table-layout: fixed !important;
    width: 100% !important;
}

table.cargoDynamicTable th,
table.cargoDynamicTable td {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
}

/* col 1: Wpis */
table.cargoDynamicTable thead th:nth-child(1),
table.cargoDynamicTable tbody td:nth-child(1) { width: 20% !important; }

/* col 2: Streszczenie */
table.cargoDynamicTable thead th:nth-child(2),
table.cargoDynamicTable tbody td:nth-child(2) { width: 30% !important; }

/* col 3: Źródło */
table.cargoDynamicTable thead th:nth-child(3),
table.cargoDynamicTable tbody td:nth-child(3) { width: 17% !important; }

/* col 4: Datacja ruska */
table.cargoDynamicTable thead th:nth-child(4),
table.cargoDynamicTable tbody td:nth-child(4) { width: 9% !important; }

/* col 5: Datacja łacińska */
table.cargoDynamicTable thead th:nth-child(5),
table.cargoDynamicTable tbody td:nth-child(5) { width: 9% !important; }

/* col 6: Język */
table.cargoDynamicTable thead th:nth-child(6),
table.cargoDynamicTable tbody td:nth-child(6) { width: 15% !important; }

/* col 7: Status (widok roboczy — 7 kolumn) */
table.cargoDynamicTable thead th:nth-child(7),
table.cargoDynamicTable tbody td:nth-child(7) {
    width: 13% !important;
    word-break: break-all;
}

/* ── Streszczenie — skracanie z rozwinięciem ───────────────────────────────── */

.lawrus-full-wrap {
    display: none;
}
.lawrus-more,
.lawrus-less {
    display: inline;
    margin-left: 2px;
    color: #3366cc;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
}
.lawrus-more:hover,
.lawrus-less:hover {
    text-decoration: underline;
}

/* ── Pasek akcji wpisu ───────────────────────────────────────────────────── */

.lawrus-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 0.75em;
}

.lawrus-pdf-btn {
    margin-left: auto;
    padding: 0.2em 0.8em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.875em;
    line-height: 1.6;
    color: #202122;
    border-radius: 3px;
    white-space: nowrap;
}
.lawrus-pdf-btn:hover {
    background: #eaecf0;
    border-color: #72777d;
}

/* ── Sekcje wpisu LawRus ─────────────────────────────────────────────────── */

.lawrus-section {
    border: 1px solid #d0d3d7;
    border-radius: 4px;
    margin: 1em 0;
    overflow: hidden;
}
.lawrus-section-header {
    background: #f0f2f5;
    font-weight: bold;
    font-size: 1.1em;
    padding: 0.5em 0.8em;
    border-bottom: 1px solid #d0d3d7;
}
.lawrus-section-body {
    padding: 0.75em 0.8em;
}

/* Układ dwukolumnowy PL / EN */
.lawrus-bilingual {
    display: flex;
    gap: 1em;
    margin: 0.75em 0;
}
.lawrus-bilingual .lawrus-col {
    flex: 1;
    min-width: 0;
}

/* Układ trójkolumnowy (trzy pola datacji) */
.lawrus-triple {
    display: flex;
    gap: 1em;
    margin: 0.5em 0;
}
.lawrus-triple .lawrus-col {
    flex: 1;
    min-width: 0;
}

/* Pola formularza w kolumnach (tokens/select2, inputy, textarea, combobox) mają
   się mieścić w kolumnie i nie wychodzić poza obszar. select2 (tokens) ustawia
   sobie inline szerokość — wymuszamy 100% kolumny. */
.lawrus-bilingual .lawrus-col input,
.lawrus-bilingual .lawrus-col textarea,
.lawrus-bilingual .lawrus-col select,
.lawrus-triple .lawrus-col input,
.lawrus-triple .lawrus-col textarea,
.lawrus-triple .lawrus-col select {
    max-width: 100%;
    box-sizing: border-box;
}
.lawrus-bilingual .lawrus-col .select2-container,
.lawrus-triple .lawrus-col .select2-container {
    /* select2 (PageForms) ustawia inline min-width: <size>px (domyślnie 600px) —
       to ono rozpychało pole poza kolumnę. Zerujemy je. */
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}
/* PageForms owija pole w <span class="inputSpan"> (domyślnie inline) — przez to
   width:100% na widgecie tokens/select2 liczy się względem szerokości treści
   (PageForms wymusza inline width:600px na <select>), a nie kolumny, więc pole
   wychodzi w prawo. Blok sprawia, że 100% = szerokość kolumny. */
.lawrus-bilingual .lawrus-col .inputSpan,
.lawrus-triple .lawrus-col .inputSpan {
    display: block;
}
.lawrus-bilingual .lawrus-col select.pfTokens,
.lawrus-triple .lawrus-col select.pfTokens {
    width: 100% !important;
}

/* Responsywność: na wąskich ekranach kolumny układają się pionowo */
@media (max-width: 700px) {
    .lawrus-bilingual,
    .lawrus-triple {
        flex-direction: column;
    }
}

/* ── Przełącznik języka PL/EN dla wpisu ──────────────────────────────────── */

.lawrus-lang-switch {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.75em 0;
}
.lawrus-lang-switch button {
    padding: 0.2em 0.8em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.875em;
    line-height: 1.6;
    color: #202122;
}
.lawrus-lang-switch button:first-child {
    border-radius: 3px 0 0 3px;
    border-right: none;
}
.lawrus-lang-switch button:last-child {
    border-radius: 0 3px 3px 0;
}
.lawrus-lang-switch button:hover:not(.active) {
    background: #eaecf0;
}
.lawrus-lang-switch button.active {
    background: #3366cc;
    color: #fff;
    border-color: #3366cc;
    font-weight: bold;
}

/* Panele językowe — domyślnie PL widoczny, EN ukryty */
.lawrus-lang-panel {
    margin: 0.75em 0;
}
.lawrus-lang-en {
    display: none;
}
.wpis-kroniki.lang-en .lawrus-lang-pl {
    display: none;
}
.wpis-kroniki.lang-en .lawrus-lang-en {
    display: block;
}

/* Treść widoczna tylko dla zalogowanych — domyślnie ukryta, JS odkrywa po weryfikacji. */
.lawrus-tylko-zalogowany {
    display: none;
}
body.lawrus-zalogowany .lawrus-tylko-zalogowany {
    display: block;
}

/* Zakładki "Kod źródłowy" i "Historia" niewidoczne dla niezalogowanych. */
body:not(.lawrus-zalogowany) #ca-viewsource,
body:not(.lawrus-zalogowany) #ca-history {
    display: none;
}

/* Zakładka "Edytuj" ukryta dla niezalogowanych poza stronami dyskusji.
   .ns-subject = wszystkie strony niebędące dyskusją (NS_MAIN, Katalog:, itp.)
   .ns-talk    = Dyskusja:, Dyskusja_wpisu: — tu zakładka pozostaje widoczna. */
body:not(.lawrus-zalogowany).ns-subject #ca-edit,
body:not(.lawrus-zalogowany).ns-subject #ca-ve-edit {
    display: none;
}

/* Komunikat ApprovedRevs o zatwierdzonej wersji — ukryty tylko dla niezalogowanych.
   Zalogowani redaktorzy/admin widzą informację że jest nowsza wersja do zatwierdzenia.
   Klasy: stare (.approvedNotLatestMsg) i nowe (.notLatestMsg, .latestMsg) ApprovedRevs. */
body:not(.lawrus-zalogowany) .approvedAndLatestMsg,
body:not(.lawrus-zalogowany) .approvedNotLatestMsg,
body:not(.lawrus-zalogowany) .notApprovedMsg,
body:not(.lawrus-zalogowany) .notLatestMsg,
body:not(.lawrus-zalogowany) .latestMsg {
    display: none;
}

/* Puste boxy sidebar (Narzędzia wiki, Narzędzia stron) — ukryte dla wszystkich
   poza sysop. Hook SidebarBeforeOutput opróżnia TOOLBOX dla nie-sysop, ale Timeless
   dalej renderuje pusty kontener #site-tools z nagłówkiem. Druga sekcja #page-tools
   ma same emptyPortlet gdy user nie ma akcji edit/move (anon i większość redaktorów). */
body:not(.lawrus-sysop) #site-tools,
body:not(.lawrus-sysop) #page-tools {
    display: none;
}

/* Sticky footer — dla krótkich stron (Filtry, Katalogi, Database) bez tej reguły
   pod stopką prześwituje szare body background. Flexbox column rozciąga wrapper
   na pełną wysokość okna i wypycha footer na dół. */
html, body {
    height: 100%;
    margin: 0;
}
#mw-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#mw-content-container {
    flex: 1 0 auto;
}
#mw-footer-container {
    flex-shrink: 0;
}

/* ── Okienko wyboru języka (pierwsza wizyta, anonimowi) ──────────────────────
   Wstrzykiwane przez Common.js (lawrusInitLangPrompt) gdy brak cookie lawrus_lang. */
.lawrus-lang-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1em;
}
.lawrus-lang-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    padding: 1.75em 2em;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.lawrus-lang-modal-title {
    margin: 0 0 1.25em 0;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.4;
    color: #202122;
}
.lawrus-lang-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    margin-bottom: 1.25em;
}
.lawrus-lang-modal-buttons button {
    padding: 0.7em 1em;
    border: 1px solid #3366cc;
    background: #3366cc;
    color: #fff;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.lawrus-lang-modal-buttons button:hover {
    background: #2a4fa3;
    border-color: #2a4fa3;
}
.lawrus-lang-modal-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    font-size: 0.85em;
    color: #54595d;
    cursor: pointer;
}
.lawrus-lang-modal-remember input {
    cursor: pointer;
}

/* === Załączniki wpisu (grafiki + pliki) === */
.lawrus-attachments {
    margin: 0.5em 0 1em;
}
.lawrus-attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-bottom: 0.6em;
}
.lawrus-attachment-img {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    text-align: center;
}
.lawrus-attachment-img img {
    border: 1px solid #c8ccd1;
    border-radius: 3px;
    background: #fff;
}
.lawrus-attachment-caption {
    font-size: 0.8em;
    color: #54595d;
    margin-top: 0.25em;
    line-height: 1.25;
    word-break: break-word;
}
.lawrus-attachments-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35em;
}
.lawrus-attachment-file a {
    display: inline-block;
    padding: 0.4em 0.8em;
    border: 1px solid #c8ccd1;
    border-radius: 4px;
    background: #f8f9fa;
    text-decoration: none;
    color: #202122;
}
.lawrus-attachment-file a::before {
    content: "\1F4C4"; /* 📄 */
    margin-right: 0.5em;
}
.lawrus-attachment-file a:hover {
    background: #eaf3ff;
    border-color: #3366cc;
}
.lawrus-form-hint {
    font-size: 0.88em;
    color: #54595d;
    margin: 0.2em 0 0.6em;
}

/* Lightbox podglądu załącznika graficznego */
.lawrus-lightbox-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 3vmin;
    cursor: zoom-out;
}
.lawrus-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    cursor: default;
}
.lawrus-lightbox-close {
    position: absolute;
    top: 1.5vmin;
    right: 2.5vmin;
    padding: 0 0.2em;
    font-size: 2.4em;
    line-height: 1;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}
.lawrus-lightbox-close:hover {
    color: #c8ccd1;
}