@charset "utf-8";
/**
 * @file index.css
 * @description Stylesheet für Jobportal-Index mit responsivem Tabellen-Layout, doppeltem Scrollbalken und Karten-Mobile-Ansicht
 * @project riedersberger.de
 * @version 1.1
 * @since 2026-06-23
 *
 * Änderungen v1.1 (2026-07-15):
 * - [MOD] px → rem: .scroll-top height/padding/margin, scrollbar height/border-radius,
 *         .table-responsive margin, th/td padding, column min-width-Werte,
 *         form input[type="submit"] padding/margin/font-size,
 *         h1.center margin, .error-messages padding/margin/border-radius,
 *         Mobile: .tbody-tr margin/border-radius/padding, td padding/min-height,
 *         td::before top, td:first-child margin/padding/border-radius,
 *         alle Responsive-Werte
 */
/* jobportal.css */
/* Version 1.8 - Portal-Typ und Geografischer Fokus hinzugefügt */

/* Wrapper für beide Scroll-Container */
.table-wrapper {
    width: 100%;
    margin: 0 auto;
    max-width: 100%;
}

/* Oberer Scrollbalken (nur Desktop) */
.scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f0f0f0;
    border: 1px solid #ccc;
    margin-bottom: 0.625rem;
    height: 1.5625rem;
    padding: 0.125rem;
}

.scroll-top > div {
    height: 1px;
    min-width: 100%;
}

/* Tabellen-Container */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    display: block;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
}

/* Scrollbalken-Styling (Webkit) */
.table-responsive::-webkit-scrollbar {
    height: 0.75rem;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.375rem;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0.375rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tabelle - Flexible Breite */
.table-responsive table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}

.table-responsive th,
.table-responsive td {
    border: 1px solid #999;
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
    overflow: hidden;
    word-wrap: break-word;
}

/* Spaltenbreiten in Prozent - MIT NEUEN SPALTEN */
/* Spalte 1: Auswahl (Radio-Button) */
.table-responsive th:nth-child(1),
.table-responsive td:nth-child(1) {
    width: 5%;
    min-width: 3.125rem;
    text-align: center;
}

/* Spalte 2: Rubrik */
.table-responsive th:nth-child(2),
.table-responsive td:nth-child(2) {
    width: 10%;
    min-width: 6.25rem;
}

/* Spalte 3: Portal-Typ */
.table-responsive th:nth-child(3),
.table-responsive td:nth-child(3) {
    width: 12%;
    min-width: 7.5rem;
}

/* Spalte 4: Geo-Fokus */
.table-responsive th:nth-child(4),
.table-responsive td:nth-child(4) {
    width: 10%;
    min-width: 6.25rem;
}

/* Spalte 5: Zielgruppe */
.table-responsive th:nth-child(5),
.table-responsive td:nth-child(5) {
    width: 10%;
    min-width: 6.25rem;
}

/* Spalte 6: URL */
.table-responsive th:nth-child(6),
.table-responsive td:nth-child(6) {
    width: 15%;
    min-width: 9.375rem;
    word-break: break-all;
}

/* Spalte 7: Öffentliche Bemerkung */
.table-responsive th:nth-child(7),
.table-responsive td:nth-child(7) {
    width: 18%;
    min-width: 11.25rem;
}

/* Spalte 8: Interne Bemerkung */
.table-responsive th:nth-child(8),
.table-responsive td:nth-child(8) {
    width: 18%;
    min-width: 11.25rem;
}

/* Spalte 9: Aktiv (Checkbox) */
.table-responsive th:nth-child(9),
.table-responsive td:nth-child(9) {
    width: 5%;
    min-width: 3.125rem;
    text-align: center;
}

/* Spalte 10: Prüfdatum */
.table-responsive th:nth-child(10),
.table-responsive td:nth-child(10) {
    width: 10%;
    min-width: 6.25rem;
    white-space: nowrap;
}

/* Thead Styling */
thead th {
    background-color: #4a4a4a;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: bold;
}

thead th a {
    color: #fff;
    text-decoration: none;
}

thead th a:hover {
    text-decoration: underline;
}

/* Zeilen-Styling */
tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:nth-child(odd) {
    background-color: #fff;
}

tbody tr:hover {
    background-color: #e8f4f8;
}

