MediaWiki:Common.css

From Cobi Collectors Wiki
Revision as of 21:15, 30 January 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.
/* Punkt vor img entfernt, damit es alle Bilder anspricht */
.mw-parser-output img {
    max-width: 100%;
    height: auto;
}

/* Tabellen-Scroll-Fix */
.cobitable {
   background-color: #f8f9fa;
   color: #202122;
   margin: 1em auto;
   border: 1px solid #000; /* Deutlicher Außenrahmen */
   border-collapse: collapse;
   display: block; 
   overflow-x: auto;
   width: fit-content; /* Verhindert, dass die Tabelle unnötig die ganze Breite streckt */
   max-width: 100%;
}

/* Rahmen für alle Zellen (Kopfzeile und Daten) */
.cobitable th, 
.cobitable td {
   border: 1px solid #444 !important; /* Dunklerer Rahmen für bessere Lesbarkeit */
   padding: 0.6em 0.8em;
}

/* Spezielle Formatierung für die Kopfzeile */
.cobitable th {
   background-color: #9FB6CD; /* Dein Cobi-Blau */
   color: #000;
   font-weight: bold;
   text-align: center;
}

/* --- BOXEN & LAYOUT --- */

.infobox {
    box-shadow: 5px 5px 10px black;
    vertical-align: middle;
    background: #ebecf0;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 0.5em 0.5em;
    padding: 0.5em;
    width: 300px; /* Feste Breite für Desktop */
    max-width: 100%; /* Verhindert Überlappen auf Mobilgeräten */
}

.headersetpage, .headernocolumn, .headercatpage {
    width: 100%;
    margin-bottom: 20px;
    background: #ebecf0;
    border: 1px solid #aaa;
    padding: 8px 15px;
    box-shadow: 5px 5px 10px black;
    font-size: 18px;
    box-sizing: border-box; /* Wichtig für korrekte Breite inkl. Padding */
}

/* Textbox auf Mobilgeräten breiter machen */
.textbox {
    width: 80%; /* Standardmäßig breiter */
    min-width: 300px;
    background: #ebecf0;
    border: 2px solid #9FB6CD;
    padding: 8px 15px;
    margin: 0 auto;
}

/* --- GRID SYSTEME (RESPONSIV) --- */

/* --- MAINPAGE DESKTOP DESIGN --- */
.mainparent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto; /* Flexibel statt festen 160px */
    grid-column-gap: 15px;
    grid-row-gap: 15px;
}

/* Deine Original-Positionen */
.box1 { grid-area: 1 / 1 / 2 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box2 { grid-area: 2 / 1 / 3 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box3 { grid-area: 3 / 1 / 4 / 2; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }
.box4 { grid-area: 2 / 2 / 4 / 3; background: #ebecf0; border: 1px solid #aaa; padding: 15px; }

/* --- MOBILE OPTIMIERUNG (Nur für schmale Bildschirme) --- */
@media screen and (max-width: 720px) {
    .mainparent {
        display: flex;
        flex-direction: column; /* Stapelt Boxen untereinander */
    }

    .box1, .box2, .box3, .box4 {
        width: 100%;
        margin-bottom: 10px;
        /* Wir entfernen hier die grid-area Bindung für Mobilgeräte */
        grid-area: unset; 
    }
    
    .infobox {
        float: none;
        width: 100% !important;
        margin: 0 0 1em 0;
    }
}

/* --- BRICK-ÜBERSICHT (DEKTOP: 4 SPALTEN, MOBIL: FLEXIBEL) --- */
.brickparent {
    display: grid;
    /* Standardmäßig 4 Spalten auf dem Desktop */
    grid-template-columns: repeat(4, 1fr); 
    grid-gap: 25px;
    align-items: center;
    padding: 10px;
}

/* Verhindert, dass die Bilder in den Bricks zu klein oder zu groß werden */
.brickparent > div {
    text-align: center;
}

/* Mobile Anpassung für die Steine */
@media screen and (max-width: 1000px) {
    .brickparent {
        /* Auf Tablets 3 Spalten */
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .brickparent {
        /* Auf dem Handy 2 Spalten, damit die Bilder erkennbar bleiben */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- MOBILE ANPASSUNGEN (Media Queries) --- */

@media screen and (max-width: 720px) {
    /* Infobox nimmt volle Breite ein und rutscht nach oben/unten */
    .infobox {
        float: none;
        width: 100%;
        margin: 0 0 1em 0;
    }

    /* Das Haupt-Grid wird einspaltig */
    .mainparent {
        grid-template-columns: 1fr;
    }
    
    .box1, .box2, .box3, .box4 {
        grid-area: auto !important; /* Hebt die starre Positionierung auf */
    }

    /* Textbox auf volle Breite */
    .textbox {
        width: 100%;
    }

    /* Header-Höhen flexibel machen */
    .headernocolumn, .headercatpage {
        height: auto;
        min-height: 80px;
    }
    
    /* Über uns Bereich */
    .aboutsettext {
        margin-left: 0;
        height: auto;
        text-align: center;
    }
    .aboutsetlogo {
        position: relative;
        display: block;
        margin: 0 auto 10px;
    }
}

/* --- BOX-STYLING (BLAUE ÜBERSCHRIFTEN) --- */

.box-headline {
   background-color: #9FB6CD;
   font-size: 16px;
   padding: 5px; /* Dein Original-Wert */
}

.innercenter {
   text-align: center;
   padding: 15px;
}