/*
 * Installateurverzeichnis — minimales CSS
 * Verwendet Site-Klassen: .form-control, .pbmit-btn, table.contenttable
 * Nur was die Site-Stylesheets nicht abdecken.
 */

/* ─── Intro-Block ───────────────────────────────────────────────────────────── */
.idb-intro {
    max-width: 820px;
    margin-bottom: 36px;
}

.idb-intro__heading {
    margin-bottom: 14px;
}

.idb-intro__text {
    font-size: 16px;
    line-height: 1.7;
    color: #525558;
    margin: 0;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.idb-tabs-bar {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 0;
}

.idb-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px 9px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
    letter-spacing: .01em;
    font-family: inherit;
}

.idb-tab:hover { color: #0585FC; }
.idb-tab:focus-visible { outline: 2px solid #0585FC; outline-offset: 2px; }

.idb-tab--active {
    color: #002e5b;
    border-bottom-color: #0585FC;
}

.idb-tab svg { opacity: .6; flex-shrink: 0; }
.idb-tab--active svg,
.idb-tab:hover  svg { opacity: 1; }

/* ─── Label ─────────────────────────────────────────────────────────────────── */
.idb-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #002e5b;
}

/* ─── Input + Button nebeneinander ──────────────────────────────────────────── */
.idb-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.idb-input-row .form-control { flex: 1; }

.idb-input-row .pbmit-btn {
    flex-shrink: 0;
    white-space: nowrap;
    /* pbmit-btn hat padding 15px 30px, line-height 30px → passt zur form-control-Höhe */
}

/* Suchfelder nicht über die volle Spaltenbreite */
.idb-combobox,
.idb-input-row {
    max-width: 640px;
}

/* ─── Hint ──────────────────────────────────────────────────────────────────── */
.idb-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    line-height: 1.5;
}

/* ─── Combobox / Typeahead ──────────────────────────────────────────────────── */
.idb-combobox { position: relative; }

.idb-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 .25rem .25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    max-height: 310px;
    overflow-y: auto;
    z-index: 200;
    list-style: none;
    padding: 0; margin: 0;
}

.idb-dropdown--visible { display: block; }

.idb-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .12s;
    outline: none;
}

.idb-dropdown-item:hover,
.idb-dropdown-item--active {
    background: #eaf4ff;
    border-left-color: #0585FC;
}

.idb-dd-icon {
    width: 30px; height: 30px;
    border-radius: .25rem;
    background: #eaf4ff;
    color: #0585FC;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.idb-dd-text { flex: 1; min-width: 0; }
.idb-dd-firma    { display: block; font-size: 15px; font-weight: 600; color: #002e5b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idb-dd-location { display: block; font-size: 13px; color: #888; margin-top: 1px; }

.idb-dropdown-state {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px;
    font-size: 15px; color: #888;
    list-style: none;
}
.idb-dropdown-state--error { color: #dc3545; }

/* ─── Suchergebnis-Bereich ──────────────────────────────────────────────────── */
.idb-results-area { margin-top: 24px; }

.idb-results-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
    font-size: 14px; color: #888;
}

.idb-results-origin {
    font-size: 13px;
    background: #f8f8f8;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid #dee2e6;
}

/* Klickbare Zeilen in contenttable */
table.contenttable tbody tr.idb-row {
    cursor: pointer;
    transition: background .12s;
}

table.contenttable tbody tr.idb-row:hover {
    background-color: #eaf4ff !important;
}

table.contenttable tbody tr.idb-row:focus-visible {
    outline: 2px solid #0585FC;
    outline-offset: -2px;
}

table.contenttable thead th.idb-th-dist,
table.contenttable td.idb-td-dist {
    width: 80px; text-align: center;
}

.idb-td-dist {
    font-weight: 700;
    color: #0585FC;
    font-size: 15px;
    white-space: nowrap;
}

.idb-td-dist small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.idb-td-firma { font-weight: 600; color: #002e5b; }
.idb-td-ort   { color: #525558; }

.idb-td-arrow {
    text-align: right;
    color: #bbb;
    width: 28px;
}

table.contenttable tbody tr.idb-row:hover .idb-td-arrow { color: #0585FC; }

/* ─── Mehr anzeigen ─────────────────────────────────────────────────────────── */
.idb-more-wrap {
    margin-top: 20px;
    text-align: center;
}

/* ─── Lade- / Leer- / Fehlerzustand ────────────────────────────────────────── */
.idb-loading-state,
.idb-empty-state,
.idb-error-state {
    padding: 44px 0;
    text-align: center;
    color: #888;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

.idb-error-state { color: #dc3545; }

.idb-empty-text,
.idb-error-title { font-size: 16px; font-weight: 600; margin: 0; }
.idb-empty-sub,
.idb-error-sub   { font-size: 14px; color: #888; margin: 0; max-width: 340px; }

.idb-spinner {
    display: block; width: 32px; height: 32px;
    border: 3px solid #dee2e6;
    border-top-color: #0585FC;
    border-radius: 50%;
    animation: idb-spin .65s linear infinite;
}

.idb-spinner-sm {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid #dee2e6;
    border-top-color: #0585FC;
    border-radius: 50%;
    animation: idb-spin .65s linear infinite;
    vertical-align: middle;
}

@keyframes idb-spin { to { transform: rotate(360deg); } }

/* ─── Zurück-Button ─────────────────────────────────────────────────────────── */
.idb-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; padding: 0;
    cursor: pointer; font-size: 14px; font-weight: 700;
    color: #0585FC; margin-bottom: 18px;
    font-family: inherit;
}

.idb-back-btn:hover { text-decoration: underline; }
.idb-back-btn:focus-visible { outline: 2px solid #0585FC; outline-offset: 3px; border-radius: 2px; }

/* ─── Detail-Karte ──────────────────────────────────────────────────────────── */
.idb-detail-card {
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    overflow: hidden;
}

.idb-detail-head {
    background: #002e5b;
    color: #fff;
    padding: 22px 24px;
}

.idb-detail-firma {
    font-size: 22px; font-weight: 700; line-height: 1.2;
}

.idb-detail-badge {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 8px; font-size: 13px; font-weight: 600;
    color: #6ee7b7;
}

/* Label-Spalte in der Detail-Tabelle */
.idb-dt-label {
    width: 40%;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: #888; white-space: nowrap;
}

.idb-dt-value { font-weight: 600; color: #002e5b; }

.idb-dt-mono {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 14px; font-weight: 400; color: #525558;
}

.idb-null-val { color: #aaa; font-style: italic; font-weight: 400; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .idb-tabs-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .idb-tab { padding: 10px 14px; font-size: 14px; }
    .idb-input-row { flex-direction: column; }
    .idb-input-row .pbmit-btn { width: 100%; text-align: center; }
    table.contenttable .idb-td-ort { display: none; }
    .idb-detail-head { padding: 16px 18px; }
    .idb-dt-label { width: 45%; font-size: 11px; }
}
