/* ============================================
   KV-Stream - Form Components
   Search, Categories, Inputs
   ============================================ */

/* Search */
.search {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search__input {
    width: 100%;
    height: 44px;
    padding: 0 var(--spacing-lg);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.search__input::placeholder {
    color: var(--color-text-tertiary);
}

.search__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: var(--z-elevated);
}

.search__results.active {
    display: block;
}

.search__result {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search__result:hover {
    background: var(--color-surface-hover);
}

.search__result-thumb {
    width: 80px;
    height: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-bg-tertiary);
}

.search__result-info {
    flex: 1;
    min-width: 0;
}

.search__result-title {
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search__result-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Categories */
.categories {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.category:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    border-color: var(--color-border-hover);
}

.category--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-weight: var(--font-weight-semibold);
    box-shadow: 0 0 15px var(--color-accent-glow);
}