/* ===========================================================
   /dev-panel — sidebar navigation, search and tool rows.
   Class prefix: .dvp-

   Surfaces (glass-card), badges, pills and buttons come from
   app.css by name; only the rail, the search field and the
   tool row live here.
   =========================================================== */

/* ---------- Tool row ---------- */
.dvp-tool {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dvp-tool:hover,
.dvp-tool:focus-visible {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.4);
    color: #fff;
    outline: none;
}

/* Keyboard selection — must read as selected without a hover. */
.dvp-tool.dvp-active {
    background: rgba(13, 202, 240, 0.16);
    border-color: rgba(13, 202, 240, 0.55);
    color: #fff;
}

.dvp-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(13, 202, 240, 0.14);
    color: #0dcaf0;
}

/* A flex child needs min-width:0 or long labels blow the row out instead of ellipsing. */
.dvp-tool-body {
    min-width: 0;
    flex: 1 1 auto;
}

.dvp-tool-chevron {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, color 0.2s ease;
}

.dvp-tool:hover .dvp-tool-chevron {
    color: #0dcaf0;
    transform: translateX(3px);
}

/* ---------- Sidebar rail ---------- */
.dvp-rail {
    position: sticky;
    top: 1rem;
}

.dvp-rail-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    transition: all 0.15s ease;
}

.dvp-rail-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dvp-rail-item.active {
    background: rgba(13, 202, 240, 0.14);
    border-color: rgba(13, 202, 240, 0.4);
    color: #0dcaf0;
}

.dvp-rail-count {
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.dvp-rail-item.active .dvp-rail-count {
    background: rgba(13, 202, 240, 0.25);
    color: #0dcaf0;
}

/* A category with no search hits — still readable, clearly not a match. */
.dvp-rail-dim {
    opacity: 0.35;
}

/* ---------- Search field ---------- */
.dvp-search {
    position: relative;
}

.dvp-search > i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.dvp-search input.form-control {
    padding: 0.5rem 2.25rem 0.5rem 2.15rem;
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dvp-search input.form-control:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(13, 202, 240, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.12);
    color: #fff;
}

.dvp-search-clear {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 50rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dvp-search-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dvp-kbd {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 0.3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

/* Below lg the rail turns into a horizontal strip; keep the items from squashing. */
@media (max-width: 991.98px) {
    .dvp-rail {
        position: static;
    }

    .dvp-rail-scroll {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .dvp-rail-scroll .dvp-rail-item {
        width: auto;
        flex: 0 0 auto;
    }
}
