MediaWiki:Common.css

From Cobi Collectors Wiki
Revision as of 21:03, 4 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;
}

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

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

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

/* 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;
}

/* CATEGORY HEADER OPTIMIERUNG */
.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)
   ========================================================================== */
.infobox {
    float: right !important;
    clear: right !important;
    width: 300px;
    margin: 0 0 20px 20px !important;
}

.mw-parser-output h2, 
.mw-parser-output .gallery, 
.mw-parser-output p,
.mw-parser-output ul,
.aboutset-container {
    display: flow-root;
    margin-right: 0 !important;
    overflow: hidden;
}

.aboutset-container {
    display: flex; 
    align-items: flex-start;
    gap: 25px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.aboutsetlogo {
    flex: 0 0 150px;
}

.aboutsettext {
    flex: 1;
}

h2 {
    border-bottom: 1px solid #a2a9b1;
    margin-bottom: 15px;
    padding-top: 10px;
}

.mw-parser-output ul {
    margin-left: 1.5em;
    padding-left: 0.5em;
    list-style-type: disc;
}

.aboutsettext ul {
    overflow: visible;
}

.mw-parser-output li {
    margin-bottom: 0.3em;
}

/* ==========================================================================
   4. GALERIE IM BRICK-STIL (KORRIGIERT)
   ========================================================================== */
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;
    clear: none !important; 
    width: auto !important;
    max-width: 100% !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;
    box-sizing: border-box !important;
    vertical-align: top;
}

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

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

/* Das umschließende DIV und der A-Link haben oft Inline-Styles wie "width: 120px" */
li.gallerybox div.thumb > div,
li.gallerybox div.thumb a.mw-file-description {
    width: 100% !important;   /* Ignoriert die generierte Pixelbreite */
    height: 100% !important;  /* Nutzt die vollen 150px Höhe */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

li.gallerybox div.thumb img {
    /* Diese Kombination erzwingt, dass das Bild innerhalb des 150px Rahmens bleibt */
    max-height: 140px !important; /* Etwas Puffer zum Rand */
    max-width: 160px !important;  /* Etwas Puffer zum Rand */
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.gallerytext {
    width: 100% !important;
    margin: 0 !important;
    /* Erhöhtes Padding: Oben 10px, Rechts 15px, Unten 15px, Links 15px */
    padding: 10px 15px 15px 15px !important; 
    text-align: left !important;
    font-size: 13px !important;
    font-weight: bold !important; /* Passend zu deinem Screenshot */
    line-height: 1.5 !important;   /* Mehr Luft zwischen den Zeilen bei Umbruch */
    box-sizing: border-box !important;
    display: block !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    hyphens: auto; /* Trennt sehr lange Namen automatisch, falls nötig */
}

/* Falls MediaWiki noch eine innere Zentrierung erzwingt: */
.gallerytext p {
    margin: 0 !important;
    text-align: left !important;
}

li.gallerybox > div {
    width: 100% !important;
}

/* ==========================================================================
   5. TABELLEN (COBITABLE)
   ========================================================================== */
.cobitable {
    background-color: #fcfcfc;
    color: #202122;
    margin: 1em auto;
    border: 2px solid var(--accent-blue);
    border-collapse: collapse;
    display: table;
    overflow-x: auto;
    width: fit-content;
    max-width: 100%;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15); 
    border-radius: 4px;
}

.cobitable th, .cobitable td {
    border: 1px solid #c5d1de !important; /* Dezente Trennlinien (helleres Blau) */
    padding: 0.6em 0.8em;
}

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

/* ==========================================================================
   6. 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; 
}

/* ==========================================================================
   7. 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, .toc, .mw-toc-panel {
    background-color: var(--bg-light) !important;
    border: 1px solid var(--accent-blue) !important; /* Blau statt Grau */
    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) !important; /* SlateBlue Header */
    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;
    color: #fff !important; /* Weißer Text auf Blauem Grund für besseren Kontrast */
    border: none !important;
}

/* ==========================================================================
   9. KATEGORIE-LISTEN (MEHRSPALTIG)
   ========================================================================== */
.catlinks {
    background-color: var(--bg-light) !important;
    border: var(--border-gray) !important;
    box-shadow: var(--shadow-dark);
    border-radius: 4px;
    margin-top: 2em;
}

.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 8px; /* Etwas mehr Platz für den Hover-Effekt */
    border-bottom: 1px solid #e2e2e2;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.mw-category-group ul li a::before {
    content: "▶";
    font-size: 0.8em;
    color: var(--accent-blue);
    margin-right: 8px;
}

.mw-category-group ul li:hover {
    background-color: rgba(159, 182, 205, 0.2); /* 20% Deckkraft deines Akzent-Blau */
}

/* ==========================================================================
   10. SIDEBAR (SICHERHEITS-MODUS)
   ========================================================================== */
.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;
}

/* ==========================================================================
   11. 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; }

    .infobox {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 20px 0 !important;
        clear: both !important;
    }

    .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; 
    }

    .aboutsetlogo img {
        width: 100% !important;     
        height: auto !important;
    }

    .aboutsettext ul {
        text-align: left !important; 
        display: inline-block;
    }

                ul.gallery {
        max-width: 100% !important;
        justify-content: center !important;
        display: flex !important;
        gap: 10px; 
    }

    li.gallerybox {
        width: calc(50% - 20px) !important; 
        min-width: 140px !important;
        height: auto !important; 
        min-height: 200px !important; 
        margin: 5px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    li.gallerybox div.thumb {
        height: auto !important;        
        min-height: 130px !important;   
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        position: static !important;    
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    li.gallerybox .thumb img {
        max-width: 100% !important;
        max-height: 120px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important; 
    }

    .gallerytext {
        position: static !important; 
        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; 
        line-height: 1.2 !important;
    }

    .headersetpage td {
        padding: 6px 4px !important;
    }

    .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; 
        margin-top: 15px !important;
        text-align: center !important;
    }

    .header-main-logo {
        order: 1; 
        margin: 0 auto !important;
    }

    .header-mainpage::after {
        display: none !important; 
    }
    
    .headercatpage {
        display: block !important;
        width: 100% !important;
        height: auto !important; 
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    .headercatpage tbody, 
    .headercatpage tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
    }

    .headercatpage td {
        display: block !important;
        width: 100% !important;
        height: auto !important; 
        padding: 2px 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        border: none !important;
    }

    .headercatpage td:nth-child(2) { order: 1; } 
    .headercatpage td:first-child { order: 2; }    
    .headercatpage td:last-child { order: 3; }     

    .headercatpage td, 
    .headercatpage td b, 
    .headercatpage td strong {
        font-size: 18px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        overflow: visible !important; 
    }

    .headercatpage td:nth-child(2) img {
        max-width: 180px !important;
        height: auto !important;
        margin: 0 auto 5px auto !important;
    }
}

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