/* Button-Styling */
form input[type="submit"] {
    background-color: #4CAF50;
    color: #fff;
    border: none;
    padding: 0.625rem 1.25rem;
    margin: 0.25rem 0.25rem 0.75rem 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

form input[type="submit"]:hover {
    background-color: #45a049;
}

/* Überschrift */
h1.center {
    margin: 1.25rem 0;
    font-size: 1.5em;
    text-align: center;
}

/* Fehlerausgaben */
.error-messages {
    background-color: #ffebee;
    border: 1px solid #f44336;
    padding: 0.9375rem;
    margin: 0.625rem 0;
    border-radius: 4px;
}

.error-messages h3 {
    margin-top: 0;
    color: #c62828;
}

/* Für sehr breite Bildschirme - optionale Mindestbreite */
@media (min-width: 1600px) {
    .table-responsive table {
        min-width: 87.5rem;
    }
}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    /* Spalten schmaler auf Tablets */
    .table-responsive th:nth-child(7),
    .table-responsive td:nth-child(7),
    .table-responsive th:nth-child(8),
    .table-responsive td:nth-child(8) {
        width: 15%;
        min-width: 9.375rem;
    }
}

/* ========================================
   MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Oberen Scrollbalken ausblenden */
    .scroll-top {
        display: none;
    }

    /* Buttons responsive */
    form input[type="submit"] {
        width: 100%;
        margin: 0.3125rem 0;
        padding: 0.75rem;
        font-size: 16px; /* iOS-Fix */
    }

    h1.center {
        font-size: 1.2em;
        padding: 0 0.625rem;
    }

    /* Tabelle in Karten umwandeln */
    .table-responsive {
        overflow-x: visible;
        margin-bottom: 0;
    }

    .table-responsive table {
        min-width: auto;
        table-layout: auto;
    }

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
        width: 100%;
    }

    /* Spaltenbreiten zurücksetzen */
    .table-responsive th,
    .table-responsive td {
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
    }

    /* Header ausblenden */
    thead {
        display: none;
    }

    /* Karten-Layout für Zeilen */
    tbody tr {
        margin-bottom: 0.9375rem;
        border: 2px solid #999;
        border-radius: 0.5rem;
        padding: 0.75rem;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    tbody tr:hover {
        background-color: #f0f7ff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    /* Zellen mit Labels */
    td {
        border: none;
        padding: 0.5rem 0;
        text-align: left;
        position: relative;
        padding-left: 45%;
        word-wrap: break-word;
        min-height: 1.875rem;
        display: flex;
        align-items: flex-start;
        overflow: visible;
    }

    /* Labels vor Inhalten */
    td::before {
        position: absolute;
        top: 0.5rem;
        left: 0;
        width: 42%;
        font-weight: bold;
        content: attr(data-label) ":";
        color: #555;
        text-align: left;
    }

    /* Erste Zeile (Auswahl) hervorheben */
    td:first-child {
        background-color: #f0f0f0;
        margin: -0.75rem -0.75rem 0.5rem -0.75rem;
        padding: 0.75rem;
        border-radius: 0.375rem 0.375rem 0 0;
        justify-content: center;
        padding-left: 0;
    }

    td:first-child::before {
        display: none;
    }

    /* Checkboxen und Radio-Buttons größer */
    td input[type="radio"],
    td input[type="checkbox"] {
        transform: scale(1.5);
        cursor: pointer;
    }

    /* URL umbrechen */
    td[data-label="URL"] {
        word-break: break-all;
    }
}

/* ========================================
   SEHR KLEINE DISPLAYS (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    h1.center {
        font-size: 1em;
    }

    form input[type="submit"] {
        font-size: 0.875rem;
        padding: 0.625rem;
    }

    td {
        padding-left: 48%;
        font-size: 0.875rem;
    }

    td::before {
        width: 45%;
        font-size: 0.8125rem;
    }
}

/* Scrollbalken-Styling für beide Container */
.scroll-top::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 1rem;
}

.scroll-top::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #ddd;
    border: 1px solid #999;
}

.scroll-top::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #666;
    border: 1px solid #333;
    border-radius: 4px;
}

.scroll-top::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Firefox */
.scroll-top,
.table-responsive {
    scrollbar-width: auto;
    scrollbar-color: #666 #ddd;
}
