MediaWiki:Common.css

From Cobi Collectors Wiki
Revision as of 20:41, 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 {
    background: var(--bg-light);
    border: var(--border-gray);
    box-shadow: var(--shadow-dark);
    box-sizing: border-box;
}

/* ==========================================================================
   2. BOX-ELEMENTE & HEADERS
   ========================================================================== */
.infobox {
    float: right;
    margin: 0 0 0.5em 0.5em;
    padding: 0.5em;
    width: 300px;
    vertical-align: middle;
}

.headersetpage, .headernocolumn, .headercatpage {
    width: 100%;
    margin-bottom: 20px;
    padding: 8px 15px;
    font-size: 18px;
}

/* Spezifisch für die Zellen in den Header-Tabellen */
.headersetpage td, .headernocolumn td, .headercatpage td {
    vertical-align: middle;
    padding: 10px 5px; /* Gibt dem Text in den Zellen mehr Raum */
}

/* Die Links im Header etwas dezenter oder kräftiger? */
.headersetpage a {
    text-decoration: none;
    font-weight: bold;
    color: #202122; /* Oder deine Akzentfarbe */
}

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

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

/* ============================================================
   MAINPAGE HEADER (FLEXBOX DESIGN)
   ============================================================ */

/* 1. Die Hauptbox mit dem Schatten */
.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; /* Hier ist er wieder! */
    padding: 15px 25px !important;
    margin: 10px 0 20px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. Text-Bereich (Säule 1) */
.header-main-text {
    flex: 1 1 0% !important;
    font-size: 18px !important;
    font-weight: bold !important; /* Erste Zeile Fett */
    color: #000 !important;
}

/* Zweite Zeile innerhalb des Text-Bereichs (Normal) */
.header-main-text span {
    display: block !important;
    font-weight: normal !important; 
    font-size: 15px !important;
    margin-top: 4px !important;
}

/* 3. Logo-Bereich (Säule 2) */
.header-main-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    justify-content: center !important;
}

/* 4. Platzhalter (Säule 3) */
.header-mainpage::after {
    content: "" !important;
    flex: 1 1 0% !important;
}

/* --- CATEGORY HEADER OPTIMIERUNG --- */

/* 1. Desktop & Grundstruktur */
.headercatpage {
    width: 100% !important;
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    padding: 15px !important;
    border-collapse: separate !important;
    border-spacing: 10px 0 !important;
    margin-bottom: 20px !important;
}

.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 (LINKE SPALTE & INFOBOX)
   ========================================================================== */

/* 1. Die Infobox bleibt rechts und behält ihren Platz */
.infobox {
    float: right !important;
    clear: right !important;
    width: 300px;
    margin: 0 0 20px 20px !important;
}

/* 2. Das Geheimnis: Der Hauptinhalt wird zum "Block Formatting Context" */
/* Das sorgt dafür, dass h2, p und Galerien die Infobox als Grenze sehen */
.mw-parser-output h2, 
.mw-parser-output .gallery, 
.mw-parser-output p,
.mw-parser-output ul,
.aboutset-container {
    display: flow-root; /* Erzeugt eine Barriere zur Infobox */
    margin-right: 0 !important; /* Den festen Margin löschen wir! */
    overflow: hidden; /* Fallback für ältere Browser */
}

/* 3. Der About-Container (Logo + Text) */
.aboutset-container {
    display: flex; 
    align-items: flex-start;
    gap: 25px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.aboutsetlogo {
    flex: 0 0 150px;
}

.aboutsettext {
    flex: 1;
}

/* 4. Die Galerie-Überschriften (H2) optisch abtrennen */
h2 {
    border-bottom: 1px solid #a2a9b1;
    margin-bottom: 15px;
    padding-top: 10px;
}

/* Bringt die verschwundenen Aufzählungspunkte zurück */
.mw-parser-output ul {
    margin-left: 1.5em;      /* Schafft Platz für die Punkte */
    padding-left: 0.5em;     /* Zusätzlicher Puffer */
    list-style-type: disc;   /* Erzwingt die Punkte */
}

/* Speziell für den About-Bereich, falls dort auch Listen sind */
.aboutsettext ul {
    overflow: visible;       /* Erlaubt das Anzeigen der Bullets */
}

/* Verhindert, dass die Punkte in die Infobox ragen */
.mw-parser-output li {
    margin-bottom: 0.3em;
}

/* ==========================================================================
   4. GALERIE IM BRICK-STIL
   ========================================================================== */

/* Die Liste selbst: Fließt nun natürlich um die Infobox */
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;
    
    /* WICHTIG: Die Fixierung auf calc(100% - 340px) entfernen wir! */
    clear: none !important; 
    display: flex !important; /* Zurück zu Standard-Flex */
    width: auto !important;   /* Nutzt den verfügbaren Platz */
    max-width: 100% !important; 
}

