/* HB Repeater Map – Frontend Styles (Light Theme) */

.hb-repeater-wrap * { box-sizing: border-box; }

.hb-repeater-wrap {
    font-family: inherit;
    background: #fff;
    color: #1d2327;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

/* ── Header ── */
.hbrm-header {
    background: linear-gradient(135deg, #1a4a8a 0%, #1560bd 100%);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hbrm-header-icon { font-size: 1.6rem; }
.hbrm-header h2 { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0; }
.hbrm-header p  { font-size: .8rem; color: rgba(255,255,255,.75); margin: 2px 0 0; }

/* ── Tabs ── */
.hbrm-tabs {
    display: flex;
    background: #f6f7f8;
    border-bottom: 2px solid #dde1e7;
    padding: 0 18px;
    gap: 0;
}
.hbrm-tab {
    padding: 10px 18px;
    cursor: pointer;
    font-size: .88rem;
    color: #646970;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
    user-select: none;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}
.hbrm-tab:hover { color: #1560bd; }
.hbrm-tab.active { color: #1560bd; border-bottom-color: #1560bd; font-weight: 600; }

/* ── Panels ── */
.hbrm-panel { display: none; padding: 20px 22px; background: #fff; }
.hbrm-panel.active { display: block; }

/* ── Summary cards ── */
.hbrm-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 640px) { .hbrm-cards { grid-template-columns: 1fr 1fr; } }
.hbrm-card {
    background: #f6f7f8;
    border: 1px solid #dde1e7;
    border-radius: 7px;
    padding: 14px 16px;
    text-align: center;
}
.hbrm-card .val { font-size: 1.9rem; font-weight: 700; color: #1560bd; }
.hbrm-card .lbl { font-size: .72rem; color: #646970; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }
.hbrm-card.green .val  { color: #1a7431; }
.hbrm-card.orange .val { color: #856404; }
.hbrm-card.red .val    { color: #c02b0a; }

/* ── Charts ── */
.hbrm-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
@media (max-width: 640px) { .hbrm-charts { grid-template-columns: 1fr; } }
.hbrm-chart-box {
    background: #f6f7f8;
    border: 1px solid #dde1e7;
    border-radius: 7px;
    padding: 14px 16px;
}
.hbrm-chart-box h3 { font-size: .88rem; color: #1560bd; margin: 0 0 12px; font-weight: 600; }
.hbrm-chart-box canvas { max-height: 240px; }

/* ── Kanton table ── */
.hbrm-table-box {
    background: #f6f7f8;
    border: 1px solid #dde1e7;
    border-radius: 7px;
    padding: 14px 16px;
}
.hbrm-table-box h3 { font-size: .88rem; color: #1560bd; margin: 0 0 12px; }
.hbrm-table-box table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.hbrm-table-box th {
    background: #eef0f2;
    color: #646970;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #dde1e7;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.hbrm-table-box td { padding: 6px 10px; border-bottom: 1px solid #eef0f2; color: #1d2327; }
.hbrm-table-box tr:hover td { background: #eef0f2; }
.hbrm-bar { height: 5px; background: #1560bd; border-radius: 3px; display: inline-block; min-width: 2px; }

/* ── Map ── */
.hbrm-map-el { border-radius: 7px; border: 1px solid #dde1e7; }

.hbrm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    background: #f6f7f8;
    border: 1px solid #dde1e7;
    border-radius: 7px;
    padding: 10px 14px;
}
.hbrm-filter-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hbrm-filter-label {
    font-size: .7rem;
    color: #646970;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.hbrm-filter-sep { width: 1px; height: 20px; background: #dde1e7; margin: 0 4px; }
.hbrm-filter-btn {
    background: #fff;
    border: 1px solid #c3c4c7;
    color: #646970;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: .78rem;
    transition: all .2s;
    user-select: none;
    font-family: inherit;
}
.hbrm-filter-btn:hover { border-color: #1560bd; color: #1560bd; }
.hbrm-filter-btn.active        { background: #1560bd; border-color: #1560bd; color: #fff; }
.hbrm-filter-btn.active-status { background: #edfaef; border-color: #1a7431; color: #1a7431; }
.hbrm-filter-btn.active-band   { background: #f0ebff; border-color: #7048c1; color: #7048c1; }
.hbrm-filter-btn.active-mode   { background: #fef9e7; border-color: #856404; color: #856404; }
.hbrm-filter-count { font-size: .75rem; color: #646970; margin-left: 6px; }

.hbrm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    font-size: .78rem;
    color: #646970;
}
.hbrm-legend-item { display: flex; align-items: center; gap: 5px; }
.hbrm-legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Leaflet popup ── */
.hbrm-popup-call { font-size: 1rem; font-weight: 700; color: #1560bd; }
.hbrm-popup-qth  { color: #646970; font-size: .82rem; margin: 2px 0 8px; }
.hbrm-popup-row  { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; margin: 2px 0; }
.hbrm-popup-lbl  { color: #646970; }
.hbrm-popup-val  { font-weight: 600; color: #1d2327; }
.hbrm-popup-rem  { margin-top: 6px; font-size: .76rem; color: #646970; }

/* ── Badges ── */
.hbrm-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 600;
    margin: 1px;
}
.hbrm-badge-aktiv           { background: #edfaef; color: #1a7431; border: 1px solid #1a7431; }
.hbrm-badge-eingeschraenkt  { background: #fef9e7; color: #856404; border: 1px solid #c49a0a; }
.hbrm-badge-projekt         { background: #e8f0fe; color: #1a4a8a; border: 1px solid #1560bd; }
.hbrm-badge-qrt             { background: #fdf0ef; color: #c02b0a; border: 1px solid #c02b0a; }
.hbrm-badge-mode            { background: #e8f0fe; color: #1560bd; border: 1px solid #1560bd; }

/* ── List ── */
.hbrm-search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.hbrm-export-btns { display: flex; gap: 6px; margin-left: auto; }
.hbrm-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    background: #fff;
    border: 1px solid #1560bd;
    color: #1560bd;
}
.hbrm-export-btn:hover { background: #1560bd; color: #fff; }
.hbrm-export-btn:disabled { opacity: .6; cursor: wait; }
.hbrm-export-pdf { border-color: #c02b0a; color: #c02b0a; }
.hbrm-export-pdf:hover { background: #c02b0a; color: #fff; }
.hbrm-search {
    background: #fff;
    border: 1px solid #c3c4c7;
    color: #1d2327;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: .85rem;
    width: 300px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}
.hbrm-search:focus { border-color: #1560bd; box-shadow: 0 0 0 2px rgba(21,96,189,.15); }
.hbrm-list-count  { font-size: .8rem; color: #646970; }

.hbrm-list-wrap { border: 1px solid #dde1e7; border-radius: 7px; overflow: hidden; overflow-x: auto; }
.hbrm-list-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.hbrm-list-table th {
    background: #eef0f2;
    color: #646970;
    padding: 8px 10px;
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #dde1e7;
    white-space: nowrap;
}
.hbrm-list-table td { padding: 7px 10px; border-bottom: 1px solid #eef0f2; color: #1d2327; }
.hbrm-list-table tr:hover td { background: #f6f7f8; }
.hbrm-list-table tr:last-child td { border-bottom: none; }

/* ── No data ── */
.hb-no-data { color: #646970; font-style: italic; }
