MediaWiki:Common.css

From Cobi Collectors Wiki
Revision as of 21:00, 3 February 2026 by Dieba (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* ==========================================================================
   1. VARIABLEN & BASIS-STYLING
   ========================================================================== */
:root {
    --bg-light: #ebecf0;
    --border-gray: 1px solid #aaa;
    --shadow-dark: 5px 5px 10px black;
    --accent-blue: #9FB6CD;
}

.mw-parser-output img {
    max-width: 100%;
    height: auto;
}

/* Gemeinsame Basis für alle Box-Elemente */
.infobox, .headersetpage, .headernocolumn, .headercatpage, 
.box1, .box2, .box3, .box4, .brickparent, .catlinks, #toc, .toc {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    box-sizing: border-box;
}

/* ==========================================================================
   2. BOX-ELEMENTE & HEADERS (DESKTOP)
   ========================================================================== */

/* Allgemeine Header-Klassen */
.headersetpage, .headernocolumn, .headercatpage {
    width: 100% !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    font-size: 18px;
}

.headersetpage td, .headernocolumn td, .headercatpage td {
    vertical-align: middle;
    padding: 10px 5px;
}

.headersetpage a {
    text-decoration: none;
    font-weight: bold;
    color: #202122;
}

.headersetpage a:hover {
    color: var(--accent-blue);
}

.headernocolumn { height: 80px; font-size: 16px; }

/* MAINPAGE HEADER (FLEXBOX DESIGN) */
.header-mainpage {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    padding: 15px 25px !important;
    margin: 10px 0 20px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.header-main-text {
    flex: 1 1 0% !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #000 !important;
}

.header-main-text span {
    display: block !important;
    font-weight: normal !important; 
    font-size: 15px !important;
    margin-top: 4px !important;
}

.header-main-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    justify-content: center !important;
}

.header-mainpage::after {
    content: "" !important;
    flex: 1 1 0% !important;
}

/* TEXTBOX & HEADLINES */
.textbox {
    width: 50%;
    background: var(--bg-light);
    border: 2px solid var(--accent-blue);
    padding: 8px 15px;
    margin: 0 auto;
}

.box-headline {
    background-color: var(--accent-blue);
    font-size: 16px;
    padding: 8px 12px;
    margin-bottom: 15px;
    border: 1px solid #8aa3bc;
    border-radius: 4px;
    font-weight: bold;
    display: block;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    text-align: left !important;
}

/* ==========================================================================
   3. ARTIKEL-LAYOUT (INFOBOX & INHALT)
   ========================================================================== */

.infobox {
    float: right !important;
    clear: right !important;
    width: 300px;
    margin: 0 0 20px 20px !important;
    padding: 0.5em;
    vertical-align: middle;
    z-index: 10;
}

/* Umfluss-Steuerung: Verhindert, dass Text die Infobox überlappt */
.mw-parser-output h2, 
.mw-parser-output .gallery, 
.mw-parser-output p,
.mw-parser-output ul {
    display: flow-root;
    margin-right: 0 !important;
}

/* --- ABOUT-SET CONTAINER FIX --- */
.aboutset-container {
    display: flex !important;
    align-items: flex-start !important;
    gap: 25px !important;
    margin: 20px 0 !important;
    /* Kein flow-root hier, damit Flexbox sauber arbeitet */
    clear: none !important; 
}

.aboutsetlogo {
    flex: 0 0 150px !important;
    display: block !important;
}

.aboutsetlogo img {
    width: 150px !important;
    height: auto !important;
}

.aboutsettext {
    flex: 1 !important;
    min-width: 0; /* Verhindert das "Rausplatzen" bei langen Wörtern */
}

/* Listen-Fix speziell für den About-Bereich */
.aboutsettext ul {
    margin-left: 1.5em !important;
    list-style-type: disc !important;
    display: block !important; /* Wichtig: Überschreibt das flow-root der allgemeinen Regel */
}

.aboutsettext li {
    margin-bottom: 0.4em !important;
}

/* Inhaltsverzeichnis (TOC) */
#toc, .toc {
    border-radius: 8px;
    padding: 15px !important;
    display: inline-block;
}

.toctitle {
    background-color: var(--accent-blue);
    margin: -15px -15px 15px -15px;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.toctitle h2 {
    font-size: 16px !important;
    font-weight: bold !important;
    border: none !important;
    padding: 0 !important;
}

/* ==========================================================================
   4. GALERIEN & TABELLEN
   ========================================================================== */

/* Brick-Galerie */
ul.gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 10px 0 20px 0 !important;
    list-style: none !important;
}

