/*
 * STM-Baumliste – Frontend CSS v2.0
 * Akzentfarbe: #00381c
 */

:root {
    --stm-bl-accent:       #00381c;
    --stm-bl-accent-mid:   #00582c;
    --stm-bl-accent-light: #e6f2ec;
    --stm-bl-border:       #d0d7de;
    --stm-bl-text:         #1a1a1a;
    --stm-bl-muted:        #5a6472;
    --stm-bl-stripe:       #f4f8f6;
    --stm-bl-radius:       6px;
}

.stm-baumliste {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 1.5em 0;
}

/* ── Suchleiste ──────────────────────────────── */
.stm-bl-search {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.stm-bl-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stm-bl-search__input {
    height: 38px;
    padding: 0 12px;
	flex: 1;
    border: 1px solid var(--stm-bl-border);
    border-radius: var(--stm-bl-radius);
    font-size: 14px;
    width: 320px !important;
    transition: border-color .18s;
}

.stm-bl-search__input:focus {
    outline: none;
    border-color: var(--stm-bl-accent);
    box-shadow: 0 0 0 3px rgba(0,56,28,.12);
}

.stm-bl-search__btn {
    height: 38px;
    padding: 0 18px;
    background: var(--stm-bl-accent);
    color: #fff;
    border: none;
    border-radius: var(--stm-bl-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
}

.stm-bl-search__btn:hover {
    background: var(--stm-bl-accent-mid);
}

.stm-bl-search__reset {
    font-size: 13px;
    color: var(--stm-bl-muted);
    text-decoration: underline;
    cursor: pointer;
}

/* ── Tabelle ─────────────────────────────────── */
.stm-bl-table-wrap {
    border-radius: var(--stm-bl-radius);
    border: 1px solid var(--stm-bl-border);
}

.stm-bl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--stm-bl-text);
}

.stm-bl-table thead th {
    background: var(--stm-bl-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
    /* Sticky Header */
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

.stm-bl-table tbody tr:nth-child(even) {
    background: var(--stm-bl-stripe);
}

.stm-bl-table tbody tr:hover {
    background: var(--stm-bl-accent-light);
}

.stm-bl-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--stm-bl-border);
    vertical-align: middle;
}

.stm-bl-table tbody tr:last-child td {
    border-bottom: none;
}

.stm-bl-nr {
    white-space: nowrap;
}

/* ── Pagination ──────────────────────────────── */
.stm-bl-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.stm-bl-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--stm-bl-border);
    border-radius: 4px;
    font-size: 13px;
    color: var(--stm-bl-accent);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.stm-bl-pagination .page-numbers:hover,
.stm-bl-pagination .page-numbers.current {
    background: var(--stm-bl-accent);
    color: #fff;
    border-color: var(--stm-bl-accent);
}

/* ── Leerer Zustand ──────────────────────────── */
.stm-bl-empty {
    color: var(--stm-bl-muted);
    font-style: italic;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .stm-bl-search__input { width: 100%; }
    .stm-bl-search form   { flex-direction: column; align-items: stretch; }
    .stm-bl-table         { font-size: 12px; }
    .stm-bl-table thead th,
    .stm-bl-table tbody td { padding: 7px 10px; }
}