/* Die Kachel */
li.gallerybox {
    /* Wir nutzen flex-grow: 0, damit die Boxen nicht unkontrolliert breit werden */
    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;
    box-sizing: border-box !important;
    
    /* Dies verhindert, dass einzelne Kacheln unter die Infobox geschoben werden, 
       bevor die ganze Reihe voll ist */
    vertical-align: top;
}

/* Hover-Effekt (innercenter Style) */
li.gallerybox:hover {
    background-color: rgba(159, 182, 205, 0.25) !important;
    border-color: #a2a9b1 !important;
    cursor: pointer;
}

/* Bild-Bereich mit Innenabstand */
li.gallerybox div.thumb {
    height: 150px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important; /* Innenabstand zum Rahmen oben/seite */
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* Text-Bereich: Endlich bündig und korrekt umbrochen */
.gallerytext {
    width: 100% !important;
    margin: 0 !important;
    padding: 5px 12px 12px 12px !important; /* Innenabstand für den Text */
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    display: block !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Zwingt MediaWiki-Container auf volle Breite, um Versatz zu vermeiden */
li.gallerybox > div {
    width: 100% !important;
}

/* ==========================================================================
   4. TABELLEN (COBITABLE)
   ========================================================================== */
.cobitable {
    background-color: #f8f9fa;
    color: #202122;
    margin: 1em auto;
    border: 1px solid #000;
    border-collapse: collapse;
    display: table;
    overflow-x: auto;
    width: fit-content;
    max-width: 100%;
    box-shadow: var(--shadow-dark); 
    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;
    text-align: center;
}

/* ==========================================================================
   5. GRIDS (MAINPAGE)
   ========================================================================== */
.mainparent {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 15px;
}

.box1 { grid-column: 1 / 3; padding: 15px; }
.box2 { grid-column: 1; padding: 15px; }
.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 p, .box4-content span { display: contents !important; }

.box4-content a, 
.box4-content .mw-file-description {
    display: block !important;
    flex: 0 0 150px !important;
    margin: 2px !important;
    padding: 5px;          
    transition: all 0.2s ease-in-out !important;
    border-radius: 8px;
    text-decoration: none !important;
}

.box4-content a:hover, .box4-content .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.25); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);    
}

.box4-content img {
    width: 150px !important;
    height: auto !important;
    border-radius: 4px;
    display: block;
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.1));
}

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

.innercenter > * { display: block !important; width: 100% !important; max-width: 150px !important; }

.innercenter img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto !important;
    image-rendering: -webkit-optimize-contrast;
}

.innercenter a, .innercenter .mw-file-description {
    display: inline-block !important;
    transition: all 0.2s ease-in-out !important; 
    cursor: pointer;
    padding: 8px; 
    border-radius: 8px;
}

.innercenter a:hover, .innercenter .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.25) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 10; 
}

/* ==========================================================================
   6. BRICK-CONTAINER
   ========================================================================== */
.brickparent {
    display: block !important;
    text-align: left !important;
    padding: 25px;
    background: #ebecf0;
    border: var(--border-gray);
    box-shadow: var(--shadow-dark);
    border-radius: 8px;
    margin: 20px 0;
}

.brickparent p, .brickparent span { display: contents !important; }

.brickparent a, .brickparent .mw-file-description {
    display: inline-block !important;
    vertical-align: top !important;
    margin: 8px !important;      
    padding: 8px;               
    transition: all 0.2s ease-in-out !important;
    border-radius: 6px;
}

.brickparent a:hover, .brickparent .mw-file-description:hover {
    background-color: rgba(159, 182, 205, 0.3) !important; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
}

.brickparent img {
    display: block !important;
    image-rendering: -webkit-optimize-contrast;
}

.brickparent.size-small a, .brickparent.size-small img { width: 110px !important; height: auto !important; }
.brickparent.size-large a, .brickparent.size-large img { width: 250px !important; height: auto !important; }

/* ==========================================================================
   8. INHALTSVERZEICHNIS (TOC)
   ========================================================================== */

