/* =========================================================
   müller+krahmer – Auswahlmatrix Feldbus-Schnittstellen
   (nur auf den Seiten mit Matrix bzw. Hinweis eingebunden)
   ========================================================= */
.mx { --ok:#ff8000; --ok-dk:#c25f00; --soon:#ffb366; --dev:#ffd6ad; --none:#d9d9d9; margin: 0 0 2.5rem; }
.mx h2 { margin-top: 0; }
.mx-intro { max-width: 64ch; color: #555; margin: -.2rem 0 1.3rem; }

/* ---------- Matrix (Desktop / Tablet) ---------- */
.mx-scroll { overflow-x: auto; border: 1px solid #e3e3e3; border-radius: 6px; }
.mx-tab { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; table-layout: fixed; font-size: .86rem; }
.mx-tab col.c-bus { width: 118px; } .mx-tab col.c-rolle { width: 74px; }
.mx-tab th, .mx-tab td { text-align: center; }
/* Trennlinien: je Bus eine Linie oben (inkl. Bus-Zelle), zwischen Master und Slave eine feine Linie */
.mx-tab tbody tr:not(.ende) > * { border-top: 1px solid #d9d9d9; }
.mx-tab tbody tr:first-child > * { border-top: 0; }
.mx-tab tbody tr:not(.ende) > td, .mx-tab tbody tr:not(.ende) > th.rolle { border-bottom: 1px solid #ececec; }
.mx-tab thead th { background: #2b2b2b; color: #fff; font-weight: 600; padding: .7rem .4rem; line-height: 1.25; vertical-align: top; }
.mx-tab thead th small { display: block; font-weight: 400; color: #c9c9c9; font-size: .74rem; margin-top: .12rem; }
.mx-tab thead th.det small:last-child { color: #ffb066; }
.mx-tab thead th.links { text-align: center; }
.mx-tab th.bus { text-align: center; padding: .5rem .6rem; font-weight: 700; color: #1e1e1e; background: #fff; border-right: 1px solid #ececec; }
.mx-tab th.rolle { text-align: center; padding: .5rem .5rem; font-weight: 500; color: #6b6b6b; background: #fff; }
.mx-tab td { padding: 5px; }

.mx-z { font: inherit; width: 100%; min-height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center;
        border: 0; border-radius: 5px; padding: .35rem .4rem; line-height: 1.25; font-size: .8rem; font-weight: 600; color: #1e1e1e; }
.mx-z small { font-weight: 400; font-size: .72rem; }
button.mx-z { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
button.mx-z:hover, button.mx-z:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.18); outline: none; }
button.mx-z:focus-visible { outline: 3px solid #1e1e1e; outline-offset: 2px; }
.mx .st-ok   { background: var(--ok); color: #fff !important; }
.mx .st-soon { background: var(--soon) repeating-linear-gradient(180deg, transparent 0 7px, rgba(255,255,255,.45) 7px 9px); }
.mx .st-dev  { background: var(--dev) repeating-linear-gradient(135deg, transparent 0 7px, rgba(255,128,0,.28) 7px 9px); }
.mx .st-none { background: var(--none); }

.mx-legende { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .82rem; color: #6b6b6b; margin: .9rem 0 0; }
.mx-legende span { display: inline-flex; align-items: center; gap: .45rem; }
.mx-legende i { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }

/* ---------- Smartphone: gleich große Schaltflächen ---------- */
.mx-mobil { display: none; }
.mx-gruppe { margin-bottom: 1.1rem; }
.mx-kopf { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; margin-bottom: .45rem; }
.mx-knr { display: grid; gap: .45rem; } .mx-knr.k2 { grid-template-columns: 1fr 1fr; } .mx-knr.k1 { grid-template-columns: 1fr; }
.mx-kn { font: inherit; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; height: 58px;
         padding: .4rem .8rem; border-radius: 5px; border: 1.5px solid #d6d6d6; background: #fff; color: #1e1e1e; font-weight: 600; font-size: .9rem; line-height: 1.25; cursor: pointer; }
.mx-kn small { font-weight: 400; font-size: .74rem; }
.mx-kn.st-ok, .mx-kn.st-soon, .mx-kn.st-dev { border-color: transparent; }
.mx-kn.st-none { color: #8a8a8a; cursor: default; border-color: transparent; }
.mx-kn.gew { outline: 3px solid #1e1e1e; outline-offset: 2px; }
@media (max-width: 700px) { .mx-scroll { display: none; } .mx-mobil { display: block; } }

/* ---------- Dialog ---------- */
.mx-dialog { border: 0; border-radius: 8px; padding: 0; width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.mx-dialog::backdrop { background: rgba(20,20,20,.55); }
.mx-dkopf { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.4rem .9rem; border-bottom: 1px solid #eee; border-left: 6px solid var(--ok, #ff8000); z-index: 1; }
.mx-dkopf h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.mx-dkopf p { margin: .2rem 0 0; font-size: .85rem; color: #666; }
.mx-dialog .st-ok { background:#ff8000; color:#fff; } .mx-dialog .st-soon { background:#ffb366; } .mx-dialog .st-dev { background:#ffd6ad; }
.mx-status { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; margin-left: .3rem; vertical-align: middle; }
.mx-zu { font: inherit; border: 0; background: #f1f1f1; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; flex: none; }
.mx-zu:hover { background: #e3e3e3; }
.mx-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; padding: 1.2rem 1.4rem 1.4rem; }
.mx-kachel { display: flex; flex-direction: column; border: 1px solid #e3e3e3; border-radius: 6px; overflow: hidden; background: #fff; }
.mx-kbild { height: 140px; display: grid; place-items: center; background: #f7f7f7; padding: .5rem; margin: 0 0 .6rem; border-radius: 4px; }
.mx-kbild img { max-height: 124px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.mx-ktext { padding: .9rem 1rem .4rem; flex: 1; }
.mx-ktext h4 { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.3; }
/* einheitlicher Bereich für Überschriften (bis 3 Zeilen), damit Bilder und Texte auf gleicher Höhe beginnen */
.mx-ktext h4 { min-height: calc(3em * 1.3); }
@media (max-width: 520px) { .mx-ktext h4 { min-height: 0; } }
.mx-ktext p { margin: 0; font-size: .86rem; color: #555; }
.mx-klinks { display: flex; flex-direction: column; gap: .4rem; padding: .7rem 1rem 1rem; }
.mx-btn { display: block; text-align: center; padding: .55rem .8rem; border-radius: 4px; font-weight: 600; font-size: .85rem; text-decoration: none; border: 2px solid #ff8000; }
.mx-btn.voll { background: #ff8000; color: #fff; } .mx-btn.voll:hover { background: #e67300; color: #fff; text-decoration: none; }
.mx-btn.rahmen { background: #fff; color: #c25f00; } .mx-btn.rahmen:hover { background: #fff4ea; text-decoration: none; }
.mx-hinweis { padding: 0 1.4rem 1.2rem; font-size: .8rem; color: #777; margin: 0; }

/* ---------- Hinweis auf übergeordneten Feldbusseiten ---------- */
.mx-teaser { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin: 0 0 1.8rem;
             padding: 1.1rem 1.4rem; border-radius: 6px; background: #2b2b2b; color: #fff; border-left: 6px solid #ff8000; }
.mx-teaser strong { display: block; font-size: 1.1rem; }
.mx-teaser span { color: #cfcfcf; font-size: .9rem; }
.mx-teaser a.mx-btn { background: #ff8000; color: #fff; white-space: nowrap; }
.mx-teaser a.mx-btn:hover { background: #e67300; }
