/* DSx Studio — компактная панель категорий и поиска */

/* Две части одной строки: вкладки слева, поле поиска справа. */
.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
    align-items: center;
    column-gap: 24px;
    row-gap: 12px;
    width: 100%;
    margin: 0 0 12px;
}

.catalog-filters {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 4px;
    padding: 5px;
    background: #10192a;
    border: 1px solid var(--border, rgba(170,190,255,.12));
    border-radius: 14px;
    white-space: nowrap;
}

.catalog-filter {
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, #98a7c1);
    font: 600 13px/1.3 inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    padding: 11px 19px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}

.catalog-filter:hover:not(.active) {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.catalog-filter.active {
    color: #fff;
    background: linear-gradient(135deg, #5477ff, #7652da);
    box-shadow: 0 4px 15px rgba(80,100,255,.2);
}

.catalog-filter:focus-visible,
.catalog-search:focus-within {
    outline: 2px solid #8195ff;
    outline-offset: 3px;
}

.catalog-search {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
    width: 100%;
    min-width: 0;
    height: 47px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(170,190,255,.12));
    background: #131d30;
    color: #90a1be;
    cursor: text;
    transition: border-color .2s;
}

.catalog-search:focus-within { border-color: #5778ff; }
.catalog-search svg { flex: 0 0 auto; }
.catalog-search input {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100%;
    color: #f4f7ff;
    background: transparent;
    border: 0;
    outline: 0;
    font-family: inherit;
    font-size: 13px;
}
.catalog-search input::placeholder { color: #8293ae; }

.catalog-results {
    margin: 0 0 23px;
    text-align: right;
    color: #8293ae;
    font-size: 12px;
}

/* Класс hidden должен перекрывать display:grid/flex карточек. */
.app-card[hidden], .catalog-empty[hidden] { display: none !important; }

.catalog-empty {
    padding: 65px 20px;
    border: 1px dashed var(--border, rgba(170,190,255,.12));
    border-radius: 20px;
    background: #111a2a;
    text-align: center;
}
.catalog-empty .empty-icon {
    color: #7188c5;
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
}
.catalog-empty h3 { color: #f4f7ff; font-size: 20px; }
.catalog-empty p { color: #98a7c1; margin-top: 8px; font-size: 14px; }

/* На узких экранах поиск переносится под вкладки. */
@media (max-width: 700px) {
    .catalog-toolbar {
        grid-template-columns: 1fr;
        row-gap: 13px;
    }
    .catalog-filters {
        width: 100%;
        justify-self: stretch;
    }
    .catalog-filter { flex: 1; padding: 11px 8px; }
    .catalog-search { justify-self: stretch; }
    .catalog-results { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-filter, .catalog-search { transition: none; }
}
