// ── Toolbar ───────────────────────────────────────────────────────────────────
.blocklibrary-toolbar {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.search-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;

  &:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  }
}

// ── Category tabs ─────────────────────────────────────────────────────────────
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
  border-bottom: 1px solid #e5e7eb;
  padding-top: 12px;
  background: #f9fafb;

  button {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: #fff;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;

    &:hover {
      border-color: #3b82f6;
      color: #3b82f6;
    }

    &.active {
      background: #3b82f6;
      border-color: #3b82f6;
      color: #fff;
      font-weight: 500;
    }
  }
}

// ── Block grid ────────────────────────────────────────────────────────────────
.block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 16px;
}

.block-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;

  &:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

.block-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}

.block-name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  margin-bottom: 6px;
}

.block-category-chip {
  display: inline-block;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.block-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

// ── Empty state ───────────────────────────────────────────────────────────────
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #9ca3af;
  font-size: 14px;
}