li.gallerybox {
    flex: 0 0 180px !important; 
    width: 180px !important; 
    min-height: 230px !important;
    margin: 0 15px 20px 0 !important; 
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: background 0.2s ease !important;
    overflow: hidden !important;
}

li.gallerybox:hover {
    background-color: rgba(159, 182, 205, 0.25) !important;
}

li.gallerybox div.thumb {
    height: 150px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
}

.gallerytext {
    padding: 5px 12px 12px 12px !important;
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Cobi-Tabellen */
.cobitable {
    margin: 1em auto;
    border: 1px solid #000;
    border-collapse: collapse;
    width: fit-content;
    max-width: 100%;
    border-radius: 4px;
}

.cobitable th, .cobitable td {
    border: 1px solid #444 !important;
    padding: 0.6em 0.8em;
}

.cobitable th {
    background-color: var(--accent-blue);
    font-weight: bold;
}

/* ==========================================================================
   9. KATEGORIE-LISTEN (MEHRSPALTIG & ICONS)
   ========================================================================== */

/* Die eigentliche Kategorieseite (Listen-Optimierung) */
.mw-category {
    column-count: 2; 
    column-gap: 30px;
}

.mw-category-group {
    break-inside: avoid-column;
    margin-bottom: 15px;
}

.mw-category-group ul li {
    list-style-type: none !important;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

/* Das Icon vor jedem Kategorie-Link */
.mw-category-group ul li a::before {
    content: "▶";
    font-size: 0.8em;
    color: var(--accent-blue);
    margin-right: 8px;
    display: inline-block;
}

/* Kategorie-Box ganz unten auf jeder Artikelseite */
.catlinks {
    background-color: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark);
    border-radius: 4px;
    margin-top: 2em;
    padding: 10px !important;
}

/* ==========================================================================
   5. SIDEBAR (TIMELESS STABIL)
   ========================================================================== */

.sidebar-chunk {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    border-radius: 5px !important;
    margin-bottom: 20px !important;
    padding: 10px !important;
}

.sidebar-chunk ul {
    list-style: none !important;
    margin: 5px 0 !important;
    padding: 0 !important;
}

.sidebar-chunk ul li a {
    color: #333 !important;
    padding: 4px 5px !important;
    display: block !important;
}

.sidebar-chunk ul li a:hover {
    color: var(--accent-blue) !important;
    text-decoration: underline !important;
}

#p-logo {
    text-align: center !important;
    margin-bottom: 15px !important;
    display: block !important;
}

/* ==========================================================================
   6. MAINPAGE GRIDS & BRICK-CONTAINER
   ========================================================================== */

.mainparent { display: grid; grid-template-columns: 4fr 6fr; gap: 15px; }
.box1 { grid-column: 1 / 3; padding: 15px; }
.box2, .box3 { grid-column: 1; padding: 15px; }
.box4 { grid-column: 2; grid-row: 2 / 4; padding: 15px; text-align: center; }

.box4-content { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; margin-top: 15px; }
.box4-content a { flex: 0 0 150px !important; margin: 2px !important; padding: 5px; border-radius: 8px; }
.box4-content a:hover { background-color: rgba(159, 182, 205, 0.25); }

.innercenter {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(100px, 150px));
    gap: 15px;
    justify-content: flex-start; 
    align-items: center;
}

.brickparent {
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==========================================================================
   7. MOBILE OPTIMIERUNG (@MEDIA)
   ========================================================================== */

@media screen and (max-width: 850px) {
    .mainparent { display: flex !important; flex-direction: column !important; }
    .infobox { float: none !important; width: 100% !important; margin: 10px 0 20px 0 !important; }
    .aboutset-container { flex-direction: column !important; align-items: center !important; }
    .aboutsetlogo { flex: 0 0 auto !important; max-width: 100px !important; }
    
    ul.gallery { justify-content: center !important; gap: 10px; }
    li.gallerybox { width: calc(50% - 20px) !important; min-width: 140px !important; margin: 5px !important; }

    .header-mainpage { flex-direction: column !important; text-align: center !important; }
    .header-main-text { order: 2; margin-top: 15px !important; }
    .header-main-logo { order: 1; }

    .headercatpage tbody, .headercatpage tr { display: flex !important; flex-direction: column !important; }
    .headercatpage td { display: block !important; width: 100% !important; text-align: center !important; }
    .headercatpage td:nth-child(2) { order: 1; }
    .headercatpage td:first-child { order: 2; }
    .headercatpage td:last-child { order: 3; }
}

@media screen and (max-width: 450px) {
    li.gallerybox { width: 100% !important; }
}