/* ============================================================
   BOOTSTRAP ICON PICKER (BiIconPicker + ComponentPropEditor)
   ============================================================ */

/* ── Inline icon prop row ──────────────────────────────────── */
.bi-prop-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bi-prop-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--an-border);
    border-radius: 6px;
    background: var(--an-surface2);
    font-size: 1.1rem;
    color: var(--an-accent);
    flex-shrink: 0;
}
.bi-prop-input { flex: 1; min-width: 0; }
.bi-prop-btn   { white-space: nowrap; flex-shrink: 0; }

/* ── Modal backdrop ─────────────────────────────────────────── */
.bi-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 1rem;
}

/* ── Modal box ──────────────────────────────────────────────── */
.bi-picker-modal {
    background: var(--an-surface);
    border: 1px solid var(--an-border);
    border-radius: 14px;
    width: min(780px, 100%);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

/* ── Header ─────────────────────────────────────────────────── */
.bi-picker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--an-border);
    font-size: 0.9rem;
    background: var(--an-surface2);
    flex-shrink: 0;
}
.bi-picker-header strong { flex: 1; }
.bi-picker-close {
    background: none;
    border: none;
    color: var(--an-text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .1s, background .1s;
}
.bi-picker-close:hover { color: var(--an-text); background: var(--an-border); }

/* ── Search ─────────────────────────────────────────────────── */
.bi-picker-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--an-border);
    background: var(--an-bg);
    flex-shrink: 0;
    position: relative;
}
.bi-picker-search-icon {
    color: var(--an-text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.bi-picker-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--an-text);
    font-size: 0.9rem;
    padding: 0;
}
.bi-picker-search-input::placeholder { color: var(--an-text-muted); }
.bi-picker-search-clear {
    background: none;
    border: none;
    color: var(--an-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 1px 3px;
    border-radius: 4px;
}
.bi-picker-search-clear:hover { color: var(--an-text); }

/* ── Stats bar ──────────────────────────────────────────────── */
.bi-picker-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 1rem;
    font-size: 0.72rem;
    color: var(--an-text-muted);
    background: var(--an-surface2);
    border-bottom: 1px solid var(--an-border);
    flex-shrink: 0;
}
.bi-picker-current {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.bi-picker-current code {
    font-size: 0.7rem;
    background: var(--an-bg);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--an-accent);
}

/* ── Body (scrollable) ──────────────────────────────────────── */
.bi-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Group ──────────────────────────────────────────────────── */
.bi-picker-group {}
.bi-picker-group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--an-text-muted);
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--an-border);
}

/* ── Icon grid ──────────────────────────────────────────────── */
.bi-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 4px;
}

/* ── Icon item ──────────────────────────────────────────────── */
.bi-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.5rem 0.25rem 0.4rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--an-text-muted);
    cursor: pointer;
    transition: border-color .1s, background .1s, color .1s;
    min-height: 58px;
}
.bi-picker-item i {
    font-size: 1.35rem;
    line-height: 1;
}
.bi-picker-item span {
    font-size: 0.6rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 62px;
}
.bi-picker-item:hover {
    border-color: var(--an-border);
    background: var(--an-surface2);
    color: var(--an-text);
}
.bi-picker-item--selected {
    border-color: var(--an-accent) !important;
    background: color-mix(in srgb, var(--an-accent) 15%, transparent) !important;
    color: var(--an-accent) !important;
}