/* TOC - Modernes Design passend zu den Boxen */
#toc, .toc, .mw-toc-panel {
    background-color: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.1) !important;
    border-radius: 8px;
    padding: 15px !important;
    display: inline-block;
}

.toctitle {
    background-color: var(--accent-blue);
    margin: -15px -15px 15px -15px; /* Füllt den Header-Bereich aus */
    padding: 10px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.toctitle h2 {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #202122;
    border: none !important;
}

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

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

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

.mw-category-group {
    break-inside: avoid-column; /* Verhindert das Zerschneiden von Gruppen */
    margin-bottom: 15px;
}

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

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

/* --- TIMELESS SIDEBAR OPTIMIERUNG --- */

/* 1. Die Navigations-Blöcke (Links und Rechts) */
.sidebar-chunk {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    padding: 10px !important;
    overflow: hidden !important;
    display: block !important;
}

/* --- TIMELESS SIDEBAR FIX (WIKI-SYNTAX OPTIMIZED) --- */

/* 1. Der äußere Container */
.sidebar-chunk {
    background: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark) !important;
    border-radius: 5px !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 2. Das blaue Haupt-Banner (Erzeugt aus dem ersten *) */
.sidebar-chunk h2 {
    background-color: var(--accent-blue) !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 10px 15px !important;
    display: block !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* 3. DEN DOPPELTEN TEXT ENTFERNEN */
/* Timeless rendert oft ein label oder ein h3 direkt unter dem h2, 
   wenn die Wiki-Syntax so aufgebaut ist wie deine. */
.sidebar-chunk h2 + h3, 
.sidebar-chunk h2 + label,
.sidebar-inner > h3:first-of-type {
    display: none !important;
}

/* 4. Unter-Überschriften innerhalb der Box (z.B. "Categories") */
/* Damit diese nicht auch blau werden, sondern dezent trennen */
.sidebar-chunk .sidebar-inner h3,
.sidebar-chunk h3 {
    display: block !important;
    background: transparent !important;
    color: var(--accent-blue) !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    margin: 15px 12px 5px 12px !important;
    padding-bottom: 3px !important;
    border-bottom: 1px solid #ccc !important;
}

/* 5. Die eigentlichen Links (aus den **) */
.sidebar-chunk ul {
    list-style: none !important;
    margin: 5px 0 10px 0 !important;
    padding: 0 !important;
}

.sidebar-chunk ul li a {
    color: #333 !important;
    padding: 5px 15px !important;
    display: block !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.sidebar-chunk ul li a:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #000 !important;
    padding-left: 20px !important;
}

/* 6. Fix für Search/Toolbox (da diese oft keine Links sind) */
.sidebar-chunk form, .sidebar-chunk #p-search {
    padding: 10px 15px !important;
}

/* 5. Logo-Anpassung */
#p-logo {
    margin: 0 auto 20px auto !important;
    text-align: center !important;
    display: block !important;
}

#p-logo img {
    max-width: 100% !important;
    height: auto !important;
}

/* ==========================================================================
   7. MOBILE OPTIMIERUNG
   ========================================================================== */
