/* Eddie Vault desktop library polish — make search the first control.
   Removes the duplicate/bulky "My Vault" title block and the top count pill.
   The bottom stats bar remains the source for item counts. */
@media (min-width: 921px) {
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__library,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__library {
        padding-top: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__library-head,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__library-head,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell .eddie-my-vault__pulse,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell .eddie-my-vault__pulse {
        display: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls {
        order: -20 !important;
        padding: 16px 12px 8px !important;
        gap: 8px !important;
        background:
            linear-gradient(180deg,
                rgba(6, 12, 21, .38) 0%,
                rgba(6, 12, 21, .14) 62%,
                rgba(6, 12, 21, 0) 100%) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search input,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort select,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search input,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort select {
        min-height: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
        background: rgba(255, 255, 255, .055) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list {
        padding-top: 6px !important;
    }
}


/* Eddie Vault desktop library polish — search at bottom, remove duplicate sort pill.
   The left panel now keeps filters near the media list and places search above
   the bottom tally counter. */
@media (min-width: 921px) {
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls {
        order: 80 !important;
        flex: 0 0 auto !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 8px 10px 6px !important;
        margin: 0 !important;
        gap: 0 !important;
        background:
            linear-gradient(180deg,
                rgba(6, 12, 21, 0) 0%,
                rgba(6, 12, 21, .22) 100%) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort {
        display: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search input,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__search input {
        width: 100% !important;
        min-height: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, .045) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs {
        order: 10 !important;
        padding-top: 12px !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar {
        order: 20 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list {
        order: 70 !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__stats,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__stats {
        order: 90 !important;
        flex: 0 0 auto !important;
        padding-top: 6px !important;
    }
}


/* Eddie Vault desktop library filters — unified View by card.
   Replaces the two loose pill rows with one compact control group. */
@media (min-width: 921px) {
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby {
        order: 10 !important;
        flex: 0 0 auto !important;
        margin: 14px 10px 8px !important;
        padding: 10px !important;
        border: 1px solid rgba(145, 203, 255, .10) !important;
        border-radius: 14px !important;
        background:
            radial-gradient(circle at 18% 0%, rgba(33, 113, 181, .12), transparent 58%),
            linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .025)) !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .045),
            0 14px 30px rgba(0, 0, 0, .10) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-head,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0 0 7px !important;
        color: #8cc9ff !important;
        font-size: 10px !important;
        font-weight: 1000 !important;
        letter-spacing: .16em !important;
        text-transform: uppercase !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row {
        display: grid !important;
        grid-template-columns: 58px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 6px 0 !important;
        border-top: 1px solid rgba(145, 203, 255, .055) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row > span,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row > span {
        color: rgba(179, 193, 212, .70) !important;
        font-size: 10px !important;
        font-weight: 950 !important;
        letter-spacing: .08em !important;
        text-transform: uppercase !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby select,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby select {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px !important;
        padding: 0 30px 0 10px !important;
        border: 1px solid rgba(145, 203, 255, .09) !important;
        border-radius: 9px !important;
        background:
            linear-gradient(180deg, rgba(12, 23, 39, .92), rgba(8, 15, 27, .96)) !important;
        color: rgba(244, 249, 255, .94) !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        outline: none !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby select:focus,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby select:focus {
        border-color: rgba(99, 179, 255, .44) !important;
        box-shadow:
            0 0 0 3px rgba(33, 113, 181, .13),
            inset 0 1px 0 rgba(255, 255, 255, .055) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__tabs,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__typebar,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__sort {
        display: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__controls {
        order: 80 !important;
        padding-top: 8px !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__list {
        order: 70 !important;
        padding-top: 4px !important;
    }
}

@media (max-width: 920px) {
    .eddie-vault-shell__viewby {
        display: none !important;
    }
}


/* Eddie Vault desktop View by — compact themed custom menus.
   This avoids browser-native white select dropdowns and keeps the filter module
   to roughly one-third of the previous height. */
@media (min-width: 921px) {
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby {
        position: relative !important;
        order: 10 !important;
        margin: 10px 10px 6px !important;
        padding: 7px !important;
        border-radius: 12px !important;
        border: 1px solid rgba(145, 203, 255, .08) !important;
        background:
            radial-gradient(circle at 12% 0%, rgba(33, 113, 181, .10), transparent 64%),
            linear-gradient(180deg, rgba(255, 255, 255, .043), rgba(255, 255, 255, .022)) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
        overflow: visible !important;
        z-index: 30 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-head,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-head,
    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-row {
        display: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-compact,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-compact {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        align-items: stretch !important;
        min-width: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control {
        position: relative !important;
        min-width: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger {
        appearance: none !important;
        -webkit-appearance: none !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 38px !important;
        display: grid !important;
        grid-template-rows: 12px 1fr !important;
        align-items: center !important;
        gap: 1px !important;
        margin: 0 !important;
        padding: 6px 8px !important;
        border: 1px solid rgba(145, 203, 255, .085) !important;
        border-radius: 9px !important;
        background:
            linear-gradient(180deg, rgba(12, 23, 39, .78), rgba(8, 15, 27, .92)) !important;
        color: #f6fbff !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
        cursor: pointer !important;
        text-align: left !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger span,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger span {
        overflow: hidden !important;
        color: rgba(179, 193, 212, .72) !important;
        font-size: 7.5px !important;
        font-weight: 1000 !important;
        letter-spacing: .12em !important;
        line-height: 1 !important;
        text-transform: uppercase !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger strong,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger strong {
        min-width: 0 !important;
        overflow: hidden !important;
        color: rgba(246, 251, 255, .94) !important;
        font-size: 10.5px !important;
        font-weight: 950 !important;
        line-height: 1.05 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger::after,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-trigger::after {
        content: "▾" !important;
        position: absolute !important;
        right: 7px !important;
        bottom: 7px !important;
        color: rgba(145, 203, 255, .55) !important;
        font-size: 9px !important;
        line-height: 1 !important;
        pointer-events: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control.is-open .eddie-vault-shell__viewby-trigger,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control.is-open .eddie-vault-shell__viewby-trigger {
        border-color: rgba(99, 179, 255, .34) !important;
        background: linear-gradient(180deg, rgba(16, 40, 67, .86), rgba(10, 23, 39, .96)) !important;
        box-shadow:
            0 0 0 3px rgba(33, 113, 181, .09),
            inset 0 1px 0 rgba(255, 255, 255, .05) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-menu,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-menu {
        position: absolute !important;
        z-index: 999 !important;
        top: calc(100% + 7px) !important;
        left: 0 !important;
        min-width: max(100%, 132px) !important;
        max-width: 184px !important;
        display: grid !important;
        gap: 4px !important;
        padding: 6px !important;
        border: 1px solid rgba(145, 203, 255, .16) !important;
        border-radius: 12px !important;
        background:
            radial-gradient(circle at 50% 0%, rgba(33, 113, 181, .18), transparent 58%),
            linear-gradient(180deg, rgba(10, 19, 33, .985), rgba(5, 10, 18, .995)) !important;
        box-shadow:
            0 20px 46px rgba(0, 0, 0, .46),
            inset 0 1px 0 rgba(255, 255, 255, .045) !important;
        backdrop-filter: blur(16px) saturate(1.08) !important;
        -webkit-backdrop-filter: blur(16px) saturate(1.08) !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control[data-vault-viewby-control="sort"] .eddie-vault-shell__viewby-menu,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-control[data-vault-viewby-control="sort"] .eddie-vault-shell__viewby-menu {
        left: auto !important;
        right: 0 !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-menu[hidden],
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-menu[hidden] {
        display: none !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option {
        appearance: none !important;
        -webkit-appearance: none !important;
        width: 100% !important;
        min-height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 7px 9px !important;
        border: 1px solid rgba(145, 203, 255, .06) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, .035) !important;
        color: rgba(235, 244, 255, .90) !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        text-align: left !important;
        cursor: pointer !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option:hover,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option:hover {
        border-color: rgba(145, 203, 255, .18) !important;
        background: rgba(33, 113, 181, .14) !important;
        color: #ffffff !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option.is-active,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option.is-active {
        border-color: rgba(99, 179, 255, .34) !important;
        background: linear-gradient(180deg, rgba(33, 113, 181, .38), rgba(18, 69, 112, .48)) !important;
        color: #f8fbff !important;
    }

    html body.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option.is-active::after,
    html body.eddie-standalone-page.eddie-my-vault-page:not(.eddie-vault-mobile-layout-active) .eddie-vault-shell__viewby-option.is-active::after {
        content: "✓" !important;
        color: rgba(181, 223, 255, .95) !important;
        font-size: 10px !important;
    }
}


