/**
 * NVBW Lehre-Manager Styles
 */

.nvbw-lehre-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Filter-Bereich */
.nvbw-lehre-filter {
    background: #F6EFE2;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.nvbw-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.nvbw-filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nvbw-filter-item label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.nvbw-filter-item select {
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.nvbw-filter-item select:hover,
.nvbw-filter-item select:focus {
    border-color: #007cba;
    outline: none;
}

/* Loading-Indikator */
.nvbw-filter-loading {
    color: #007cba;
    font-size: 13px;
    font-weight: 500;
    display: block;
    text-align: center;
}

/* Tabelle */
.nvbw-lehre-table-wrapper {
    transition: opacity 0.3s ease;
}

.nvbw-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-left: 0 none;
    border-right: 0 none;
}

.nvbw-lehre-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-left: 0 none;
    border-right: 0 none;
    border-top: 0 none;
}

.nvbw-lehre-table thead {
    background: #F6EFE2;
    border-bottom: 2px solid #dee2e6;
    border-left: 0 none;
    border-right: 0 none;
}

.nvbw-lehre-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    border-left: 0 none !important;
    border-right: 0 none !important;
}

.nvbw-lehre-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.nvbw-lehre-table tbody tr:hover {
    background-color: #F6EFE2;
}

.nvbw-lehre-table td {
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    vertical-align: top;
    border-left: 0 none !important;
    border-right: 0 none !important;
}

/* Erste Spalte: kein linker Rahmen (Override für Theme-Standards) */
.nvbw-lehre-table th:first-child,
.nvbw-lehre-table td:first-child {
    border-left: 0 none !important;
}

.nvbw-lehre-table td a {
    
    text-decoration: underline;
}

.nvbw-lehre-table td a:hover {
   
}

/* Keine Ergebnisse */
.nvbw-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #F6EFE2;
    border-radius: 4px;
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .nvbw-filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Tabelle auf Mobile als Karten anzeigen */
    .nvbw-lehre-table thead {
        display: none;
    }

    .nvbw-lehre-table,
    .nvbw-lehre-table tbody,
    .nvbw-lehre-table tr,
    .nvbw-lehre-table td {
        display: block;
        width: 100%;
    }

    .nvbw-lehre-table tr {
        margin-bottom: 20px;
        border: none;
        border-bottom: 1px solid #dee2e6;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .nvbw-lehre-table td {
        padding: 12px 15px;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 50%;
    }

    .nvbw-lehre-table td:last-child {
        border-bottom: none;
    }

    .nvbw-lehre-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        font-weight: 600;
        color: #666;
    }

    .nvbw-lehre-table tbody tr:hover {
        background-color: #fff;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .nvbw-lehre-table {
        font-size: 15px;
    }

    .nvbw-lehre-table th,
    .nvbw-lehre-table td {
        padding: 10px 12px;
    }
}

/* Fehlermeldung */
.nvbw-error {
    color: #d63638;
    text-align: center;
    padding: 20px;
    background: #fcf0f1;
    border-radius: 4px;
    border: 1px solid #d63638;
}

/* Integration mit Astra Theme */
.entry-content .nvbw-lehre-container {
    margin-top: 0;
}