@media screen and (max-width: 850px) {
    div.mainparent { display: flex !important; flex-direction: column !important; width: 100% !important; }
    .box1 { order: 1 !important; }
    .box2 { order: 2 !important; }
    .box3 { order: 3 !important; }
    .box4 { order: 4 !important; }

    .box4-content { display: block !important; text-align: center !important; }
    .box4-content * { display: inline-flex !important; width: auto !important; }
    .box4-content a, .box4-content .mw-file-description {
        display: inline-block !important;
        width: 42% !important; 
        margin: 5px !important;
        vertical-align: top !important;
    }
    .box4-content img { width: 100% !important; max-width: 110px !important; height: auto !important; }

    .brickparent.size-large a, .brickparent.size-large img { width: 100% !important; max-width: 250px !important; height: auto !important; }

    .innercenter { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 8px !important; }
    .innercenter > * { display: contents !important; }

/* 1. Infobox auf volle Breite */
    .infobox {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 20px 0 !important;
        clear: both !important;
    }

    /* 2. About-Bereich: Logo und Text untereinander */
    .aboutset-container {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-right: 0 !important;
    }

    .aboutsetlogo {
    flex: 0 0 auto !important;
    margin: 0 0 15px 0 !important;
    max-width: 100px !important; /* Hier kannst du den Wert anpassen */
}

.aboutsetlogo img {
    width: 100% !important;     /* Zwingt das Bild, in den 100px zu bleiben */
    height: auto !important;
}

    .aboutsettext ul {
        text-align: left !important; /* Aufzählungspunkte bleiben lesbar */
        display: inline-block;
    }

    /* Galerie-Liste: Zentriert die Kacheln auf dem Screen */
    ul.gallery {
        max-width: 100% !important;
        justify-content: center !important;
        display: flex !important;
        gap: 10px; /* Erzeugt einen sauberen Abstand zwischen den Boxen */
    }

    /* Die Kachel: Zwei Spalten, automatische Höhe */
    li.gallerybox {
        width: calc(50% - 20px) !important; /* Exakt zwei Boxen nebeneinander */
        min-width: 140px !important;
        height: auto !important; /* WICHTIG: Erlaubt der Box nach unten zu wachsen */
        min-height: 200px !important; 
        margin: 5px !important;
        display: flex !important;
        flex-direction: column !important;
    }

   /* Bild-Bereich: Verhindert Überlagerung UND Abschneiden */
    li.gallerybox div.thumb {
        height: auto !important;        /* Flexibel statt starr 130px */
        min-height: 130px !important;   /* Behält eine schöne Grundform */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        position: static !important;    /* "static" ist sicherer gegen Überlagerung */
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    /* Das Bild selbst: Skaliert sauber */
    li.gallerybox .thumb img {
        max-width: 100% !important;
        max-height: 120px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important; /* Bild wird eingepasst, nicht beschnitten */
    }

    /* Text-Bereich: Schiebt sich unter das Bild */
    .gallerytext {
        position: static !important; /* Verhindert Überlagerung */
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        box-sizing: border-box !important;
    }
    
  .headersetpage {
        display: table !important; 
        width: 100% !important;
        font-size: 16px !important; /* Ein Tick größer für bessere Lesbarkeit */
        line-height: 1.2 !important;
    }

    /* Damit die mittlere Spalte bei größerer Schrift genug Platz hat */
    .headersetpage td {
        padding: 6px 4px !important;
    }

    /* Die Pfeile links/rechts etwas schmaler halten, um Platz zu sparen */
    .headersetpage td:first-child, 
    .headersetpage td:last-child {
        width: 10% !important; 
        white-space: nowrap;
    }
    
    .header-mainpage {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px 15px !important;
    }

    .header-main-text {
        order: 2; /* Text rutscht nach unten */
        margin-top: 15px !important;
        text-align: center !important;
    }

    .header-main-logo {
        order: 1; /* Logo springt nach oben */
        margin: 0 auto !important;
    }

    .header-mainpage::after {
        display: none !important; /* Den unsichtbaren Platzhalter brauchen wir mobil nicht */
    }
    
    /* 1. Die Tabelle als Container */
    .headercatpage {
        display: block !important;
        width: 100% !important;
        height: auto !important; /* Erlaubt der Box nach unten zu wachsen */
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    /* 2. Den Tabellen-Inhalt als Flex-Spalte untereinander anordnen */
    .headercatpage tbody, 
    .headercatpage tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
    }

    /* 3. Die einzelnen Zellen (Titel, Logo, Info) */
    .headercatpage td {
        display: block !important;
        width: 100% !important;
        height: auto !important; /* Wichtig, damit Text nicht abgeschnitten wird */
        padding: 2px 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        border: none !important;
    }

    /* 4. Die Reihenfolge (Order) */
    .headercatpage td:nth-child(2) { order: 1; } /* Logo oben */
    .headercatpage td:first-child { order: 2; }    /* Titel Mitte */
    .headercatpage td:last-child { order: 3; }     /* Info unten */

    /* 5. Text-Sicherung: Verhindert das "Verschwinden" */
    .headercatpage td, 
    .headercatpage td b, 
    .headercatpage td strong {
        font-size: 18px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        overflow: visible !important; /* Zeigt den Text, falls er irgendwo raus will */
    }

    /* 6. Logo-Größe */
    .headercatpage td:nth-child(2) img {
        max-width: 180px !important;
        height: auto !important;
        margin: 0 auto 5px auto !important;
    }
    
}
/* Für ganz schmale Bildschirme (Handys hochkant) */
@media screen and (max-width: 450px) {
    li.gallerybox {
        width: 100% !important; /* Eine Box pro Zeile, wenn es zu eng wird */
        margin: 10px 0 !important;
    }
}