/* =============================================================
   eadr.css – Einheitliches Stylesheet (Desktop + Tablet + Mobil)
   ============================================================= */

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Basis ── */
html, body {
    height: 100%;
    width: 100%;
    color: #000;
    background-image: url(/templates/jp-revo/images/bg.png);
    font-family: Lato, Arial, sans-serif;
    font-size: 15px;
}

/* ── Header ── */
header {
    background-color: #3c3c3b;
    color: #fff;
    padding: 10px 0;
}

h1 {
    font-size: 2em;
    color: #fff;
    text-align: center;
}

/* ── Footer ── */
#footer {
    background-color: #3c3c3b;
    display: block;
    width: 100%;
    color: #fff;
    font-size: 14px;
    font-family: Lato, Arial, sans-serif;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

/* ── Suchbereich ── */
#Suche1 {
    border: 1px solid #ccc;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    margin: 10px auto;
    width: 95%;
    border-radius: 4px;
}

#FormSuche {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 1em;
}

#Suchwert1 {
    width: 35%;
    min-width: 180px;
    font-size: 1em;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

#Button1 {
    width: 120px;
    height: 34px;
    background-color: #c86f0d;
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#Button1:hover {
    background-color: #a85a0a;
}

/* ── Ergebnistabelle (Stoffliste) ── */
#stofftabelle {
    width: 95%;
    margin: 0 auto;
    overflow-x: auto;
    font-size: 13px;
}

#stofftabelle table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#stofftabelle th,
#stofftabelle td {
    border: 1px solid #aaa;
    padding: 5px 6px;
    vertical-align: top;
    word-wrap: break-word;
}

#stofftabelle thead th {
    background-color: #3c3c3b;
    color: #fff;
    font-weight: bold;
    text-align: center;
}

#stofftabelle tbody tr {
    cursor: pointer;
}

#stofftabelle tbody tr:hover {
    background-color: coral;
}

/* ── Detailansicht ── */
#stoffdet {
    width: 95%;
    margin: 10px auto;
    font-size: 15px;
    overflow: auto;
}

/* Detailtabelle */
.detail-table {
    border-collapse: collapse;
    border: 1px solid #aaa;
    table-layout: fixed;
    width: 100%;
    margin: 0 auto;
}

.detail-table .row-header {
    font-size: 1em;
    background-color: #808080;
    color: #fff;
    border: 1px solid #aaa;
    text-align: center;
    padding: 5px;
    font-weight: bold;
}

.detail-table .row-data {
    font-size: 0.95em;
    border: 1px solid #aaa;
    padding: 5px 6px;
    vertical-align: top;
    word-wrap: break-word;
}

.detail-table .row-data s {
    color: #888;
}

/* ── Links ── */
a:link    { color: #c86f0d; }
a:visited { color: #ff6a00; }
a:hover   { color: #fff; }
a:active  { color: #ff6a00; }

/* =============================================================
   Responsive – Tablet (max. 900px)
   ============================================================= */
@media screen and (max-width: 900px) {

    html, body {
        background-image: none;
        background-color: #fff;
    }

    header {
        background-color: #000;
    }

    h1 {
        font-size: 1.3em;
    }

    #Suchwert1 {
        width: 55%;
    }

    #stofftabelle {
        font-size: 10px;
        width: 100%;
    }

    #stoffdet {
        font-size: 11px;
        width: 100%;
    }

    .detail-table .row-header {
        font-size: 10px;
    }

    .detail-table .row-data {
        font-size: 10px;
    }

    #footer {
        background-color: #000;
        font-size: 11px;
    }
}

/* =============================================================
   Responsive – Smartphone (max. 480px)
   ============================================================= */
@media screen and (max-width: 480px) {

    h1 {
        font-size: 1.1em;
    }

    #FormSuche {
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
    }

    #Suchwert1 {
        width: 100%;
    }

    #Button1 {
        width: 100%;
    }

    #stofftabelle {
        font-size: 9px;
    }

    /* Auf sehr kleinen Screens: Spalten reduzieren */
    #stofftabelle col.hide-mobile,
    #stofftabelle th.hide-mobile,
    #stofftabelle td.hide-mobile {
        display: none;
    }

    .detail-table .row-header,
    .detail-table .row-data {
        font-size: 9px;
    }

    /* Detailtabelle: auf Mobilgeräten jede Zelle volle Breite */
    .detail-table td,
    .detail-table th {
        display: block;
        width: 100% !important;
    }
}
